dxd - dynax driver framework 2.1.0d48
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::usb::stream::pipe< desc_t, circular_t > Class Template Referenceabstract

#include <dx_stream_usb_device.h>

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

Classes

struct  cache
 
struct  isoc
 

Public Types

enum class  type : uint8_t {
  control =::kUSBControl , isoc = ::kUSBIsoc , bulk = ::kUSBBulk , irq = ::kUSBInterrupt ,
  control =::UsbdPipeTypeControl , isoc = ::UsbdPipeTypeIsochronous , bulk = ::UsbdPipeTypeBulk , irq = ::UsbdPipeTypeInterrupt
}
 
enum class  type : unsigned char {
  control =::kUSBControl , isoc = ::kUSBIsoc , bulk = ::kUSBBulk , irq = ::kUSBInterrupt ,
  control =::UsbdPipeTypeControl , isoc = ::UsbdPipeTypeIsochronous , bulk = ::UsbdPipeTypeBulk , irq = ::UsbdPipeTypeInterrupt
}
 

Public Member Functions

pipeabort () try
 
pipeabort () try
 
 dx_catchall_rethrow () os_result status() const noexcept
 
 dx_catchall_rethrow (;,"endpoint:%x interface:%d setting:%d", endpoint.address, endpoint.interface, endpoint.setting) bool in() const noexcept
 
 dx_catchall_rethrow (try {clear();} dx_catchall(), "handle:%p idx:%d EP:%02x data:%p size:%lld", winusb.handle, idx, address, data, size) template< typename data_t > pipe &operator<<(const data_t &data)
 
 dx_catchall_rethrow (try {clear();} dx_catchall(), "handle:%p idx:%d EP:%02x data:%p size:%lld", winusb.handle, idx, address, data, size) template< typename data_t > pipe &operator>>(data_t &data)
 
 dx_catchall_rethrow (try {clear();} dx_catchall(), "idx:%d EP:%02x", idx, address) pipe &clear() try
 
 dx_catchall_rethrow (try {const_cast< pipe * >(this) ->clear();} dx_catchall_handler(this,), "idx:%d size:%lld", idx, sizeof request) template< typename data_t > data_t submit(const control &control) const
 control request to pipe
 
 if (tx==max) tx=0
 
bool in () const noexcept
 bus initializer (isoc, bulk, pci, etc.) compatibility
 
pipeinfo () noexcept
 
eventinitialize (::HKEY registry, ::DWORD filter=REG_NOTIFY_CHANGE_NAME|REG_NOTIFY_CHANGE_ATTRIBUTES|REG_NOTIFY_CHANGE_LAST_SET|REG_NOTIFY_CHANGE_SECURITY, bool subtree=true)
 
eventinitialize (bool signalled)
 
pipemax_frame_size (uint32_t frame_size)
 
 operator const os_event () const noexcept
 
 operator os_event () noexcept
 
 operator::HANDLE () const noexcept
 
template<typename data_t >
pipeoperator<< (const data_t &data)
 synchronous USB write request
 
template<typename data_t >
pipeoperator>> (data_t &data)
 synchronous USB read request
 
piperead (void *data, size_t size) try
 synchronous USB read request
 
pipereceive (void *data, size_t size) try
 asynchronous USB read request
 
void reset ()
 
template<typename data_t >
pipesubmit (const request< data_t > &request) const try
 standard request to pipe
 
void wait (int64_t timeout=0)
 
pipewrite (const void *data, size_t size) try
 synchronous USB write request
 

Static Public Member Functions

static void wait (::HANDLE handle, int64_t timeout=0)
 

Public Attributes

const struct dx::usb::pipe::attributes & attributes = reinterpret_cast<const struct attributes&>(bmAttributes)
 
std::deque< union audio::descriptor::endpointaudio
 
device_t & device
 
uint64_t ::USBD_ISO_PACKET_DESCRIPTOR * frame
 
uint64_tsequence
 
return * this
 
 tx
 
enum dx::usb::platform::pipe::type type
 

Protected Types

typedef struct desc_t::stream desc
 

Protected Member Functions

