dxd - dynax driver framework 2.6.0d163
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::usb::stream::pipe< device_t, circular_t, stream_t > Class Template Reference

#include <dx_usb_stream_pipe.h>

+ Inheritance diagram for dx::usb::stream::pipe< device_t, circular_t, stream_t >:
+ Collaboration diagram for dx::usb::stream::pipe< device_t, circular_t, stream_t >:

Classes

struct  cache
 
struct  isoc
 

Protected Member Functions

 __dx_catchall (this->started=0;std::cerr<< dx::exception(&exception, exception.error, __PRETTY_FUNCTION__, __FILE__, __LINE__)<< std::endl;,) public
 creates this->circular streaming backing store and frame buffers
 
 __dx_catchall (this->started=0;std::cerr<< dx::exception(&exception, exception.error, __PRETTY_FUNCTION__, __FILE__, __LINE__)<< std::endl;,) void pump_in() noexcept try
 data driven streaming in
 
 __dx_catchall (this->started=0;std::cerr<< dx::exception(&exception, exception.error, __PRETTY_FUNCTION__, __FILE__, __LINE__)<< std::endl;,) void pump_out() noexcept try
 data driven streaming out
 
 catch (...)
 
 catch (...)
 
 catch (...)
 
 catch (...)
 
 catch (...)
 
 catch (const dx::exception &__dx_exception)
 
 catch (const dx::exception &__dx_exception)
 
 catch (const dx::exception &__dx_exception)
 
 catch (const dx::exception &__dx_exception)
 
 catch (const dx::exception &__dx_exception)
 
 catch (const std::exception &__std_exception)
 
 catch (const std::exception &__std_exception)
 
 catch (const std::exception &__std_exception)
 
 catch (const std::exception &__std_exception)
 
 catch (const std::exception &__std_exception)
 
 dx_catchall_handler (this,) ~pipe() noexcept override
 
float encoder (dx::stream::encoder::index::type type, unsigned int index) const override
 
bool encoder (dx::stream::encoder::index::type type, unsigned int index, float value) override
 
void exception (const dx::exception &exception, bool filtered=false) noexcept override
 
void halt () noexcept override
 
void info (std::ostream &os) noexcept override try
 
void initialize () override
 
void initialize (uint32_t packet_size, uint32_t micro_frames)
 
void initialize (uint32_t samplerate, uint32_t line_size, uint32_t micro_frames, bool implicit_feedback)
 
void received (os_result status, size_t size) override try
 
void received (os_result status, size_t size, int64_t timestamp, usb::isoc::frame *frame) override try
 async isoc read callback
 
bool start (uint64_t frame, unsigned int starting=1) override try
 
void transmitted (os_result status, size_t size) override try
 async write callback
 
void transmitted (os_result status, size_t size, int64_t timestamp, usb::isoc::frame *) override try
 async isoc write callback
 
void watchdog () noexcept try
 observer watchdog thread: for clock driven endpoints
 

Protected Attributes

struct { 
 
   volatile uint32_t   completion 
 
   os_result   status 
 streaming status for observer thread More...
 
   uint32_t   submit 
 
async 
 
struct dx::usb::stream::pipe::cache cache
 
struct dx::usb::stream::pipe::isoc isoc
 
struct { 
 
   struct { 
 
      unsigned int   ticks 
 
      struct { 
 
