dxd - dynax driver framework 3.0.1d223
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::usb::platform::pipe< device_t, interface_t > Class Template Reference

the platform half of a pipe: the transfers over the interface's endpoint and their completions - an isochronous one queues its result for the group's poll, since a completion counts and never schedules More...

#include <dx_usb_platform_pipe.h>

Inheritance diagram for dx::usb::platform::pipe< device_t, interface_t >:
Collaboration diagram for dx::usb::platform::pipe< device_t, interface_t >:

Classes

struct  isoc
 what an isochronous pipe needs beside its requests: the micro frames a packet is spread over and the registered buffer they are served from More...

Public Types

typedef _device_t device_t
typedef _device_t device_t
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
}
 the transfer type of this pipe, as its endpoint declared it More...

Public Member Functions

pipe & abort ()
pipe & abort ()
virtual void callback ()
pipe & clear ()
pipe & clear (bool force=false)
void conclude () noexcept
void conclude () noexcept
pipe & drain (std::chrono::milliseconds timeout=std::chrono::milliseconds(250)) noexcept
 waits for already-submitted requests to complete on their own, without cancelling them
pipe & drain (std::chrono::milliseconds timeout=std::chrono::milliseconds(250)) noexcept
 waits for already-submitted requests to complete on their own, without cancelling them; consumes the isoc completions itself when no completion thread does - its caller then holds the device lock the group's tick would need, so nobody else polls
void exception (const dx::exception &exception, bool filtered=false) const noexcept override
 notification exception handler
void exception (const dx::exception &exception, bool filtered=false) const noexcept override
 notification exception handler
uint64_t frame (int64_t *timestamp=nullptr)
 current bus frame number; timestamp: dx::timestamp() of the readout
virtual void free () noexcept
virtual void info (std::ostream &os) noexcept
 log object class information
super & initialize (bool signalled=false) override
super & initialize (const std::string &name, bool signalled=false) override
pipe & max_frame_size (uint32_t frame_size)
pipe & max_frame_size (unsigned int frame_size)
 operator const os_event () const noexcept
 operator os_event () noexcept
 operator::HANDLE () const noexcept
template<typename data_t>
pipe & operator<< (const data_t &data)
template<typename data_t>
pipe & operator>> (data_t &data)
bool outstanding () const noexcept
bool outstanding () const noexcept
 pipe (device_t &device, const endpoint &endpoint)
 the runloop queues every isoc completion for poll()
 pipe (device_t &device, const endpoint &endpoint)
 completion: the pipe's own thread delivers the completions via received()/transmitted(); a pipe of a streaming group (desc.group) leaves them to its group's tick (poll())
bool poll (usb::isoc::result &result)
 pulls the oldest outstanding isoc request's result once it has completed
bool poll (usb::isoc::result &result) noexcept
 pulls the oldest completed isoc request's result
pipe & read (void *data, size_t &size)
 synchronous USB read request
pipe & read (void *data, size_t size)
 synchronous USB read request
virtual pipe & receive (void *data, size_t size)
 asynchronous USB read request
pipe & receive (void *data, size_t size)
 asynchronous USB read request
virtual pipe & receive (void *data, uint64_t &sequence, ::IOUSBIsocFrame *frame, int32_t frames=1)
 asynchronous USB isoc read request
pipe & receive (void *data, uint64_t &sequence, ::USBD_ISO_PACKET_DESCRIPTOR *frame, unsigned int frames=1)
 asynchronous USB isoc read request WinUSB limitation no microframe support only multiple of max package size requests allowed, even if only submiting a single package https://docs.microsoft.com/en-us/windows/win32/api/winusb/nf-winusb-winusb_readisochpipe is wrong!
super & reset (uint64_t=0) override
super & signal (uint64_t=1) override
uint64_t signalled () const
uint64_t signalled () const
os_result status () const noexcept
os_result status () const noexcept
template<typename data_t>
data_t submit (const control &control) const
 control request to pipe
template<typename data_t>
data_t submit (const control &control) const
 control request to pipe
template<typename data_t>
pipe & submit (const request< data_t > &request) const
 standard request to pipe
template<typename data_t>
pipe & submit (const request< data_t > &request) const
 standard request to pipe
virtual pipe & transmit (const void *data, size_t &size)
 asynchronous USB write request
