dxd - dynax driver framework 2.6.0d205
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
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 (...)
DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN catch (const dx::exception &__dx_exception)
DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN catch (const dx::exception &__dx_exception)
DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN catch (const dx::exception &__dx_exception)
DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN 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_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
void info (std::ostream &os) noexcept override try
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)
DX_PRAGMA_IGNORE_RETURN_VALUE_END eventreset (uint64_t count=0) override try
DX_PRAGMA_IGNORE_RETURN_VALUE_END eventreset (uint64_t count=0) override try
eventsignal (uint64_t count=1) override try
eventsignal (uint64_t count=1) override try
DX_PRAGMA_IGNORE_RETURN_VALUE_END uint64_t signalled () const
DX_PRAGMA_IGNORE_RETURN_VALUE_END 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
virtual unsigned int stop (bool force=false) noexcept
template<typename data_t>
pipesubmit (const request< data_t > &request) const try
 standard request to pipe
DX_PRAGMA_IGNORE_RETURN_VALUE_END eventwait (bool reset=false) override try
DX_PRAGMA_IGNORE_RETURN_VALUE_END eventwait (bool reset=false) override try
template<typename rep_t, typename period_t>
DX_PRAGMA_IGNORE_RETURN_VALUE_END bool wait (const std::chrono::duration< rep_t, period_t > &timeout, bool reset=false) try
template<typename rep_t, typename period_t>
DX_PRAGMA_IGNORE_RETURN_VALUE_END bool wait (const std::chrono::duration< rep_t, period_t > &timeout, bool reset=false) try

Public Attributes

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

Static Public Attributes

static constexpr auto scope = kernel

Protected Member Functions

virtual void flush ()
virtual void flush ()
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 () override

Protected Attributes

struct { 
address
uint8_t address = 0
_device_t & device
_device_t & device
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
std::recursive_mutex start_stop_in_progress
 start/stop operation in progress
struct { 
   ::WINUSB_INTERFACE_HANDLE   handle 
winusb

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
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 ( )
inlineoverrideprotected

◆ 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_PRAGMA_IGNORE_RETURN_VALUE_BEGIN dx::event< user >::catch ( const dx::exception & __dx_exception)
inlineinherited

◆ catch() [6/12]

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

◆ catch() [7/12]

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

◆ catch() [8/12]

DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN 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()

◆ dx_catchall_handler() [1/2]

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

◆ dx_catchall_handler() [2/2]

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

◆ 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

◆ flush() [1/2]

◆ flush() [2/2]

virtual void dx::stream::control< stream::object< device_t > >::flush ( )
inlineprotectedvirtualinherited

◆ 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::usb::stream::pipe< device_t, circular_t, stream_t >.

◆ info() [1/2]

◆ info() [2/2]

◆ 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

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

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

Implements dx::abstract::event.

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

◆ reset() [2/2]

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

Implements dx::abstract::event.

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

◆ signal() [1/2]

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

Implements dx::abstract::event.

Here is the caller graph for this function:

◆ signal() [2/2]

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

Implements dx::abstract::event.

Here is the caller graph for this function:

◆ signalled() [1/2]

DX_PRAGMA_IGNORE_RETURN_VALUE_END 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]

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

◆ 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

◆ stop() [1/2]

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

result indicates the amount of stopped start references

◆ stop() [2/2]

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]

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

Implements dx::abstract::event.

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

◆ wait() [2/4]

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

Implements dx::abstract::event.

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

◆ wait() [3/4]

template<typename rep_t, typename period_t>
DX_PRAGMA_IGNORE_RETURN_VALUE_END 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>
DX_PRAGMA_IGNORE_RETURN_VALUE_END 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:

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

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

bool dx::object::launched {}
inherited

◆ launched [2/2]

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

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

◆ notify [2/2]

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

◆ scope

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

◆ start_stop_in_progress [1/2]

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

start/stop operation in progress

◆ start_stop_in_progress [2/2]

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

start/stop operation in progress

◆ started [1/2]

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

◆ started [2/2]

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

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.