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

#include <dx_usb_device_platform.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
 

Public Types

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
}
 

Public Member Functions

pipeabort () try
 
virtual void callback ()
 
 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 std::exception &__std_exception)
 
 catch (const std::exception &__std_exception)
 
 catch (const std::exception &__std_exception)
 
 catch (const std::exception &__std_exception)
 
virtual void conclude () noexcept
 conclude notification: object will be removed. If you overwrite conclude() you also need to overwrite destructor and check if its needed to be called from there.
 
 dx_catchall_handler (this,) void conclude() noexcept override
 
 dx_catchall_rethrow () os_result status() const noexcept
 
 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
 
virtual void exception (const exception &exception, bool filtered=false) const noexcept=0
 notification exception handler
 
bool in () const noexcept
 bus initializer (isoc, bulk, pci, etc.) compatibility
 
void info (std::ostream &os) noexcept override try
 
virtual void launch ()
 launch notification: object mounted and ready to use
 
 operator os_event () noexcept
 
 pipe (device_t &device, const endpoint &endpoint)
 
eventreset (uint64_t count=0) try
 
eventreset (uint64_t count=0) try
 
eventsignal (uint64_t count=1) try
 
eventsignal (uint64_t count=1) try
 
uint64_t signalled () const
 
uint64_t signalled () const
 
bool start (uint64_t frame, unsigned int started=1) override try
 async IO thread control
 
virtual unsigned int stop (bool force=false) noexcept
 
template<typename data_t >
pipesubmit (const request< data_t > &request) const try
 standard request to pipe
 
eventwait (bool reset=false) try
 
eventwait (bool reset=false) try
 
template<typename rep_t , typename period_t >
bool wait (const std::chrono::duration< rep_t, period_t > &timeout, bool reset=false) try
 
template<typename rep_t , typename period_t >
bool wait (const std::chrono::duration< rep_t, period_t > &timeout, bool reset=false) try
 

Public Attributes

interface_t & interface
 
bool launched {}
 
std::deque< std::function< void(control &)> notify )
 
std::atomic< unsigned int > started
 
enum dx::usb::platform::pipe::type type
 

Static Public Attributes

static constexpr auto scope = kernel
 

Protected Types

typedef dx::event< dx::kernelevent
 

Protected Member Functions

void halt () noexcept override
 async IO thread control (required for Windows compatibility)
 
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 () noexcept override
 

Protected Attributes

struct { 
 
address 
 
uint8_t address = 0
 
device_tdevice
 
uint8_t idx = 0
 
struct { 
 
   class buffer
 
   }   buffer 
 
   unsigned int   micro_frames = 0 
 
isoc 
 
struct dx::usb::platform::pipe::isoc isoc
 
std::recursive_mutex start_stop_in_progress
 start/stop operation in progress
 
struct { 
 
