|
dxd - dynax driver framework 3.0.2
cross platform open source driver development framework
|
#include <dx_usb_device.h>
Public Types | |
| typedef device<> | device_t |
| typedef device<> | device_t |
| enum | type |
Public Member Functions | |
| pipe& | abort() |
| catch(const std::out_of_range& exception) | |
| pipe& | clear(bool force= false) |
| 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. 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 | |
| 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 | |
| pipe& | max_frame_size(uint32_t frame_size) |
| 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 | |
| bool | outstanding() const noexcept |
| pipe(device_t& device, const usb::endpoint& endpoint) | |
| the endpoint in the setting its stream's configuration selects - one the desc does not stream (a vendor bulk endpoint) in its interface's current setting | |
| pipe(device_t& device, const usb::endpoint& endpoint, uint8_t setting) | |
| the endpoint as the given setting of its interface states it | |
| bool | poll(usb::isoc::result& result) noexcept |
| pulls the oldest completed request's result | |
| pipe& | read(void* data, size_t& size) |
| synchronous USB read request | |
| virtual pipe& | receive(void* data, size_t size) |
| asynchronous USB read request | |
| os_result | status() const noexcept |
| pipe& | submit(const request<data_t>& request) const |
| standard request to pipe | |
| pipe& | transfer(bool in, void* data, size_t& size) |
| a synchronous transfer: asynchronous underneath, past timeout the pipe aborted and the transfer failed as timed out - IOKit completes every request, an aborted one included | |
| virtual pipe& | transmit(const void* data, size_t& size) |
| asynchronous USB 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 | |
| pipe& | write(const void* data, size_t size) |
| synchronous USB write request | |
| ~pipe() override | |
Static Public Member Functions | |
| static unsigned int | micro_frames(const device_t& device, uint8_t bInterval) |
| an endpoint's requests per frame: its interval at high speed, one below | |
Public Attributes | |
| const usb::endpoint::attributes& | attributes{reinterpret_cast<const struct usb::endpoint::attributes&>(bmAttributes)} |
| std::deque<union audio::descriptor::endpoint> | audio |
| uint8_t | bRefresh{} |
| audio class endpoint: 2^bRefresh frames between two feedback values | |
| uint8_t | bSynchAddress{} |
| audio class endpoint: the isoc sync endpoint pacing this one, 0: none | |
| interface& | interface |
| std::atomic<bool> | launched |
| std::atomic<bool> | launched |
| promoted<uint32_t> | start |
| promoted<uint32_t> | start |
| promoted<bool> | started |
| promoted<bool> | started |
| std::chrono::milliseconds | timeout |
Static Public Attributes | |
| static constexpr auto | max |
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 | transmitted(os_result, size_t) |
Protected Attributes | |
| struct dx::usb::platform::pipe:: { ... } | address |
| usb::isoc::result | completed [max] |
| isoc completions in callback order, filled by the runloop, drained by poll() | |
| device<>& | device |
| device<>& | device |
| std::function<void()> | flush_hook |
| std::function<void()> | flush_hook |
| std::function<void()> | halt_hook |
| std::function<void()> | halt_hook |
| uint8_t | idx |
| struct dx::usb::platform::pipe:: { ... } | isoc |
| std::function<void()> | run_hook |
| std::function<void()> | run_hook |
| volatile unsigned int | rx |
| volatile unsigned int | tx |
| struct dx::usb::platform::pipe:: { ... } | winusb |
Friends | |
| std::ostream& | operator <<(std::ostream& os, pipe& pipe) |
|
inherited |
|
inherited |
|
stronginherited |
|
inline |
the endpoint in the setting its stream's configuration selects - one the desc does not stream (a vendor bulk endpoint) in its interface's current setting
|
inline |
the endpoint as the given setting of its interface states it
|
inlineoverride |
|
inlineinherited |
|
inline |
|
inlineinherited |
|
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. Called only through try_conclude() - never call this directly from outside the class hierarchy.
Reimplemented from dx::stream::control< stream::object< device<> > >.
|
inlinenoexceptinherited |
waits for already-submitted requests to complete on their own, without cancelling them
|
inlineoverridevirtualnoexceptinherited |
notification exception handler
Implements dx::object.
|
inlineoverridevirtualnoexceptinherited |
notification exception handler
Implements dx::object.
|
inlineinherited |
current bus frame number; timestamp: dx::timestamp() of the readout
|
inlineprotectedvirtualinherited |
launch notification: object mounted and ready to use. Called only through try_launch() - never call this directly from outside the class hierarchy.
|
inline |
|
inlinestatic |
an endpoint's requests per frame: its interval at high speed, one below
|
inline |
synchronous USB write request
|
inline |
synchronous USB read request
|
inlinenoexceptinherited |
asynchronous requests in flight
|
inlinenoexceptinherited |
pulls the oldest completed request's result
|
inlineinherited |
synchronous USB read request
|
inlinevirtualinherited |
asynchronous USB read request
|
inlineprotectedvirtualinherited |
virtual async callbacks
|
inlinenoexceptinherited |
|
inlineinherited |
standard request to pipe
|
inlineinherited |
a synchronous transfer: asynchronous underneath, past timeout the pipe aborted and the transfer failed as timed out - IOKit completes every request, an aborted one included
|
inlinevirtualinherited |
asynchronous USB write request
|
inlineprotectedvirtualinherited |
|
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 |
|
inlineinherited |
|
inlineinherited |
synchronous USB write request
|
friend |
< 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.
| struct { ... } dx::usb::platform::pipe<device<>, interface>::address |
| const usb::endpoint::attributes& dx::usb::pipe<device_t>::attributes{reinterpret_cast<const struct usb::endpoint::attributes&>(bmAttributes)} |
|
inherited |
|
inherited |
audio class endpoint: 2^bRefresh frames between two feedback values
|
inherited |
audio class endpoint: the isoc sync endpoint pacing this one, 0: none
|
protectedinherited |
isoc completions in callback order, filled by the runloop, drained by poll()
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
inherited |
| struct { ... } dx::usb::platform::pipe<device<>, interface>::isoc |
|
inherited |
|
inherited |
|
staticconstexprinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
a synchronous transfer's bound, 0: none
|
protectedinherited |
| struct { ... } dx::usb::platform::pipe<device<>, interface>::winusb |