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

#include <dx_usb_device.h>

Inheritance diagram for dx::usb::pipe< device_t >:
Collaboration diagram for dx::usb::pipe< device_t >:

Public Types

typedef device<> device_t
typedef device<> device_t
enum  type

Public Member Functions

pipe & abort () 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)
void conclude () noexcept override
 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 (;,"endpoint:%x interface:%d setting:%d", endpoint.address, endpoint.interface, endpoint.setting) pipe &max_frame_size(uint32_t frame_size)
 dx_catchall_rethrow () os_result status() const noexcept
virtual void exception (const exception &exception, bool filtered=false) const noexcept=0
 notification exception handler
void info (std::ostream &os) noexcept override
 log object class information
virtual void launch ()
 launch notification: object mounted and ready to use
 operator os_event () noexcept
template<typename data_t>
pipe & operator<< (const data_t &data)
 synchronous USB write request
template<typename data_t>
pipe & operator>> (data_t &data)
 synchronous USB read request
 pipe (device_t &device, const usb::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
pipe & submit (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
 ~pipe () override

Public Attributes

const usb::endpoint::attributesattributes = reinterpret_cast<const struct usb::endpoint::attributes&>(bmAttributes)
std::deque< union audio::descriptor::endpointaudio
class buffer
buffer
::WINUSB_INTERFACE_HANDLE handle
interface & interface
bool launched
bool launched
unsigned int micro_frames
std::deque< std::function< void(control &)> > notify
std::deque< std::function< void(control &)> > notify
std::atomic< unsigned int > started
std::atomic< unsigned int > started

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 transmitted (os_result, size_t)

Protected Attributes

struct { 
address
device<> & device
device<> & device
uint8_t idx
struct { 
   class buffer
   }   buffer
   unsigned int   micro_frames = 0 
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]

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

◆ device_t [2/2]

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

Member Enumeration Documentation

◆ type

Constructor & Destructor Documentation

◆ pipe()

template<typename device_t = device<>>
dx::usb::pipe< device_t >::pipe ( device_t & device,
const usb::endpoint & endpoint )
inline
Here is the call graph for this function:

◆ ~pipe()

template<typename device_t = device<>>
dx::usb::pipe< device_t >::~pipe ( )
inlineoverride
Here is the call graph for this function:

Member Function Documentation

◆ abort()

pipe & dx::usb::platform::pipe< device<>, interface >::abort ( )
inlineinherited
Here is the caller graph for this function:

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

template<typename device_t = device<>>
void dx::usb::pipe< device_t >::conclude ( )
inlineoverridevirtualnoexcept

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 from dx::object.

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

◆ dx_catchall_handler() [1/2]

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

◆ dx_catchall_handler() [2/2]

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

◆ dx_catchall_rethrow() [1/2]

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

◆ dx_catchall_rethrow() [2/2]

dx::usb::platform::pipe< device<>, interface >::dx_catchall_rethrow ( ) const
inlinenoexceptinherited

◆ exception()

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

notification exception handler

◆ flush() [1/2]

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

◆ flush() [2/2]

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

◆ halt()

void dx::usb::platform::pipe< device<>, interface >::halt ( )
inlineoverrideprotectedvirtualnoexceptinherited

async IO thread control (required for Windows compatibility)

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

◆ info()

template<typename device_t = device<>>
void dx::usb::pipe< device_t >::info ( std::ostream & os)
inlineoverridevirtualnoexcept

log object class information

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

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

Reimplemented in 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:

◆ launch()

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

launch notification: object mounted and ready to use

◆ operator os_event()

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

◆ operator<<()

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

synchronous USB write request

◆ operator>>()

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

synchronous USB read request

◆ received()

virtual void dx::usb::platform::pipe< device<>, interface >::received ( os_result ,
size_t  )
inlineprotectedvirtualinherited

virtual async callbacks

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

bool dx::usb::platform::pipe< device<>, interface >::start ( uint64_t frame,
unsigned int started = 1 )
inlineoverridevirtualinherited

async IO thread control

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

◆ stop() [1/2]

virtual unsigned int dx::stream::control< dx::stream::object< device<> > >::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<> > >::stop ( bool force = false)
inlinevirtualnoexceptinherited

result indicates the amount of stopped start references

◆ submit()

pipe & dx::usb::platform::pipe< device<>, interface >::submit ( const request< data_t > & request) const
inlineinherited

standard request to pipe

◆ transmitted()

virtual void dx::usb::platform::pipe< device<>, interface >::transmitted ( os_result ,
size_t  )
inlineprotectedvirtualinherited

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

struct { ... } dx::usb::platform::pipe< device<>, interface >::address

◆ attributes

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

◆ audio

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

◆ [class]

class { ... } ::buffer dx::usb::platform::pipe< device<>, interface >::buffer

◆ device [1/2]

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

◆ device [2/2]

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

◆ handle

::WINUSB_INTERFACE_HANDLE dx::usb::platform::pipe< device<>, interface >::handle
inherited

◆ idx

uint8_t dx::usb::platform::pipe< device<>, interface >::idx
protectedinherited

◆ interface

interface & dx::usb::platform::pipe< device<>, interface >::interface
inherited

◆ [struct]

struct { ... } dx::usb::platform::pipe< device<>, interface >::isoc

◆ launched [1/2]

bool dx::object::launched
inherited

◆ launched [2/2]

bool dx::object::launched
inherited

◆ micro_frames

unsigned int dx::usb::platform::pipe< device<>, interface >::micro_frames
inherited

◆ notify [1/2]

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

◆ notify [2/2]

std::deque<std::function<void(control&)> > dx::stream::control< stream::object< device<> > >::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<> > >::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<> > >::start_stop_in_progress
protectedinherited

start/stop operation in progress

◆ started [1/2]

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

◆ started [2/2]

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

◆ [struct]

struct { ... } dx::usb::platform::pipe< device<>, interface >::winusb

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

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