         unsigned int   count 
 
      }   transaction 
 
   }   cycle 
 
sync 
 
struct dx::usb::audio::isoc::cycle::tick * tick = nullptr
 

Friends

class pause
 

Member Function Documentation

◆ __dx_catchall() [1/3]

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
dx::usb::stream::pipe< device_t, circular_t, stream_t >::__dx_catchall ( this-> started = 0; std::cerr<< dx::exception(&exceptionexception.error__PRETTY_FUNCTION__, __FILE__, __LINE__)<< std::endl;)
inlineprotected

creates this->circular streaming backing store and frame buffers

◆ __dx_catchall() [2/3]

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
dx::usb::stream::pipe< device_t, circular_t, stream_t >::__dx_catchall ( this-> started = 0; std::cerr<< dx::exception(&exceptionexception.error__PRETTY_FUNCTION__, __FILE__, __LINE__)<< std::endl;)
inlineprotectednoexcept

data driven streaming in

postponed

◆ __dx_catchall() [3/3]

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
dx::usb::stream::pipe< device_t, circular_t, stream_t >::__dx_catchall ( this-> started = 0; std::cerr<< dx::exception(&exceptionexception.error__PRETTY_FUNCTION__, __FILE__, __LINE__)<< std::endl;)
inlineprotectednoexcept

data driven streaming out

◆ catch() [1/15]

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
dx::usb::stream::pipe< device_t, circular_t, stream_t >::catch ( ...)
inlineprotected

◆ catch() [2/15]

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
dx::usb::stream::pipe< device_t, circular_t, stream_t >::catch ( ...)
inlineprotected

◆ catch() [3/15]

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
dx::usb::stream::pipe< device_t, circular_t, stream_t >::catch ( ...)
inlineprotected

◆ catch() [4/15]

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
dx::usb::stream::pipe< device_t, circular_t, stream_t >::catch ( ...)
inlineprotected

◆ catch() [5/15]

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
dx::usb::stream::pipe< device_t, circular_t, stream_t >::catch ( ...)
inlineprotected

◆ catch() [6/15]

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
dx::usb::stream::pipe< device_t, circular_t, stream_t >::catch ( const dx::exception & __dx_exception)
inlineprotected

◆ catch() [7/15]

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
dx::usb::stream::pipe< device_t, circular_t, stream_t >::catch ( const dx::exception & __dx_exception)
inlineprotected

◆ catch() [8/15]

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
dx::usb::stream::pipe< device_t, circular_t, stream_t >::catch ( const dx::exception & __dx_exception)
inlineprotected

◆ catch() [9/15]

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
dx::usb::stream::pipe< device_t, circular_t, stream_t >::catch ( const dx::exception & __dx_exception)
inlineprotected

◆ catch() [10/15]

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
dx::usb::stream::pipe< device_t, circular_t, stream_t >::catch ( const dx::exception & __dx_exception)
inlineprotected

◆ catch() [11/15]

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
dx::usb::stream::pipe< device_t, circular_t, stream_t >::catch ( const std::exception & __std_exception)
inlineprotected

◆ catch() [12/15]

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
dx::usb::stream::pipe< device_t, circular_t, stream_t >::catch ( const std::exception & __std_exception)
inlineprotected

◆ catch() [13/15]

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
dx::usb::stream::pipe< device_t, circular_t, stream_t >::catch ( const std::exception & __std_exception)
inlineprotected

◆ catch() [14/15]

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
dx::usb::stream::pipe< device_t, circular_t, stream_t >::catch ( const std::exception & __std_exception)
inlineprotected

◆ catch() [15/15]

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
dx::usb::stream::pipe< device_t, circular_t, stream_t >::catch ( const std::exception & __std_exception)
inlineprotected

◆ dx_catchall_handler()

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
dx::usb::stream::pipe< device_t, circular_t, stream_t >::dx_catchall_handler ( this )
inlineoverrideprotectednoexcept

◆ encoder() [1/2]

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
float dx::usb::stream::pipe< device_t, circular_t, stream_t >::encoder ( dx::stream::encoder::index::type type,
unsigned int index ) const
inlineoverrideprotected

◆ encoder() [2/2]

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
bool dx::usb::stream::pipe< device_t, circular_t, stream_t >::encoder ( dx::stream::encoder::index::type type,
unsigned int index,
float value )
inlineoverrideprotected

◆ exception()

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
void dx::usb::stream::pipe< device_t, circular_t, stream_t >::exception ( const dx::exception & exception,
bool filtered = false )
inlineoverrideprotectednoexcept

◆ halt()

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
void dx::usb::stream::pipe< device_t, circular_t, stream_t >::halt ( )
inlineoverrideprotectednoexcept

◆ info()

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
void dx::usb::stream::pipe< device_t, circular_t, stream_t >::info ( std::ostream & os)
inlineoverrideprotectednoexcept
+ Here is the call graph for this function:

◆ initialize() [1/3]

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
void dx::usb::stream::pipe< device_t, circular_t, stream_t >::initialize ( )
inlineoverrideprotected

generates isoc cycle metrics from sample rate,

requests buffers to fit at least 3x max iosize with isoc cycle size granularity

update max frame size

Todo
reset max frame size when pipe is closed
+ Here is the call graph for this function:

◆ initialize() [2/3]

void dx::usb::audio::isoc::cycle::initialize ( uint32_t packet_size,
uint32_t micro_frames )
inlineinherited

◆ initialize() [3/3]

void dx::usb::audio::isoc::cycle::initialize ( uint32_t samplerate,
uint32_t line_size,
uint32_t micro_frames,
bool implicit_feedback )
inlineinherited
+ Here is the call graph for this function:

◆ received() [1/2]

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
void dx::usb::stream::pipe< device_t, circular_t, stream_t >::received ( os_result status,
size_t size )
inlineoverrideprotected
Todo
evaluate non-transaction size transmit handling
Todo
log async write callback

generates timestamp

+ Here is the call graph for this function:

◆ received() [2/2]

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
void dx::usb::stream::pipe< device_t, circular_t, stream_t >::received ( os_result status,
size_t size,
int64_t timestamp,
usb::isoc::frame * frame )
inlineoverrideprotected

async isoc read callback

Todo
usb::stream::pipe::received(): evaluate checking for valid sizes
+ Here is the call graph for this function:

◆ start()

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
bool dx::usb::stream::pipe< device_t, circular_t, stream_t >::start ( uint64_t frame,
unsigned int starting = 1 )
inlineoverrideprotected

estimate upcoming timestamp

scheduling all but one isoc requests at least 1 sequence ahead; aligned to whole cycles,

◆ transmitted() [1/2]

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
void dx::usb::stream::pipe< device_t, circular_t, stream_t >::transmitted ( os_result status,
size_t size )
inlineoverrideprotected

async write callback

Todo
evaluate non-transaction size transmit handling
Todo
log async write callback
Todo
evaluate transaction size vs. ring buffer read size
Todo
USB HW clock support: hardcoded to USB/out - needs to be handled by clock class

generates timestamp

+ Here is the call graph for this function:

◆ transmitted() [2/2]

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
void dx::usb::stream::pipe< device_t, circular_t, stream_t >::transmitted ( os_result status,
size_t size,
int64_t timestamp,
usb::isoc::frame *  )
inlineoverrideprotected

async isoc write callback

Todo
usb::stream::pipe::received(): evaluate checking for valid sizes
Todo
USB HW clock support: hardcoded to USB/out - needs to be handled by clock class
+ Here is the call graph for this function:

◆ watchdog()

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
void dx::usb::stream::pipe< device_t, circular_t, stream_t >::watchdog ( )
inlineprotectednoexcept

observer watchdog thread: for clock driven endpoints

Todo
usb::stream::pipe::thread(): evaluate to bail out @ async.status
+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ pause

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
friend class pause
friend

Member Data Documentation

◆ [struct]

struct { ... } dx::usb::stream::pipe< device_t, circular_t, stream_t >::async

◆ cache

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
struct dx::usb::stream::pipe::cache dx::usb::stream::pipe< device_t, circular_t, stream_t >::cache
protected

◆ completion

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
volatile uint32_t dx::usb::stream::pipe< device_t, circular_t, stream_t >::completion

◆ count

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
unsigned int dx::usb::stream::pipe< device_t, circular_t, stream_t >::count

◆ [struct]

struct { ... } dx::usb::stream::pipe< device_t, circular_t, stream_t >::cycle

◆ isoc

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
struct dx::usb::stream::pipe::isoc dx::usb::stream::pipe< device_t, circular_t, stream_t >::isoc
protected

◆ status

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
os_result dx::usb::stream::pipe< device_t, circular_t, stream_t >::status

streaming status for observer thread

◆ submit

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
uint32_t dx::usb::stream::pipe< device_t, circular_t, stream_t >::submit

◆ [struct]

struct { ... } dx::usb::stream::pipe< device_t, circular_t, stream_t >::sync

◆ tick

struct dx::usb::audio::isoc::cycle::tick* dx::usb::audio::isoc::cycle::tick = nullptr
inherited

◆ ticks

template<typename device_t , typename circular_t = dx::circular, template< typename ... > typename stream_t = dx::stream::stream>
unsigned int dx::usb::stream::pipe< device_t, circular_t, stream_t >::ticks

◆ [struct]

struct { ... } dx::usb::stream::pipe< device_t, circular_t, stream_t >::transaction

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

(c) copyright 2009 dynamic acoustics e.U. generated on Fri Oct 10 2025

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.