pipe & transmit (const void *data, size_t size)
 asynchronous USB write request
virtual pipe & transmit (const void *data, uint64_t &sequence, ::IOUSBIsocFrame *frame, int32_t frames=1)
 asynchronous USB isoc write request
pipe & transmit (const void *data, uint64_t &sequence, ::USBD_ISO_PACKET_DESCRIPTOR *frame, unsigned int frames=1)
 asynchronous USB isoc write request
bool try_conclude () noexcept
 atomically conclude()s if currently launched; returns whether this call did it
bool try_conclude () noexcept
 atomically conclude()s if currently launched; returns whether this call did it
bool try_launch ()
 atomically launch()es if not already launched; returns whether this call did it. A launch() that throws is concluded before the exception leaves: the object never claims a launch it did not finish
bool try_launch ()
 atomically launch()es if not already launched; returns whether this call did it. A launch() that throws is concluded before the exception leaves: the object never claims a launch it did not finish
super & wait (bool reset=false) override
template<typename rep_t, typename period_t>
bool wait (const std::chrono::duration< rep_t, period_t > &timeout, bool reset=false)
template<typename rep_t, typename period_t>
bool wait (const std::chrono::duration< rep_t, period_t > &timeout, bool reset=false)
pipe & write (const void *data, size_t size)
 synchronous USB write request
pipe & write (const void *data, size_t size)
 synchronous USB write request
 ~pipe () noexcept override

Static Public Member Functions

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

Public Attributes

interface_t & interface
std::atomic< bool > launched {}
std::atomic< bool > launched {}
promoted< uint32_t > start
promoted< uint32_t > start
promoted< bool > started
promoted< bool > started
enum dx::usb::platform::pipe::type type

Static Public Attributes

static constexpr auto max {usb::isoc::max_requests}
static constexpr auto scope = kernel

Protected Member Functions

virtual void launch ()
 launch notification: object mounted and ready to use. Called only through try_launch() - never call this directly from outside the class hierarchy.
virtual void received (os_result, size_t)
 virtual async callbacks
virtual void received (os_result, size_t)
 virtual async callbacks
virtual void received (os_result, size_t, int64_t, usb::isoc::frame *)
virtual void received (os_result, size_t, int64_t, usb::isoc::frame *)
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 () override

Protected Attributes

struct dx::usb::platform::pipe:: { ... }  address
uint8_t address {}
usb::isoc::result completed [max]
 isoc completions in callback order, filled by the runloop, drained by poll()
_device_t & device
_device_t & device
std::function< void()> flush_hook
std::function< void()> flush_hook
std::function< void()> halt_hook
std::function< void()> halt_hook
::HANDLE handle {invalid_t}
uint8_t idx = 0
struct dx::usb::platform::pipe:: { ... }  isoc
struct dx::usb::platform::pipe::isoc isoc
::HANDLE process {::GetCurrentProcess()}
std::function< void()> run_hook
std::function< void()> run_hook
volatile unsigned int rx = 0
volatile unsigned int tx = 0
struct dx::usb::platform::pipe:: { ... }  winusb

Detailed Description

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

the platform half of a pipe: the transfers over the interface's endpoint and their completions - an isochronous one queues its result for the group's poll, since a completion counts and never schedules

the platform half of a pipe: up to max outstanding overlapped requests over WinUSB, their completions taken in submission order - the order the controller serves a pipe in

Member Typedef Documentation

◆ device_t [1/2]

template<typename _device_t>
typedef _device_t dx::stream::object< _device_t >::device_t
inherited

◆ device_t [2/2]

template<typename _device_t>
typedef _device_t dx::stream::object< _device_t >::device_t
inherited

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
strong
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
strong

the transfer type of this pipe, as its endpoint declared it

Enumerator
control 
isoc 
bulk 
irq 
control 
isoc 
bulk 
irq 

Constructor & Destructor Documentation

◆ ~pipe() [1/2]

template<typename device_t, typename interface_t>
dx::usb::platform::pipe< device_t, interface_t >::~pipe ( )
inlineoverrideprotected

◆ pipe() [1/2]

template<typename device_t, typename interface_t>
dx::usb::platform::pipe< device_t, interface_t >::pipe ( device_t & device,
const endpoint & endpoint )
inline