template<unsigned int channels, typename channel_t >
pipeattach (channel_t **io[2], uint64_t channel_map[(channels+63)/64])
 
 dx_assert_discard (size==cache.transaction_size? ok:invalid)
 
 dx_catchall_rethrow ()
 
 dx_catchall_rethrow ()
 
 dx_catchall_rethrow () void received(os_result status
 async isoc read callback
 
 dx_catchall_rethrow () void transmitted(os_result status
 async write callback
 
 dx_catchall_rethrow (async.status=exception.error;this->signal();) pipe &flush() noexcept
 
 dx_catchall_rethrow (isoc_housekeeping(exception.error, circular->tx, timestamp);) void transmitted(os_result status
 async isoc write callback
 
virtual float encoder (dx::stream::encoder::index::type type, unsigned int index) const
 
virtual bool encoder (dx::stream::encoder::index::type type, unsigned int index, float value)
 
virtual void exception (const dx::exception &exception, bool filtered=false) const noexcept
 
virtual void exception (const dx::exception &exception, bool filtered=false) const noexcept
 
 if (!cache.buffered||config.transaction.vendor)
 
 if (!sync.cycle.transaction.count--)
 generates timestamp
 
 if (cache.monitor)
 
 if (cache.monitor)
 
 if (started &&config.clock.domain) if(cache.buffered)
 
 if (started)
 
 if (started)
 
 if (status) async.status
 
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)
 
 isoc_housekeeping (status, circular->rx, timestamp)
 
 isoc_housekeeping (status, circular->tx, timestamp)
 
uint32_t latency () noexcept
 
 operator circular_t * () const noexcept
 
circular_t * operator-> () const noexcept
 
 pipe (usb::stream::device< desc_t > &device, const desc &desc)
 creates circular streaming backing store and frame buffers
 
void received (os_result status, size_t size) override try
 virtual async callbacks
 
virtual void received (os_result, size_t, int64_t, usb::isoc::frame *)
 
virtual uint32_t samplerate () try
 provisional sample rate handler: needs to move into clock class
 
virtual void samplerate (uint32_t samplerate) try
 
this signal ()
 
void start (unsigned int starting=1) override try
 async IO thread control (required for Windows compatibility)
 
unsigned int stop (bool force=false) noexcept override
 
virtual uint8_t submit (dx::stream::encoder::index::type type, unsigned int index) const
 
virtual bool submit (dx::stream::encoder::index::type type, unsigned int index, uint8_t value)
 submit encoder stage to device return true if successfully submitted; if false is returned the encode state machine will not update the stage value (i.e. if the stage can't be submitted during streaming pause), given the chance to submit the stage at start().
 
 switch (status)
 
virtual void transmitted (os_result, size_t)
 
virtual void transmitted (os_result, size_t)
 
virtual void transmitted (os_result, size_t, int64_t, usb::isoc::frame *)
 
virtual void transmitted (os_result, size_t, int64_t, usb::isoc::frame *)
 
 ~pipe () noexcept override
 

Protected Attributes

struct { 
 
address 
 
uint8_t address = 0
 
struct { 
 
   uint32_t   ahead 
 
   volatile uint32_t   completion 
 
   os_result   status 
 bytes ahead in streaming buffer due to pre-scheduled async requests More...
 
   uint32_t   submit 
 
async 
 
struct dx::usb::stream::pipe::cache cache
 
circular_t * circular = nullptr
 
async completion = async.completion? async.completion- 1: ticks- 1
 
auto & config = this->config[0]
 
 else
 
uint8_t idx = 0
 
interface_t & interface
 
struct dx::usb::stream::pipe::isoc isoc
 
::HANDLE process = ::GetCurrentProcess()
 
auto reference = circular->rx
 
size_t size
 
std::recursive_mutex start_stop_in_progress
 start/stop operation in progress
 
dx_catchall_rethrow(isoc_housekeeping(exception.error, circular->rx, timestamp);) void exception(const dx std::atomic< int > started {}
 data driven streaming out / observer watchdog thread
 
struct { 
 
   struct { 
 
      unsigned int   ticks 
 
      struct { 
 
         unsigned int   count 
 
      }   transaction 
 
   }   cycle 
 
sync 
 
struct dx::usb::audio::isoc::cycle::tick * tick = nullptr
 
size_t int64_t timestamp
 
size_t size override try
 
size_t int64_t usb::isoc::frame *frame override try
 
size_t int64_t usb::isoc::frame *override try
 
struct { 
 
   ::WINUSB_INTERFACE_HANDLE   handle 
 
winusb 
 

Friends

class pause
 
class usb::stream::pin< desc_t, circular_t, usb::stream::device< desc_t > >
 

Member Typedef Documentation

◆ desc

template<typename desc_t , typename circular_t >
typedef struct desc_t::stream dx::usb::stream::pipe< desc_t, circular_t >::desc
protected

Member Enumeration Documentation

◆ type [1/2]

template<typename device_t , typename interface_t >
enum class enum dx::usb::platform::pipe::type dx::usb::platform::pipe< device_t, interface_t >::type
stronginherited
Enumerator
control 
isoc 
bulk 
irq 
control 
isoc 
bulk 
irq 

◆ type [2/2]

template<typename device_t , typename interface_t >
enum class dx::usb::platform::pipe::type : unsigned char
stronginherited
Enumerator
control 
isoc 
bulk 
irq 
control 
isoc 
bulk 
irq 

Constructor & Destructor Documentation

◆ pipe()

template<typename desc_t , typename circular_t >
dx::usb::stream::pipe< desc_t, circular_t >::pipe ( usb::stream::device< desc_t > & device,
const desc & desc )
inlineprotected

creates circular streaming backing store and frame buffers

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:

◆ ~pipe()

template<typename desc_t , typename circular_t >
dx::usb::stream::pipe< desc_t, circular_t >::~pipe ( )
inlineoverrideprotectedvirtualnoexcept

Reimplemented from dx::usb::pipe< device_t >.

Member Function Documentation

◆ abort() [1/2]

template<typename device_t , typename interface_t >
pipe & dx::usb::platform::pipe< device_t, interface_t >::abort ( )
inlineinherited

◆ abort() [2/2]

template<typename device_t , typename interface_t >
pipe & dx::usb::platform::pipe< device_t, interface_t >::abort ( )
inlineinherited

◆ attach()

template<typename desc_t , typename circular_t >
template<unsigned int channels, typename channel_t >
pipe & dx::usb::stream::pipe< desc_t, circular_t >::attach ( channel_t ** io[2],
uint64_t channel_map[(channels+63)/64] )
inlineprotected

◆ dx_assert_discard()

template<typename desc_t , typename circular_t >
dx::usb::stream::pipe< desc_t, circular_t >::dx_assert_discard ( size = =cache.transaction_size? ok:invalid)
protected

◆ dx_catchall_rethrow() [1/12]

template<typename desc_t , typename circular_t >
dx::usb::stream::pipe< desc_t, circular_t >::dx_catchall_rethrow ( )
protected

◆ dx_catchall_rethrow() [2/12]

template<typename desc_t , typename circular_t >
dx::usb::stream::pipe< desc_t, circular_t >::dx_catchall_rethrow ( )
protected

◆ dx_catchall_rethrow() [3/12]

template<typename device_t , typename interface_t >
dx::usb::platform::pipe< device_t, interface_t >::dx_catchall_rethrow ( ) const
inlinenoexceptinherited

◆ dx_catchall_rethrow() [4/12]

template<typename desc_t , typename circular_t >
dx::usb::stream::pipe< desc_t, circular_t >::dx_catchall_rethrow ( )
protected

async isoc read callback

◆ dx_catchall_rethrow() [5/12]

template<typename desc_t , typename circular_t >
dx::usb::stream::pipe< desc_t, circular_t >::dx_catchall_rethrow ( )
protected

async write callback

◆ dx_catchall_rethrow() [6/12]

template<typename device_t = device>
dx::usb::pipe< device_t >::dx_catchall_rethrow ( ; ,
"endpoint:%x interface:%d setting:%d" ,
endpoint. address,
endpoint. interface,
endpoint. setting ) const
inlinenoexceptinherited

◆ dx_catchall_rethrow() [7/12]

template<typename desc_t , typename circular_t >
dx::usb::stream::pipe< desc_t, circular_t >::dx_catchall_rethrow ( async. status = exception.error; this->signal();) &
inlineprotectednoexcept

◆ dx_catchall_rethrow() [8/12]

template<typename desc_t , typename circular_t >
dx::usb::stream::pipe< desc_t, circular_t >::dx_catchall_rethrow ( isoc_housekeeping(exception.error, circular->tx, timestamp); )
protected

async isoc write callback

◆ dx_catchall_rethrow() [9/12]

template<typename device_t , typename interface_t >
dx::usb::platform::pipe< device_t, interface_t >::dx_catchall_rethrow ( try { clear);} dx_catchall(,
"handle:%p idx:%d EP:%02x data:%p size:%lld" ,
winusb. handle,
idx ,
address ,
data ,
size  ) const &
inlineinherited

◆ dx_catchall_rethrow() [10/12]

template<typename device_t , typename interface_t >
dx::usb::platform::pipe< device_t, interface_t >::dx_catchall_rethrow ( try { clear);} dx_catchall(,
"handle:%p idx:%d EP:%02x data:%p size:%lld" ,
winusb. handle,
idx ,
address ,
data ,
size  ) &
inlineinherited

◆ dx_catchall_rethrow() [11/12]

template<typename device_t , typename interface_t >
dx::usb::platform::pipe< device_t, interface_t >::dx_catchall_rethrow ( try { clear);} dx_catchall(,
"idx:%d EP:%02x" ,
idx ,
address  ) &
inlineinherited

◆ dx_catchall_rethrow() [12/12]

template<typename device_t , typename interface_t >
dx::usb::platform::pipe< device_t, interface_t >::dx_catchall_rethrow ( try {const_cast< pipe< device_t, interface_t > * > this) ->clear();} dx_catchall_handler(this,,
"idx:%d size:%lld" ,
idx ,
sizeof request ) const &
inlineinherited

control request to pipe

◆ encoder() [1/2]

template<typename desc_t , typename circular_t >
virtual float dx::usb::stream::pipe< desc_t, circular_t >::encoder ( dx::stream::encoder::index::type type,
unsigned int index ) const
inlineprotectedvirtual

◆ encoder() [2/2]

template<typename desc_t , typename circular_t >
virtual bool dx::usb::stream::pipe< desc_t, circular_t >::encoder ( dx::stream::encoder::index::type type,
unsigned int index,
float value )
inlineprotectedvirtual

◆ exception() [1/2]

template<typename device_t , typename interface_t >
virtual void dx::usb::platform::pipe< device_t, interface_t >::exception ( const dx::exception & exception,
bool filtered = false ) const
inlineprotectedvirtualnoexceptinherited
+ Here is the call graph for this function:

◆ exception() [2/2]

template<typename device_t , typename interface_t >
virtual void dx::usb::platform::pipe< device_t, interface_t >::exception ( const dx::exception & exception,
bool filtered = false ) const
inlineprotectedvirtualnoexceptinherited
+ Here is the call graph for this function:

◆ if() [1/9]

template<typename desc_t , typename circular_t >
dx::usb::stream::pipe< desc_t, circular_t >::if ( !cache.buffered||config.transaction. vendor)
inlineprotected
Todo
evaluate non-transaction size transmit handling
Todo
log async write callback

◆ if() [2/9]

template<typename desc_t , typename circular_t >
dx::usb::stream::pipe< desc_t, circular_t >::if ( !sync.cycle.transaction.count-- )
inlineprotected

generates timestamp

+ Here is the call graph for this function:

◆ if() [3/9]

template<typename desc_t , typename circular_t >
dx::usb::stream::pipe< desc_t, circular_t >::if ( cache. monitor)
inlineprotected
+ Here is the call graph for this function:

◆ if() [4/9]

template<typename desc_t , typename circular_t >
dx::usb::stream::pipe< desc_t, circular_t >::if ( cache. monitor)
inlineprotected

◆ if() [5/9]

template<typename desc_t , typename circular_t >
dx::usb::stream::pipe< desc_t, circular_t >::if ( started &&config.clock. domain)
inlineprotected
Todo
evaluate transaction size vs. ring buffer read size
+ Here is the call graph for this function:

◆ if() [6/9]

template<typename desc_t , typename circular_t >
dx::usb::stream::pipe< desc_t, circular_t >::if ( started )
inlineprotected
Todo
usb::stream::pipe::received(): evaluate checking for valid sizes
+ Here is the call graph for this function:

◆ if() [7/9]

template<typename desc_t , typename circular_t >
dx::usb::stream::pipe< desc_t, circular_t >::if ( started )
inlineprotected
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:

◆ if() [8/9]

template<typename desc_t , typename circular_t >
dx::usb::stream::pipe< desc_t, circular_t >::if ( status )
protected

◆ if() [9/9]

template<typename device_t , typename interface_t >
dx::usb::platform::pipe< device_t, interface_t >::if ( tx = =max)
pure virtualinherited

◆ in()

template<typename device_t , typename interface_t >
bool dx::usb::platform::pipe< device_t, interface_t >::in ( ) const
inlinenoexceptinherited

bus initializer (isoc, bulk, pci, etc.) compatibility

◆ info()

template<typename device_t = device>
pipe & dx::usb::pipe< device_t >::info ( )
inlinenoexceptinherited

< Bit D7 indicates a requirement for wMaxPacketSize packets.; D7: MaxPacketsOnly

< D1..0: Pitch Control; D3..2: Data Overrun Control; D5..4: Data Underrun Control; D7..6: Reserved. Must be set to 0.

< Indicates the units used for the wLockDelay field: 0: Undefined; 1: Milliseconds; 2: Decoded PCM samples; 3..255: Reserved

< Indicates the time it takes this endpoint to reliably lock its internal clock recovery circuitry. Units used depend on the value of the bLockDelayUnits field.

< Number of Embedded MIDI Jacks: n.

< ID of the n-th Embedded Jack that is associated with this endpoint.

◆ initialize() [1/4]

event & dx::event< dx::kernel >::initialize ( ::HKEY registry,
::DWORD filter = REG_NOTIFY_CHANGE_NAME| REG_NOTIFY_CHANGE_ATTRIBUTES| REG_NOTIFY_CHANGE_LAST_SET| REG_NOTIFY_CHANGE_SECURITY,
bool subtree = true )
inlineinherited

◆ initialize() [2/4]

event & dx::event< dx::kernel >::initialize ( bool signalled)
inlineinherited

◆ initialize() [3/4]

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

◆ initialize() [4/4]

void dx::usb::audio::isoc::cycle::initialize ( uint32_t samplerate,
uint32_t line_size,
uint32_t micro_frames,
bool implicit_feedback )
inlineinherited

◆ isoc_housekeeping() [1/2]

template<typename desc_t , typename circular_t >
dx::usb::stream::pipe< desc_t, circular_t >::isoc_housekeeping ( status ,
circular-> rx,
timestamp  )
protected

◆ isoc_housekeeping() [2/2]

template<typename desc_t , typename circular_t >
dx::usb::stream::pipe< desc_t, circular_t >::isoc_housekeeping ( status ,
circular-> tx,
timestamp  )
protected

◆ latency()

template<typename desc_t , typename circular_t >
uint32_t dx::usb::stream::pipe< desc_t, circular_t >::latency ( )
inlineprotectednoexcept

◆ max_frame_size()

template<typename device_t = device>
pipe & dx::usb::pipe< device_t >::max_frame_size ( uint32_t frame_size)
inlineinherited

◆ operator circular_t *()

template<typename desc_t , typename circular_t >
dx::usb::stream::pipe< desc_t, circular_t >::operator circular_t * ( ) const
inlineprotectednoexcept

◆ operator const os_event()

template<::HANDLE invalid_t = INVALID_HANDLE_VALUE>
dx::object< invalid_t >::operator const os_event ( ) const
inlinenoexceptinherited

◆ operator os_event()

template<::HANDLE invalid_t = INVALID_HANDLE_VALUE>
dx::object< invalid_t >::operator os_event ( )
inlinenoexceptinherited

◆ operator->()

template<typename desc_t , typename circular_t >
circular_t * dx::usb::stream::pipe< desc_t, circular_t >::operator-> ( ) const
inlineprotectednoexcept

◆ operator::HANDLE()

template<::HANDLE invalid_t = INVALID_HANDLE_VALUE>
dx::object< invalid_t >::operator::HANDLE ( ) const
inlinenoexceptinherited

◆ operator<<()

template<typename device_t = device>
template<typename data_t >
pipe & dx::usb::pipe< device_t >::operator<< ( const data_t & data)
inlineinherited

synchronous USB write request

◆ operator>>()

template<typename device_t = device>
template<typename data_t >
pipe & dx::usb::pipe< device_t >::operator>> ( data_t & data)
inlineinherited

synchronous USB read request

◆ read()

template<typename device_t , typename interface_t >
pipe & dx::usb::platform::pipe< device_t, interface_t >::read ( void * data,
size_t size )
inlineinherited

synchronous USB read request

◆ receive()

template<typename device_t , typename interface_t >
pipe & dx::usb::platform::pipe< device_t, interface_t >::receive ( void * data,
size_t size )
inlineinherited

asynchronous USB read request

◆ received() [1/2]

template<typename desc_t , typename circular_t >
void dx::usb::stream::pipe< desc_t, circular_t >::received ( os_result ,
size_t  )
inlineoverrideprotectedvirtual

virtual async callbacks

Todo
evaluate non-transaction size transmit handling
Todo
log async write callback
Todo
validate rx non-clock domain handling
Todo
evaluate transaction size vs. ring buffer write size

generates timestamp

Reimplemented from dx::usb::platform::pipe< device_t, interface_t >.

+ Here is the call graph for this function:

◆ received() [2/2]

template<typename device_t , typename interface_t >
virtual void dx::usb::platform::pipe< device_t, interface_t >::received ( os_result ,
size_t ,
int64_t ,
usb::isoc::frame *  )
inlineprotectedvirtualinherited

◆ reset()

void dx::event< dx::kernel >::reset ( )
inlineinherited

◆ samplerate() [1/2]

template<typename desc_t , typename circular_t >
virtual uint32_t dx::usb::stream::pipe< desc_t, circular_t >::samplerate ( )
inlineprotectedvirtual

provisional sample rate handler: needs to move into clock class

Todo
reference dedicated usb::stream::device::clock class

◆ samplerate() [2/2]

template<typename desc_t , typename circular_t >
virtual void dx::usb::stream::pipe< desc_t, circular_t >::samplerate ( uint32_t samplerate)
inlineprotectedvirtual

◆ signal()

template<typename desc_t , typename circular_t >
this dx::usb::stream::pipe< desc_t, circular_t >::signal ( )
protected

◆ start()

template<typename desc_t , typename circular_t >
void dx::usb::stream::pipe< desc_t, circular_t >::start ( unsigned int = 1)
inlineoverrideprotectedvirtual

async IO thread control (required for Windows compatibility)

estimate upcoming timestamp

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

Reimplemented from dx::usb::platform::pipe< device_t, interface_t >.

◆ stop()

template<typename desc_t , typename circular_t >
unsigned int dx::usb::stream::pipe< desc_t, circular_t >::stop ( bool force = false)
inlineoverrideprotectedvirtualnoexcept

◆ submit() [1/3]

template<typename device_t , typename interface_t >
template<typename data_t >
pipe & dx::usb::platform::pipe< device_t, interface_t >::submit ( const request< data_t > & request) const
inlineinherited

standard request to pipe

◆ submit() [2/3]

template<typename desc_t , typename circular_t >
virtual uint8_t dx::usb::stream::pipe< desc_t, circular_t >::submit ( dx::stream::encoder::index::type type,
unsigned int index ) const
inlineprotectedvirtual

◆ submit() [3/3]

template<typename desc_t , typename circular_t >
virtual bool dx::usb::stream::pipe< desc_t, circular_t >::submit ( dx::stream::encoder::index::type type,
unsigned int index,
uint8_t value )
inlineprotectedvirtual

submit encoder stage to device return true if successfully submitted; if false is returned the encode state machine will not update the stage value (i.e. if the stage can't be submitted during streaming pause), given the chance to submit the stage at start().

◆ switch()

template<typename desc_t , typename circular_t >
dx::usb::stream::pipe< desc_t, circular_t >::switch ( status )
inlineprotected

◆ transmitted() [1/4]

template<typename device_t , typename interface_t >
virtual void dx::usb::platform::pipe< device_t, interface_t >::transmitted ( os_result ,
size_t  )
inlineprotectedvirtualinherited

◆ transmitted() [2/4]

template<typename device_t , typename interface_t >
virtual void dx::usb::platform::pipe< device_t, interface_t >::transmitted ( os_result ,
size_t  )
inlineprotectedvirtualinherited

◆ transmitted() [3/4]

template<typename device_t , typename interface_t >
virtual void dx::usb::platform::pipe< device_t, interface_t >::transmitted ( os_result ,
size_t ,
int64_t ,
usb::isoc::frame *  )
inlineprotectedvirtualinherited

◆ transmitted() [4/4]

template<typename device_t , typename interface_t >
virtual void dx::usb::platform::pipe< device_t, interface_t >::transmitted ( os_result ,
size_t ,
int64_t ,
usb::isoc::frame *  )
inlineprotectedvirtualinherited

◆ wait() [1/2]

static void dx::event< dx::kernel >::wait ( ::HANDLE handle,
int64_t timeout = 0 )
inlinestaticinherited

◆ wait() [2/2]

void dx::event< dx::kernel >::wait ( int64_t timeout = 0)
inlineinherited
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ write()

template<typename device_t , typename interface_t >
pipe & dx::usb::platform::pipe< device_t, interface_t >::write ( const void * data,
size_t size )
inlineinherited

synchronous USB write request

Friends And Related Symbol Documentation

◆ pause

template<typename desc_t , typename circular_t >
friend class pause
friend

◆ usb::stream::pin< desc_t, circular_t, usb::stream::device< desc_t > >

template<typename desc_t , typename circular_t >
friend class usb::stream::pin< desc_t, circular_t, usb::stream::device< desc_t > >
friend

Member Data Documentation

◆ [struct] [1/2]

struct { ... } dx::usb::platform::pipe< device_t, interface_t >::address

◆ address [2/2]

template<typename device_t , typename interface_t >
uint8_t dx::usb::platform::pipe< device_t, interface_t >::address = 0
protectedinherited

◆ ahead

template<typename desc_t , typename circular_t >
uint32_t dx::usb::stream::pipe< desc_t, circular_t >::ahead

◆ [struct]

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

◆ attributes

template<typename device_t = device>
const struct dx::usb::pipe::attributes& dx::usb::pipe< device_t >::attributes = reinterpret_cast<const struct attributes&>(bmAttributes)
inherited

◆ audio

std::deque<union audio::descriptor::endpoint> dx::usb::__::endpoint::audio
inherited

◆ [class]

class { ... } ::buffer dx::usb::platform::pipe< device_t, interface_t >::buffer

◆ cache

template<typename desc_t , typename circular_t >
struct dx::usb::stream::pipe::cache dx::usb::stream::pipe< desc_t, circular_t >::cache
protected

◆ circular

template<typename desc_t , typename circular_t >
circular_t* dx::usb::stream::pipe< desc_t, circular_t >::circular = nullptr
protected

◆ completion [1/2]

template<typename desc_t , typename circular_t >
volatile uint32_t dx::usb::stream::pipe< desc_t, circular_t >::completion

◆ completion [2/2]

template<typename desc_t , typename circular_t >
async dx::usb::stream::pipe< desc_t, circular_t >::completion = async.completion? async.completion- 1: ticks- 1
protected

◆ config

template<typename desc_t , typename circular_t >
auto& dx::usb::stream::pipe< desc_t, circular_t >::config = this->config[0]
protected

◆ count

template<typename desc_t , typename circular_t >
unsigned int dx::usb::stream::pipe< desc_t, circular_t >::count

◆ [struct]

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

◆ device

template<typename device_t , typename interface_t >
device_t & dx::usb::platform::pipe< device_t, interface_t >::device
inherited

◆ else

template<typename desc_t , typename circular_t >
dx::usb::stream::pipe< desc_t, circular_t >::else
protected
Initial value:
{
this->transmit(circular->template simulate_read<>(cache.transaction_size), size)
circular_t * circular
Definition dx_stream_usb_device.h:379
struct dx::usb::stream::pipe::cache cache
size_t transaction_size
Definition dx_stream_usb_device.h:402

◆ frame

template<typename device_t , typename interface_t >
uint64_t ::USBD_ISO_PACKET_DESCRIPTOR* dx::usb::platform::pipe< device_t, interface_t >::frame
inherited

◆ handle

template<typename device_t , typename interface_t >
::WINUSB_INTERFACE_HANDLE dx::usb::platform::pipe< device_t, interface_t >::handle
inherited

◆ idx

template<typename device_t , typename interface_t >
uint8_t dx::usb::platform::pipe< device_t, interface_t >::idx = 0
protectedinherited

◆ interface

template<typename device_t , typename interface_t >
interface_t & dx::usb::platform::pipe< device_t, interface_t >::interface
protectedinherited

◆ isoc

template<typename desc_t , typename circular_t >
struct dx::usb::stream::pipe::isoc dx::usb::stream::pipe< desc_t, circular_t >::isoc
protected

◆ micro_frames

template<typename device_t , typename interface_t >
unsigned int dx::usb::platform::pipe< device_t, interface_t >::micro_frames = 0
inherited

◆ process

template<::HANDLE invalid_t = INVALID_HANDLE_VALUE>
::HANDLE dx::object< invalid_t >::process = ::GetCurrentProcess()
protectedinherited

◆ reference

template<typename desc_t , typename circular_t >
auto dx::usb::stream::pipe< desc_t, circular_t >::reference = circular->rx
protected

◆ sequence

template<typename device_t , typename interface_t >
uint64_t& dx::usb::platform::pipe< device_t, interface_t >::sequence
inherited

◆ size

template<typename desc_t , typename circular_t >
size_t dx::usb::stream::pipe< desc_t, circular_t >::size
protected

◆ start_stop_in_progress

template<typename desc_t , typename circular_t >
std::recursive_mutex dx::usb::stream::pipe< desc_t, circular_t >::start_stop_in_progress
protected

start/stop operation in progress

◆ started

template<typename desc_t , typename circular_t >
dx_catchall_rethrow (isoc_housekeeping(exception.error, circular->rx, timestamp);) void exception( const dx std::atomic<int> dx::usb::stream::pipe< desc_t, circular_t >::started {}
protected

data driven streaming out / observer watchdog thread

◆ status

template<typename desc_t , typename circular_t >
os_result dx::usb::stream::pipe< desc_t, circular_t >::status

bytes ahead in streaming buffer due to pre-scheduled async requests

streaming status for observer thread

◆ submit

template<typename desc_t , typename circular_t >
uint32_t dx::usb::stream::pipe< desc_t, circular_t >::submit

◆ [struct]

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

◆ this

template<typename device_t , typename interface_t >
return* dx::usb::platform::pipe< device_t, interface_t >::this
inherited

◆ tick

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

◆ ticks

template<typename desc_t , typename circular_t >
unsigned int dx::usb::stream::pipe< desc_t, circular_t >::ticks

◆ timestamp

template<typename desc_t , typename circular_t >
size_t int64_t dx::usb::stream::pipe< desc_t, circular_t >::timestamp
protected

◆ [struct]

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

◆ try [1/3]

template<typename desc_t , typename circular_t >
size_t size override dx::usb::stream::pipe< desc_t, circular_t >::try
protected
Initial value:
{
size_t int64_t timestamp
Definition dx_stream_usb_device.h:541
int64_t timestamp(int64_t time, scale scale=nsec)
macOS: time to timestamp (clock ticks) converter
Definition macOS/dx_sync.h:68

◆ try [2/3]

template<typename desc_t , typename circular_t >
size_t int64_t usb::isoc::frame* frame override dx::usb::stream::pipe< desc_t, circular_t >::try
protected
Initial value:
{
auto& performance= cache.monitor->performance;
performance[dx::stream::clock::monitor::isr][dx::stream::clock::monitor::rx]=
circular->tx- circular->rx;
performance[dx::stream::clock::monitor::irq][dx::stream::clock::monitor::rx]=
isoc.sequence- this->frame();
}
auto& tick= this->tick[--async.submit]
uint64_t ::USBD_ISO_PACKET_DESCRIPTOR * frame
Definition windows/dx_usb_device_platform.h:553
struct dx::usb::stream::pipe::isoc isoc
struct dx::usb::stream::pipe::@27 async
struct dx::stream::clock::monitor::@33 performance[levels][types]
Definition dx_usb_audio.h:548
dx::stream::clock::monitor * monitor
Definition dx_stream_usb_device.h:401
uint64_t sequence
Definition dx_stream_usb_device.h:381

◆ try [3/3]

template<typename desc_t , typename circular_t >
size_t int64_t usb::isoc::frame* override dx::usb::stream::pipe< desc_t, circular_t >::try
protected
Initial value:
{
auto& tick= this->tick[--async.submit]
struct dx::usb::audio::isoc::cycle::tick * tick

◆ tx

template<typename device_t , typename interface_t >
dx::usb::platform::pipe< device_t, interface_t >::tx
inherited

◆ type

template<typename device_t , typename interface_t >
enum dx::usb::platform::pipe::type dx::usb::platform::pipe< device_t, interface_t >::type
inherited

◆ [struct]

struct { ... } dx::usb::platform::pipe< device_t, interface_t >::winusb

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

(c) copyright 2009 dynamic acoustics e.U. generated on Fri Feb 23 2024

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.