|
dxd - dynax driver framework 2.7.0d222
cross platform open source driver development framework
|
#include <dx_usb_device_platform.h>
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 | |
| 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) | |
| pipe & | drain (std::chrono::milliseconds timeout=std::chrono::milliseconds(250)) noexcept |
| waits for already-submitted requests to complete on their own, without cancelling them | |
| 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 event & | initialize (bool signalled=false) |
| virtual event & | initialize (const std::string &, bool signalled=false) |
| operator const os_event () const noexcept | |
| operator os_event () noexcept | |
| operator::HANDLE () const noexcept | |
| pipe (device_t &device, const endpoint &endpoint) | |
| DX_PRAGMA_IGNORE_RETURN_VALUE_END event & | reset (uint64_t count=0) override try |
| DX_PRAGMA_IGNORE_RETURN_VALUE_END event & | reset (uint64_t count=0) override try |
| super & | signal (uint64_t count=1) override try |
| super & | signal (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 |
| virtual bool | start (uint64_t=0, unsigned int starting=1) |
| virtual bool | start (uint64_t=0, unsigned int starting=1) |
| virtual unsigned int | stop (bool force=false) noexcept |
| virtual unsigned int | stop (bool force=false) noexcept |
| template<typename data_t> | |
| pipe & | submit (const request< data_t > &request) const try |
| standard request to pipe | |
| 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 | |
| bool | try_launch () |
| atomically launch()es if not already launched; returns whether this call did it | |
| DX_PRAGMA_IGNORE_RETURN_VALUE_END super & | wait (bool reset=false) override try |
| DX_PRAGMA_IGNORE_RETURN_VALUE_END super & | wait (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 |
| std::atomic< bool > | launched {} |
| std::atomic< 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 | |
| pipe & | abort () try |
| 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. Called only through try_conclude() - never call this directly from outside the class hierarchy. | |
| pipe & | drain (std::chrono::milliseconds timeout=std::chrono::milliseconds(250)) noexcept |
| waits for already-submitted requests to complete on their own, without cancelling them | |
| dx_catchall_handler (this,) public | |
| dx_catchall_rethrow () os_result status() const noexcept | |
| dx_catchall_rethrow () pipe &max_frame_size(unsigned int frame_size) | |
| dx_catchall_rethrow () uint64_t frame() try | |
| dx_catchall_rethrow (try {clear();} dx_catchall(), "handle:%p idx:%d EP:%02x data:%p size:%lld", winusb.handle, idx, address, data, size) pipe &receive(void *data | |
| 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! | |
| dx_catchall_rethrow (try {clear();} dx_catchall(), "handle:%p idx:%d EP:%02x data:%p size:%lld", winusb.handle, idx, address, data, size) pipe &transmit(const void *data | |
| asynchronous USB write request | |
| 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_pass (rx==tx? overflow:ok, "too manny (%d) outstanding asynchronous transactions for endpoint %x", max, address) | |
| virtual void | flush () |
| virtual void | flush () |
| void | halt () noexcept override |
| async IO thread control (required for Windows compatibility) | |
| void | halt () noexcept override try |
| async IO thread control: joins the completion thread once this pipe's last start/stop reference is gone | |
| if (tx==max) tx=0 | |
| 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. | |
| pipe & | read (void *data, size_t size) try |
| synchronous USB read request | |
| pipe & | receive (void *data, size_t size) try |
| asynchronous USB read request | |
| 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 & | write (const void *data, size_t size) try |
| synchronous USB write request | |
| ~pipe () override | |
Protected Attributes | |
| struct { | |
| } | address |
| uint8_t | address = 0 |
| _device_t & | device |
| _device_t & | device |
| uint64_t ::USBD_ISO_PACKET_DESCRIPTOR * | frame |
| uint8_t | idx = 0 |
| struct { | |
| class buffer { | |
| } buffer | |
| unsigned int micro_frames = 0 | |
| } | isoc |
| struct dx::usb::platform::pipe::isoc | isoc |
| ::HANDLE | process = ::GetCurrentProcess() |
| uint64_t & | sequence |
| std::recursive_mutex | start_stop_in_progress |
| start/stop operation in progress | |
| std::recursive_mutex | start_stop_in_progress |
| start/stop operation in progress | |
| return * | this |
| size_t size | try |
| struct { | |
| ::WINUSB_INTERFACE_HANDLE handle | |
| } | winusb |
|
inherited |
|
inherited |
|
strong |
|
strong |
|
inlineoverrideprotected |
|
inline |
|
inline |
|
inlineprotected |
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineprotectedvirtualnoexceptinherited |
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. Called only through try_conclude() - never call this directly from outside the class hierarchy.
Reimplemented in dx::asio::client::_device< desc, preference, stream< device< desc, preference, stream > > >, dx::asio::service::device< super_device_t >, dx::map::driver< _device_t >, dx::map::driver< device<> >, dx::map::driver< device_t >, dx::proxy::device< preference_t >, dx::proxy::device< dx::preference >, dx::proxy::stream::_device< dx::stream::desc<>, dx::preference, stream< device< dx::stream::desc<>, dx::preference, stream > > >, dx::service::client::_device< desc, preference, stream< device< desc, preference, stream > > >, dx::service::device< preference_t >, dx::service::device< dx::preference >, dx::service::device< super_device_t >, dx::stream::engine< device_t, pin_t, driver_t, io_t, circular_t >, dx::usb::pipe< device_t >, dx::usb::pipe< device_t >, and dx::virtuel::stream::_device< desc, dx::preference, dx::stream::shared::stream< device< desc, dx::preference, dx::stream::shared::stream > > >.
|
inlinenoexcept |
waits for already-submitted requests to complete on their own, without cancelling them
|
inlineprotectednoexcept |
waits for already-submitted requests to complete on their own, without cancelling them
|
inlineprotected |
|
inlinenoexcept |
|
inlineprotectednoexcept |
|
inlineprotected |
|
inlineprotected |
|
protected |
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!
|
protected |
asynchronous USB write request
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inline |
control request to pipe
|
protected |
|
pure virtualnoexceptinherited |
notification exception handler
Implemented in dx::asio::client::_device< desc, preference, stream< device< desc, preference, stream > > >, 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::proxy::device< preference_t >, dx::proxy::device< dx::preference >, dx::service::app, dx::stream::pin< device_t, _circular_t >, dx::usb::platform::device< preference_t >, dx::usb::platform::device< dx::preference >, dx::usb::platform::device< preference_t >, dx::usb::stream::pipe< device_t, circular_t, stream_t >, and dx::virtuel::stream::_device< desc, dx::preference, dx::stream::shared::stream< device< desc, dx::preference, dx::stream::shared::stream > > >.
|
inlineprotectedvirtualinherited |
Reimplemented in dx::stream::stream< device_t, dx::circular, usb::pipe< device_t > >.
|
inlineprotectedvirtualinherited |
Reimplemented in dx::stream::stream< device_t, dx::circular, usb::pipe< device_t > >.
|
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 >.
|
inlineoverrideprotectedvirtualnoexcept |
async IO thread control: joins the completion thread once this pipe's last start/stop reference is gone
Reimplemented from dx::stream::control< stream::object< device_t > >.
|
protectedpure virtual |
|
inlineoverridevirtualnoexceptinherited |
Reimplemented from dx::object.
Reimplemented in dx::stream::stream< device_t, dx::circular, usb::pipe< device_t > >, dx::usb::pipe< device_t >, and dx::usb::stream::pipe< device_t, circular_t, stream_t >.
|
inlineoverridevirtualnoexceptinherited |
Reimplemented from dx::object.
Reimplemented in dx::stream::stream< device_t, dx::circular, usb::pipe< device_t > >, dx::usb::pipe< device_t >, and dx::usb::stream::pipe< device_t, circular_t, stream_t >.
|
inlinevirtualinherited |
|
inlinevirtualinherited |
Reimplemented in dx::shared::event.
|
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::map::driver< _device_t >, dx::map::driver< device<> >, dx::map::driver< device_t >, dx::proxy::driver< device_t >, dx::proxy::driver< device_t >, dx::proxy::driver< device_t >, dx::service::app, dx::service::client::_device< desc, preference, stream< device< desc, preference, stream > > >, 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, dx::preference, pipe< device< desc_t, dx::preference, pipe > > >, and dx::virtuel::driver< device_t >.
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlineprotected |
synchronous USB read request
|
inlineprotected |
asynchronous USB read request
|
inlineprotectedvirtual |
virtual async callbacks
Reimplemented in dx::usb::stream::pipe< device_t, circular_t, stream_t >.
|
inlineprotectedvirtual |
virtual async callbacks
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineoverridevirtualinherited |
Implements dx::abstract::event.
|
inlineoverridevirtualinherited |
Implements dx::abstract::event.
|
inlinevirtualinherited |
result indicates if start changed the state.
Reimplemented in dx::stream::stream< device_t, dx::circular, usb::pipe< device_t > >, and dx::usb::stream::pipe< device_t, circular_t, stream_t >.
|
inlinevirtualinherited |
result indicates if start changed the state.
Reimplemented in dx::stream::stream< device_t, dx::circular, usb::pipe< device_t > >, and dx::usb::stream::pipe< device_t, circular_t, stream_t >.
|
inlinevirtualnoexceptinherited |
result indicates the amount of stopped start references
|
inlinevirtualnoexceptinherited |
result indicates the amount of stopped start references
|
inline |
standard request to pipe
|
inlineprotectedvirtual |
Reimplemented in dx::usb::stream::pipe< device_t, circular_t, stream_t >.
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlinenoexceptinherited |
atomically conclude()s if currently launched; returns whether this call did it
|
inlinenoexceptinherited |
atomically conclude()s if currently launched; returns whether this call did it
|
inlineinherited |
atomically launch()es if not already launched; returns whether this call did it
|
inlineinherited |
atomically launch()es if not already launched; returns whether this call did it
|
inlineoverridevirtualinherited |
Implements dx::abstract::event.
|
inlineoverridevirtualinherited |
Implements dx::abstract::event.
|
inlineinherited |
wait with duration timeout returns true: signalled false: timed out
|
inlineinherited |
wait with duration timeout returns true: signalled false: timed out
|
inlineprotected |
synchronous USB write request
| struct { ... } dx::usb::platform::pipe< device_t, interface_t >::address |
|
protected |
| class { ... } ::buffer dx::usb::platform::pipe< device_t, interface_t >::buffer |
|
protectedinherited |
|
protectedinherited |
|
protected |
| ::WINUSB_INTERFACE_HANDLE dx::usb::platform::pipe< device_t, interface_t >::handle |
|
protected |
| interface_t & dx::usb::platform::pipe< device_t, interface_t >::interface |
| struct { ... } dx::usb::platform::pipe< device_t, interface_t >::isoc |
|
protected |
|
inherited |
|
inherited |
| unsigned int dx::usb::platform::pipe< device_t, interface_t >::micro_frames = 0 |
|
inherited |
|
inherited |
|
protectedinherited |
|
protected |
|
protectedinherited |
start/stop operation in progress
|
protectedinherited |
start/stop operation in progress
|
inherited |
|
inherited |
|
protected |
|
protected |
| enum dx::usb::platform::pipe::type dx::usb::platform::pipe< device_t, interface_t >::type |
| struct { ... } dx::usb::platform::pipe< device_t, interface_t >::winusb |
| (c) copyright 2009 dynamic acoustics e.U. | generated on |