the runloop queues every isoc completion for poll()

async IO thread control (required for Windows compatibility)

◆ pipe() [2/2]

template<typename device_t, typename interface_t>
dx::usb::platform::pipe< device_t, interface_t >::pipe ( device_t & device,
const endpoint & endpoint )
inline

completion: the pipe's own thread delivers the completions via received()/transmitted(); a pipe of a streaming group (desc.group) leaves them to its group's tick (poll())

async IO thread control

joins the completion thread once this pipe's last start/stop reference is gone

◆ ~pipe() [2/2]

template<typename device_t, typename interface_t>
dx::usb::platform::pipe< device_t, interface_t >::~pipe ( )
inlineoverridenoexcept

Member Function Documentation

◆ abort() [1/2]

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

◆ abort() [2/2]

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

◆ callback()

virtual void dx::event< kernel >::callback ( )
inlinevirtualinherited

The default implementation is based on event<user> which is signalled when triggered via callback() from kernel. This is to achieve compatibility with Windows events. Its probably more adequate to overwrite callback() and do the work here if feasible.

Here is the call graph for this function:

◆ clear() [1/2]

template<typename device_t, typename interface_t>
pipe & dx::usb::platform::pipe< device_t, interface_t >::clear ( )
inline

◆ clear() [2/2]

template<typename device_t, typename interface_t>
pipe & dx::usb::platform::pipe< device_t, interface_t >::clear ( bool force = false)
inline

◆ conclude() [1/2]

void dx::stream::control< dx::stream::object< device_t > >::conclude ( )
inlinevirtualnoexceptinherited

Reimplemented from dx::object.

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

◆ conclude() [2/2]

void dx::stream::control< stream::object< device_t > >::conclude ( )
inlinevirtualnoexceptinherited

Reimplemented from dx::object.

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

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

◆ drain() [1/2]

template<typename device_t, typename interface_t>
pipe & dx::usb::platform::pipe< device_t, interface_t >::drain ( std::chrono::milliseconds timeout = std::chrono::milliseconds(250))
inlinenoexcept

waits for already-submitted requests to complete on their own, without cancelling them

◆ drain() [2/2]

template<typename device_t, typename interface_t>
pipe & dx::usb::platform::pipe< device_t, interface_t >::drain ( std::chrono::milliseconds timeout = std::chrono::milliseconds(250))
inlinenoexcept

waits for already-submitted requests to complete on their own, without cancelling them; consumes the isoc completions itself when no completion thread does - its caller then holds the device lock the group's tick would need, so nobody else polls

◆ exception() [1/2]

template<typename _device_t>
void dx::stream::object< _device_t >::exception ( const dx::exception & exception,
bool filtered = false ) const
inlineoverridevirtualnoexceptinherited

notification exception handler

Implements dx::object.

Reimplemented in dx::stream::pin< device_t, _circular_t >, and dx::usb::stream::pipe< device_t, circular_t, stream_t >.

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

◆ exception() [2/2]

template<typename _device_t>
void dx::stream::object< _device_t >::exception ( const dx::exception & exception,
bool filtered = false ) const
inlineoverridevirtualnoexceptinherited

notification exception handler

Implements dx::object.

Reimplemented in dx::stream::pin< device_t, _circular_t >, and dx::usb::stream::pipe< device_t, circular_t, stream_t >.

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

◆ frame()

template<typename device_t, typename interface_t>
uint64_t dx::usb::platform::pipe< device_t, interface_t >::frame ( int64_t * timestamp = nullptr)
inline

current bus frame number; timestamp: dx::timestamp() of the readout

◆ free()

◆ info()

virtual void dx::object::info ( std::ostream & os)
inlinevirtualnoexceptinherited

log object class information