   ::WINUSB_INTERFACE_HANDLE   handle 
 
winusb 
 

Member Typedef Documentation

◆ device_t

typedef device_t dx::stream::object< device_t >::device_t
inherited

◆ event

template<typename device_t , typename interface_t >
typedef dx::event<dx::kernel> dx::usb::platform::pipe< device_t, interface_t >::event
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
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
Enumerator
control 
isoc 
bulk 
irq 
control 
isoc 
bulk 
irq 

Constructor & Destructor Documentation

◆ ~pipe()

template<typename device_t , typename interface_t >
dx::usb::platform::pipe< device_t, interface_t >::~pipe ( )
inlineoverrideprotectednoexcept
+ Here is the call graph for this function:

◆ pipe()

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

Member Function Documentation

◆ abort()

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.

◆ catch() [1/12]

dx::event< user >::catch ( ...)
inlineinherited

◆ catch() [2/12]

dx::event< user >::catch ( ...)
inlineinherited

◆ catch() [3/12]

dx::event< user >::catch ( ...)
inlineinherited

◆ catch() [4/12]

dx::event< user >::catch ( ...)
inlineinherited

◆ catch() [5/12]

dx::event< user >::catch ( const dx::exception & __dx_exception)
inlineinherited

◆ catch() [6/12]

dx::event< user >::catch ( const dx::exception & __dx_exception)
inlineinherited

◆ catch() [7/12]

dx::event< user >::catch ( const dx::exception & __dx_exception)
inlineinherited

◆ catch() [8/12]

dx::event< user >::catch ( const dx::exception & __dx_exception)
inlineinherited

◆ catch() [9/12]

dx::event< user >::catch ( const std::exception & __std_exception)
inlineinherited

◆ catch() [10/12]

dx::event< user >::catch ( const std::exception & __std_exception)
inlineinherited

◆ catch() [11/12]

dx::event< user >::catch ( const std::exception & __std_exception)
inlineinherited

◆ catch() [12/12]

dx::event< user >::catch ( const std::exception & __std_exception)
inlineinherited

◆ conclude()

virtual void dx::object::conclude ( )
inlinevirtualnoexceptinherited

conclude notification: object will be removed. If you overwrite conclude() you also need to overwrite destructor and check if its needed to be called from there.

Reimplemented in dx::proxy::stream::_device< desc_t, stream_t >, dx::usb::pipe< device_t >, dx::usb::pipe< device_t >, dx::proxy::device, dx::proxy::device, dx::map::driver< device >, and dx::map::driver< device_t >.

+ Here is the caller graph for this function:

◆ dx_catchall_handler()

dx::stream::control< stream::object< device_t > >::dx_catchall_handler ( this )
inlineoverridenoexceptinherited

◆ dx_catchall_rethrow() [1/2]

template<typename device_t , typename interface_t >
dx::usb::platform::pipe< device_t, interface_t >::dx_catchall_rethrow ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ dx_catchall_rethrow() [2/2]

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 &
inline

control request to pipe

◆ exception()

virtual void dx::object::exception ( const exception & exception,
bool filtered = false ) const
pure virtualnoexceptinherited

notification exception handler

Implemented in dx::device< std::string >, dx::device<::AudioObjectID >, dx::device<::io_service_t >, dx::device< id_t >, dx::stream::pin< device_t, _circular_t >, dx::virtuel::stream::_device< desc_t, stream_t >, dx::proxy::device, dx::usb::platform::device, and dx::proxy::device.

+ Here is the caller graph for this function:

◆ halt()

template<typename device_t , typename interface_t >
void dx::usb::platform::pipe< device_t, interface_t >::halt ( )
inlineoverrideprotectedvirtualnoexcept

async IO thread control (required for Windows compatibility)

Reimplemented from dx::stream::control< stream::object< device_t > >.

Reimplemented in dx::stream::stream< device< desc_t, pipe >, dx::circular, usb::pipe< device< desc_t, pipe > > >, and dx::stream::stream< device_t, dx::circular, usb::pipe< device_t > >.

+ Here is the call graph for this function:

◆ in()

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

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

◆ info()

◆ launch()

◆ operator os_event()

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

◆ 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

◆ 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() [1/2]

event & dx::event< user >::reset ( uint64_t count = 0)
inlineinherited

◆ reset() [2/2]

event & dx::event< user >::reset ( uint64_t count = 0)
inlineinherited

◆ signal() [1/2]

event & dx::event< user >::signal ( uint64_t count = 1)
inlineinherited

◆ signal() [2/2]

event & dx::event< user >::signal ( uint64_t count = 1)
inlineinherited

◆ signalled() [1/2]

uint64_t dx::event< user >::signalled ( ) const
inlineinherited

◆ signalled() [2/2]

uint64_t dx::event< user >::signalled ( ) const
inlineinherited

◆ start()

template<typename device_t , typename interface_t >
bool dx::usb::platform::pipe< device_t, interface_t >::start ( uint64_t frame,
unsigned int started = 1 )
inlineoverridevirtual

async IO thread control

Reimplemented from dx::stream::control< stream::object< device_t > >.

Reimplemented in dx::stream::stream< device< desc_t, pipe >, dx::circular, usb::pipe< device< desc_t, pipe > > >, and dx::stream::stream< device_t, dx::circular, usb::pipe< device_t > >.

+ Here is the call graph for this function:

◆ stop()

virtual unsigned int dx::stream::control< stream::object< device_t > >::stop ( bool force = false)
inlinevirtualnoexceptinherited

result indicates the amount of stopped start references

◆ submit()

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

◆ 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

◆ wait() [1/4]

event & dx::event< user >::wait ( bool reset = false)
inlineinherited

◆ wait() [2/4]

event & dx::event< user >::wait ( bool reset = false)
inlineinherited

◆ 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

◆ 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

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
protected

◆ [class]

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

◆ device

device_t & dx::stream::object< device_t >::device
protectedinherited

◆ handle

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

◆ 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

◆ [struct] [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

bool dx::object::launched {}
inherited

◆ micro_frames

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

◆ notify

std::deque<std::function<void(control&)> dx::stream::control< stream::object< device_t > >::notify)
inherited

◆ scope

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

◆ start_stop_in_progress

std::recursive_mutex dx::stream::control< stream::object< device_t > >::start_stop_in_progress
protectedinherited

start/stop operation in progress

◆ started

std::atomic<unsigned int> dx::stream::control< stream::object< device_t > >::started
inherited

◆ type

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

◆ [struct]

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 Tue Mar 11 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.