Reimplemented in dx::asio::client::_device< desc_t, preference_t, stream_t, group_t >, dx::asio::client::_device< desc, preference, stream< device< desc, preference, stream, group > >, group< device< desc, preference, stream, group > > >, dx::asio::client::_device< desc_t, preference_t, stream_t< device< desc_t, preference_t, stream_t, group_t > >, group_t< device< desc_t, preference_t, stream_t, group_t > > >, dx::asio::client::driver< device_t, devices >, dx::asio::service::device< super_device_t >, dx::coreaudio::_device< desc_t, preference_t, stream_t, group_t >, dx::coreaudio::_device< desc_t, preference_t, stream_t< device< desc_t, preference_t, stream_t, group_t, _hosted > >, group_t< device< desc_t, preference_t, stream_t, group_t, _hosted > > >, dx::coreaudio::_device< dx::virtuel::stream::desc, cf::preference, dx::stream::stream< device< dx::virtuel::stream::desc, cf::preference, dx::stream::stream, group, false > >, group< device< dx::virtuel::stream::desc, cf::preference, dx::stream::stream, group, false > > >, dx::coreaudio::_device< dx::virtuel::stream::desc, cf::preference, stream< device< dx::virtuel::stream::desc, cf::preference, stream, coreaudio::group, false > >, coreaudio::group< device< dx::virtuel::stream::desc, cf::preference, stream, coreaudio::group, false > > >, dx::coreaudio::_device< dx::virtuel::stream::desc, cf::preference, stream< device< dx::virtuel::stream::desc, cf::preference, stream, group, _hosted > >, group< device< dx::virtuel::stream::desc, cf::preference, stream, group, _hosted > > >, dx::coreaudio::driver< device_t >, dx::coreaudio::pod::device< desc_t, preference_t, stream_t, group_t >, dx::coreaudio::stream::device< desc_t, preference_t, stream_t, group_t >, dx::coremidi::_device< desc_t, preference_t, stream_t >, dx::coremidi::_device< desc, cf::preference, stream< device< desc, cf::preference, stream > > >, dx::coremidi::_device< desc_t, preference_t, stream_t< device< desc_t, preference_t, stream_t > > >, dx::coremidi::driver< device_t >, dx::device< id_t, preference_t >, dx::device< dx::guid, preference >, dx::device< std::string, dx::preference >, dx::device< std::string, preference >, dx::device< std::string, preference_t >, dx::device<::AudioObjectID, cf::preference >, dx::device<::io_service_t, dx::preference >, dx::device<::io_service_t, preference_t >, dx::device<::MIDIDeviceRef, cf::preference >, dx::device<>, dx::driver< device_id_t, preference_t >, dx::driver< decltype(_device_t::id), decltype(_device_t::preference)>, dx::driver< decltype(device<>::id), decltype(device<>::preference)>, dx::driver< decltype(id), cf::preference >, dx::driver< decltype(id), dx::preference >, dx::driver< decltype(id), preference >, dx::driver< device_id_t, decltype(device_t::preference)>, dx::map::driver< _device_t, holder_t >, dx::map::driver< device<> >, dx::map::driver< device_t >, dx::map::driver< device_t, dx::apartment< device_t > >, dx::midi::services::_device< desc, preference, stream< device< desc, preference, stream > > >, dx::midi::services::driver< device_t >, dx::proxy::device< preference_t >, dx::proxy::device< preference_t >, dx::proxy::device< dx::preference >, dx::proxy::device<>, dx::proxy::driver< device_t >, dx::proxy::driver< device_t >, dx::proxy::stream::_device< desc_t, preference_t, stream_t, group_t >, dx::proxy::stream::_device< desc_t, preference_t, stream_t< device< desc_t, preference_t, stream_t, group_t > >, group_t< device< desc_t, preference_t, stream_t, group_t > > >, dx::proxy::stream::_device< dx::stream::desc<>, dx::preference, stream< device< dx::stream::desc<>, dx::preference, stream, group > >, group< device< dx::stream::desc<>, dx::preference, stream, group > > >, dx::service::client::_device< desc_t, preference_t, stream_t, group_t >, dx::service::client::_device< desc, preference, stream< device< desc, preference, stream, group > >, group< device< desc, preference, stream, group > > >, dx::service::client::_device< desc_t, preference_t, stream_t< device< desc_t, preference_t, stream_t, group_t > >, group_t< device< desc_t, preference_t, stream_t, group_t > > >, dx::service::client::driver< device_t >, dx::service::device< preference_t >, dx::service::device< preference_t >, dx::service::device< dx::preference >, dx::service::device< super_device_t >, dx::service::device< super_device_t >, dx::stream::device< dx::device< dx::guid, preference >, desc, stream< device< desc, preference, stream, group > >, group< device< desc, preference, stream, group > > >, dx::stream::device< dx::device< dx::guid, preference_t >, desc_t, stream_t, group_t >, dx::stream::device< dx::device< std::string, dx::preference >, desc, dx::stream::shared::stream< device< desc, dx::preference, dx::stream::shared::stream, group > >, group< device< desc, dx::preference, dx::stream::shared::stream, group > > >, dx::stream::device< dx::device< std::string, preference >, desc, stream< device< desc, preference, stream, group > >, group< device< desc, preference, stream, group > > >, dx::stream::device< dx::device< std::string, preference_t >, desc_t, stream_t, group_t >, dx::stream::device< dx::device<::AudioObjectID, cf::preference >, dx::virtuel::stream::desc, dx::stream::stream< device< dx::virtuel::stream::desc, cf::preference, dx::stream::stream, group, false > >, group< device< dx::virtuel::stream::desc, cf::preference, dx::stream::stream, group, false > > >, dx::stream::device< dx::device<::AudioObjectID, cf::preference >, dx::virtuel::stream::desc, stream< device< dx::virtuel::stream::desc, cf::preference, stream, coreaudio::group, false > >, coreaudio::group< device< dx::virtuel::stream::desc, cf::preference, stream, coreaudio::group, false > > >, dx::stream::device< dx::device<::AudioObjectID, cf::preference >, dx::virtuel::stream::desc, stream< device< dx::virtuel::stream::desc, cf::preference, stream, group, _hosted > >, group< device< dx::virtuel::stream::desc, cf::preference, stream, group, _hosted > > >, dx::stream::device< dx::device<::AudioObjectID, preference_t >, desc_t, stream_t, group_t >, dx::stream::device< dx::device<::MIDIDeviceRef, cf::preference >, desc, stream< device< desc, cf::preference, stream > > >, dx::stream::device< dx::device<::MIDIDeviceRef, preference_t >, desc_t, stream_t >, dx::stream::device< dx::proxy::device< dx::preference >, dx::stream::desc<>, stream< device< dx::stream::desc<>, dx::preference, stream, group > >, group< device< dx::stream::desc<>, dx::preference, stream, group > > >, dx::stream::device< dx::proxy::device< preference_t >, desc_t, stream_t, group_t >, dx::stream::device< dx::stream::control< dx::device< std::string, preference > >, desc, stream< device< desc, preference, stream > > >, dx::stream::device< dx::stream::control< dx::device< std::string, preference > >, desc, stream< device< desc, preference, stream, group > >, group< device< desc, preference, stream, group > > >, dx::stream::device< usb::device< dx::preference >, desc_t, pipe< device< desc_t, dx::preference, pipe, group > >, group< device< desc_t, dx::preference, pipe, group > > >, dx::stream::device< usb::device< preference_t >, desc_t, stream_t, group_t >, dx::stream::driver< dx::map::driver< device<> > >, dx::stream::driver< dx::map::driver< device_t > >, dx::stream::driver< map::driver< device_t > >, dx::stream::pin< device_t, _circular_t >, dx::stream::stream< device_t, dx::circular, usb::pipe< device_t > >, dx::usb::device< preference_t >, dx::usb::device< dx::preference >, dx::usb::pipe< device_t >, dx::usb::pipe< device_t >, dx::usb::platform::device< preference_t >, dx::usb::platform::device< dx::preference >, dx::usb::platform::device< preference_t >, dx::usb::stream::_device< desc_t, preference_t, stream_t, group_t >, dx::usb::stream::_device< desc_t, dx::preference, pipe< device< desc_t, dx::preference, pipe, group > >, group< device< desc_t, dx::preference, pipe, group > > >, dx::usb::stream::_device< desc_t, preference_t, stream_t< device< desc_t, preference_t, stream_t, group_t > >, group_t< device< desc_t, preference_t, stream_t, group_t > > >, dx::usb::stream::pipe< device_t, circular_t, stream_t >, dx::virtuel::driver< device_t >, dx::virtuel::driver< device<> >, dx::virtuel::stream::_device< desc_t, preference_t, stream_t, group_t >, dx::virtuel::stream::_device< desc, dx::preference, dx::stream::shared::stream< device< desc, dx::preference, dx::stream::shared::stream, group > >, group< device< desc, dx::preference, dx::stream::shared::stream, group > > >, dx::virtuel::stream::_device< desc_t, preference_t, stream_t< device< desc_t, preference_t, stream_t, group_t > >, group_t< device< desc_t, preference_t, stream_t, group_t > > >, dx::wasapi::client::_device< desc, preference, stream< device< desc, preference, stream, group > >, group< device< desc, preference, stream, group > > >, and dx::wasapi::client::driver< device_t >.

Here is the caller graph for this function:

◆ initialize() [1/2]

super & dx::event< kernel >::initialize ( bool signalled = false)
inlineoverridevirtualinherited

Reimplemented from dx::abstract::event.

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

◆ initialize() [2/2]

super & dx::event< kernel >::initialize ( const std::string & name,
bool signalled = false )
inlineoverridevirtualinherited

Reimplemented from dx::abstract::event.

Here is the call graph for this function:

◆ launch()

virtual void dx::object::launch ( )
inlineprotectedvirtualinherited

launch notification: object mounted and ready to use. Called only through try_launch() - never call this directly from outside the class hierarchy.

Reimplemented in dx::asio::client::driver< device_t, devices >, dx::asio::service::device< super_device_t >, dx::coreaudio::driver< device_t >, dx::coremidi::driver< device_t >, dx::map::driver< _device_t, holder_t >, dx::map::driver< device<> >, dx::map::driver< device_t >, dx::map::driver< device_t, dx::apartment< device_t > >, dx::midi::services::driver< device_t >, dx::proxy::driver< device_t >, dx::proxy::driver< device_t >, dx::service::app, dx::service::client::_device< desc_t, preference_t, stream_t, group_t >, dx::service::client::_device< desc, preference, stream< device< desc, preference, stream, group > >, group< device< desc, preference, stream, group > > >, dx::service::client::_device< desc_t, preference_t, stream_t< device< desc_t, preference_t, stream_t, group_t > >, group_t< device< desc_t, preference_t, stream_t, group_t > > >, dx::service::client::driver< device_t >, dx::service::device< preference_t >, dx::service::device< dx::preference >, dx::service::device< super_device_t >, dx::stream::stream< device_t, dx::circular, usb::pipe< device_t > >, dx::usb::stream::_device< desc_t, preference_t, stream_t, group_t >, dx::usb::stream::_device< desc_t, dx::preference, pipe< device< desc_t, dx::preference, pipe, group > >, group< device< desc_t, dx::preference, pipe, group > > >, dx::usb::stream::_device< desc_t, preference_t, stream_t< device< desc_t, preference_t, stream_t, group_t > >, group_t< device< desc_t, preference_t, stream_t, group_t > > >, dx::virtuel::driver< device_t >, dx::virtuel::driver< device<> >, and dx::wasapi::client::driver< device_t >.

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

◆ max_frame_size() [1/2]

template<typename device_t, typename interface_t>
pipe & dx::usb::platform::pipe< device_t, interface_t >::max_frame_size ( uint32_t frame_size)
inline

◆ max_frame_size() [2/2]

template<typename device_t, typename interface_t>
pipe & dx::usb::platform::pipe< device_t, interface_t >::max_frame_size ( unsigned int frame_size)
inline

◆ operator const os_event()

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

◆ operator os_event()

dx::event< kernel >::operator os_event ( )
inlinenoexceptinherited

◆ operator::HANDLE()

template<::HANDLE invalid_t = INVALID_HANDLE_VALUE>
dx::resource< invalid_t >::operator::HANDLE ( ) const
inlinenoexceptinherited
Here is the caller graph for this function:

◆ operator<<()

template<typename device_t, typename interface_t>
template<typename data_t>
pipe & dx::usb::platform::pipe< device_t, interface_t >::operator<< ( const data_t & data)
inline

◆ operator>>()

template<typename device_t, typename interface_t>
template<typename data_t>
pipe & dx::usb::platform::pipe< device_t, interface_t >::operator>> ( data_t & data)
inline

◆ outstanding() [1/2]

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

asynchronous requests in flight

◆ outstanding() [2/2]

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

asynchronous requests in flight

◆ poll() [1/2]

template<typename device_t, typename interface_t>
bool dx::usb::platform::pipe< device_t, interface_t >::poll ( usb::isoc::result & result)
inline

pulls the oldest outstanding isoc request's result once it has completed

◆ poll() [2/2]

template<typename device_t, typename interface_t>
bool dx::usb::platform::pipe< device_t, interface_t >::poll ( usb::isoc::result & result)
inlinenoexcept

pulls the oldest completed isoc request's result

◆ read() [1/2]

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

synchronous USB read request

◆ read() [2/2]

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

synchronous USB read request

◆ receive() [1/4]

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

asynchronous USB read request

◆ receive() [2/4]

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

asynchronous USB read request

◆ receive() [3/4]

template<typename device_t, typename interface_t>
virtual pipe & dx::usb::platform::pipe< device_t, interface_t >::receive ( void * data,
uint64_t & sequence,
::IOUSBIsocFrame * frame,
int32_t frames = 1 )
inlinevirtual

asynchronous USB isoc read request

◆ receive() [4/4]

template<typename device_t, typename interface_t>
pipe & dx::usb::platform::pipe< device_t, interface_t >::receive ( void * data,
uint64_t & sequence,
::USBD_ISO_PACKET_DESCRIPTOR * frame,
unsigned int frames = 1 )
inline

asynchronous USB isoc read request WinUSB limitation no microframe support only multiple of max package size requests allowed, even if only submiting a single package https://docs.microsoft.com/en-us/windows/win32/api/winusb/nf-winusb-winusb_readisochpipe is wrong!

◆ received() [1/4]

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

virtual async callbacks

Reimplemented in dx::usb::stream::pipe< device_t, circular_t, stream_t >.

◆ received() [2/4]

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

virtual async callbacks

◆ received() [3/4]

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 *  )
inlineprotectedvirtual

◆ received() [4/4]

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 *  )
inlineprotectedvirtual

◆ reset()

super & dx::event< kernel >::reset ( uint64_t = 0)
inlineoverridevirtualinherited

Implements dx::abstract::event.

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

◆ signal()

super & dx::event< kernel >::signal ( uint64_t = 1)
inlineoverridevirtualinherited

Implements dx::abstract::event.

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

◆ signalled() [1/2]

uint64_t dx::event< user >::signalled ( ) const
inlineinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ signalled() [2/2]

uint64_t dx::event< user >::signalled ( ) const
inlineinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ status() [1/2]

template<typename device_t, typename interface_t>
os_result dx::usb::platform::pipe< device_t, interface_t >::status ( ) const
inlinenoexcept

◆ status() [2/2]

template<typename device_t, typename interface_t>
os_result dx::usb::platform::pipe< device_t, interface_t >::status ( ) const
inlinenoexcept

◆ submit() [1/4]

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

control request to pipe

◆ submit() [2/4]

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

control request to pipe

◆ submit() [3/4]

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
inline

standard request to pipe

◆ submit() [4/4]

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
inline

standard request to pipe

◆ transmit() [1/4]

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

asynchronous USB write request

◆ transmit() [2/4]

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

asynchronous USB write request

◆ transmit() [3/4]

template<typename device_t, typename interface_t>
virtual pipe & dx::usb::platform::pipe< device_t, interface_t >::transmit ( const void * data,
uint64_t & sequence,
::IOUSBIsocFrame * frame,
int32_t frames = 1 )
inlinevirtual

asynchronous USB isoc write request

◆ transmit() [4/4]

template<typename device_t, typename interface_t>
pipe & dx::usb::platform::pipe< device_t, interface_t >::transmit ( const void * data,
uint64_t & sequence,
::USBD_ISO_PACKET_DESCRIPTOR * frame,
unsigned int frames = 1 )
inline

asynchronous USB isoc write request

◆ 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  )
inlineprotectedvirtual

◆ 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  )
inlineprotectedvirtual

◆ 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 *  )
inlineprotectedvirtual

◆ 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 *  )
inlineprotectedvirtual

◆ try_conclude() [1/2]

bool dx::object::try_conclude ( )
inlinenoexceptinherited

atomically conclude()s if currently launched; returns whether this call did it

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

◆ try_conclude() [2/2]

bool dx::object::try_conclude ( )
inlinenoexceptinherited

atomically conclude()s if currently launched; returns whether this call did it

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

◆ try_launch() [1/2]

bool dx::object::try_launch ( )
inlineinherited

atomically launch()es if not already launched; returns whether this call did it. A launch() that throws is concluded before the exception leaves: the object never claims a launch it did not finish

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

◆ try_launch() [2/2]

bool dx::object::try_launch ( )
inlineinherited

atomically launch()es if not already launched; returns whether this call did it. A launch() that throws is concluded before the exception leaves: the object never claims a launch it did not finish

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

◆ wait() [1/4]

void dx::event< kernel >::wait ( ::HANDLE handle,
int64_t timeout = 0 )
inlinestaticinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wait() [2/4]

super & dx::event< kernel >::wait ( bool reset = false)
inlineoverridevirtualinherited

Implements dx::abstract::event.

Here is the call graph for this function:

◆ wait() [3/4]

template<typename rep_t, typename period_t>
bool dx::event< user >::wait ( const std::chrono::duration< rep_t, period_t > & timeout,
bool reset = false )
inlineinherited

wait with duration timeout returns true: signalled false: timed out

Here is the call graph for this function:

◆ wait() [4/4]

template<typename rep_t, typename period_t>
bool dx::event< user >::wait ( const std::chrono::duration< rep_t, period_t > & timeout,
bool reset = false )
inlineinherited

wait with duration timeout returns true: signalled false: timed out

Here is the call graph for this function:

◆ write() [1/2]

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

synchronous USB write request

◆ write() [2/2]

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

synchronous USB write request

Member Data Documentation

◆ address [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 {}
protected

◆ completed

template<typename device_t, typename interface_t>
usb::isoc::result dx::usb::platform::pipe< device_t, interface_t >::completed[max]
protected

isoc completions in callback order, filled by the runloop, drained by poll()

◆ device [1/2]

template<typename _device_t>
_device_t& dx::stream::object< _device_t >::device
protectedinherited

◆ device [2/2]

template<typename _device_t>
_device_t& dx::stream::object< _device_t >::device
protectedinherited

◆ flush_hook [1/2]

std::function<void()> dx::stream::control< dx::stream::object< device_t > >::flush_hook
protectedinherited

◆ flush_hook [2/2]

std::function<void()> dx::stream::control< stream::object< device_t > >::flush_hook
protectedinherited

◆ halt_hook [1/2]

std::function<void()> dx::stream::control< dx::stream::object< device_t > >::halt_hook
protectedinherited

◆ halt_hook [2/2]

std::function<void()> dx::stream::control< stream::object< device_t > >::halt_hook
protectedinherited

◆ handle

template<::HANDLE invalid_t = INVALID_HANDLE_VALUE>
::HANDLE dx::resource< invalid_t >::handle {invalid_t}
protectedinherited

◆ idx

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

◆ interface

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

◆ isoc [1/2]

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

◆ isoc [2/2]

template<typename device_t, typename interface_t>
struct dx::usb::platform::pipe::isoc dx::usb::platform::pipe< device_t, interface_t >::isoc
protected

◆ launched [1/2]

std::atomic<bool> dx::object::launched {}
inherited

◆ launched [2/2]

std::atomic<bool> dx::object::launched {}
inherited

◆ max

template<typename device_t, typename interface_t>
constexpr auto dx::usb::platform::pipe< device_t, interface_t >::max {usb::isoc::max_requests}
staticconstexpr

◆ process

template<::HANDLE invalid_t = INVALID_HANDLE_VALUE>
::HANDLE dx::resource< invalid_t >::process {::GetCurrentProcess()}
protectedinherited

◆ run_hook [1/2]

std::function<void()> dx::stream::control< dx::stream::object< device_t > >::run_hook
protectedinherited

◆ run_hook [2/2]

std::function<void()> dx::stream::control< stream::object< device_t > >::run_hook
protectedinherited

◆ rx

template<typename device_t, typename interface_t>
volatile unsigned int dx::usb::platform::pipe< device_t, interface_t >::rx = 0
protected

◆ scope

constexpr auto dx::event< kernel >::scope = kernel
staticconstexprinherited

◆ start [1/2]

◆ start [2/2]

◆ started [1/2]

◆ started [2/2]

promoted<bool> dx::stream::control< stream::object< device_t > >::started
inherited

◆ tx

template<typename device_t, typename interface_t>
volatile unsigned int dx::usb::platform::pipe< device_t, interface_t >::tx = 0
protected

◆ type

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

◆ winusb

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

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

(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.