dxd - dynax driver framework 2.5.0d148
cross platform open source driver development framework
|
#include <dx_usb_stream_device.h>
Public Types | |
typedef desc_t | desc_t |
enum class | speed : uint8_t { low = ::kUSBDeviceSpeedLow , full = ::kUSBDeviceSpeedFull , high = ::kUSBDeviceSpeedHigh , super = ::kUSBDeviceSpeedSuper , superplus = ::kUSBDeviceSpeedSuperPlus , superplus2 = ::kUSBDeviceSpeedSuperPlusBy2 , usb1 = full , usb2 = high , usb3 = super , usb31 = super , usb32 = superplus , usb32x2 = superplus2 , low = ::UsbLowSpeed , full = ::UsbFullSpeed , high = ::UsbHighSpeed , super = ::UsbSuperSpeed , superplus = 4 , superplus2 = 5 , usb1 = full , usb2 = high , usb3 = super , usb31 = super , usb32 = superplus , usb32x2 = superplus2 } |
USB speed. More... | |
enum class | speed : uint8_t { low = ::kUSBDeviceSpeedLow , full = ::kUSBDeviceSpeedFull , high = ::kUSBDeviceSpeedHigh , super = ::kUSBDeviceSpeedSuper , superplus = ::kUSBDeviceSpeedSuperPlus , superplus2 = ::kUSBDeviceSpeedSuperPlusBy2 , usb1 = full , usb2 = high , usb3 = super , usb31 = super , usb32 = superplus , usb32x2 = superplus2 , low = ::UsbLowSpeed , full = ::UsbFullSpeed , high = ::UsbHighSpeed , super = ::UsbSuperSpeed , superplus = 4 , superplus2 = 5 , usb1 = full , usb2 = high , usb3 = super , usb31 = super , usb32 = superplus , usb32x2 = superplus2 } |
Public Member Functions | |
template<typename driver_t > | |
_device (driver_t &driver, decltype(super::id)&id, const desc_t &desc={}) | |
device & | close () noexcept |
device & | close (bool force=false) noexcept |
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. | |
void | conclude () noexcept override |
conclude notifacation: device will be removed from tree | |
uint8_t | configurations () const |
virtual void | configure () |
auto | count () const noexcept |
auto | count () const noexcept |
void | ctl (uint32_t ioctl) const try |
void | ctl (unsigned int ioctl) const |
dx_catchall_handler (this,) void conclude() noexcept override | |
dx_catchall_rethrow () device &open() | |
for macOS compatibility only | |
dx_catchall_rethrow () template< typename data_t >device &submit(const request< data_t > &request) const try | |
standard device request | |
dx_catchall_rethrow () unsigned char configurations() const noexcept | |
dx_catchall_rethrow (, "name: %s, access rights: %x, sharing options:%x", name, access, share) | |
dx_catchall_rethrow (if(autoclear) try {const_cast< device * >(this) ->clear();} dx_catchall(), "handle: %p size: %lld request: %x idx: %x value: %x length: %x", winusb.handle, sizeof(request), request.control::request, request.index, request.value, request.length) template< typename data_t | |
dx_catchall_rethrow (try {if(exception.error==stalled) const_cast< device * >(this) ->clear();} dx_catchall_handler(this,), "request type:%x [recipient:%d type:%x direction:%x] request:%x value:%x index:%x length:%d", reinterpret_cast< const uint8_t & >(request), request.recipient, request.type, request.direction, request.control::request, request.value, request.index, request.length) template< typename data_t >data_t submit(const control &control) const | |
device control request | |
dx_pass (::IOConnectCallStructMethod(io_connect, ioctl, nullptr, 0, &rx, &size), "%s rx:%p size:%d", fourchar::to::string(ioctl).c_str(), &rx, size) | |
virtual uint64_t | frame () const try |
uint64_t | frame () const try |
::CFTypeRef | get (::CFStringRef key) const |
template<typename value_t , typename = cf::enable_if_convertible<value_t>> | |
value_t | get (::CFStringRef key) const |
::CFTypeRef | get (::CFStringRef key, ::CFTypeRef dflt) const noexcept |
template<typename value_t , typename = cf::enable_if_convertible<value_t>> | |
value_t | get (::CFStringRef key, ::CFTypeRef dflt) const noexcept |
template<typename value_t , typename = cf::enable_if_convertible<value_t>> | |
value_t | get (::CFStringRef key, value_t dflt) const noexcept |
template<typename value_t , typename = cf::enable_if_convertible<value_t>> | |
value_t | get (::CFStringRef key, value_t dflt) const noexcept |
template<typename key_t , typename = cf::enable_if_convertible<key_t>> | |
::CFTypeRef | get (key_t key) const |
template<typename key_t , typename value_t , typename = cf::enable_if_convertible<key_t>, typename = cf::enable_if_convertible<value_t>> | |
value_t | get (key_t key) const |
virtual void | hw_clock (dx::event< user > &hw_clock) |
template<typename rx_t > | |
rx_t | ictl (unsigned int ioctl) const |
Windows: member ioctl. | |
template<typename rx_t > | |
size_t | ictl (unsigned int ioctl, rx_t &rx) const |
void | info (std::ostream &os) noexcept override |
log object class information | |
void | initialize (const char *name, ::DWORD access=GENERIC_READ|GENERIC_WRITE, ::DWORD share=FILE_SHARE_READ|FILE_SHARE_WRITE) try |
(re-)initialization the underlaying windows API is CreateFile(). for detailed information see http://msdn.microsoft.com/en-us/library/aa363858(VS.85).aspx | |
template<typename rx_t , typename tx_t > | |
rx_t | ioctl (unsigned int ioctl, const tx_t &tx) const |
template<typename tx_t , typename rx_t > | |
size_t | ioctl (unsigned int ioctl, const tx_t &tx, rx_t &rx) const |
void | launch () override |
launch notification: object mounted and ready to use | |
template<typename tx_t > | |
void | octl (unsigned int ioctl, const tx_t &tx) const |
device & | open () |
opens the USB device for exclusice access | |
operator const ::io_registry_entry_t & () const noexcept | |
auto converter into const io_object | |
operator const ::io_registry_entry_t & () const noexcept | |
auto converter into const io_object | |
operator uint64_t () const | |
operator uint64_t () const | |
operator::CFMutableDictionaryRef () const | |
operator::CFMutableDictionaryRef () const | |
operator::CFStringRef () const | |
operator::CFStringRef () const | |
operator::io_registry_entry_t & () noexcept | |
auto converter into io_object | |
operator::io_registry_entry_t & () noexcept | |
auto converter into io_object | |
operator::io_registry_entry_t * () noexcept | |
auto converter into io_object pointer | |
operator::io_registry_entry_t * () noexcept | |
auto converter into io_object pointer | |
bool | operator== (::io_registry_entry_t io_object) const noexcept |
bool | operator== (::io_registry_entry_t io_object) const noexcept |
::CFTypeRef | operator[] (::CFStringRef key) const |
::CFTypeRef | operator[] (::CFStringRef key) const |
template<typename key_t , typename = cf::enable_if_convertible<key_t>> | |
::CFTypeRef | operator[] (key_t key) const |
template<typename key_t , typename = cf::enable_if_convertible<key_t>> | |
::CFTypeRef | operator[] (key_t key) const |
device & | reenumerate () |
device & | reset () |
reference & | retain () |
reference & | retain () |
registry & | set (::CFStringRef key, ::CFTypeRef value) |
registry & | set (::CFStringRef key, ::CFTypeRef value) noexcept |
template<typename value_t , typename = cf::enable_if_convertible<value_t>> | |
registry & | set (::CFStringRef key, value_t value) |
template<typename value_t , typename = cf::enable_if_convertible<value_t>> | |
registry & | set (::CFStringRef key, value_t value) |
registry & | set (::CFTypeRef properties) |
Setting properties in a registry entry is not generally supported, it is more common to support setting of properties of the connection based property setting of dx::device. | |
registry & | set (::CFTypeRef properties) |
Setting properties in a registry entry is not generally supported, it is more common to support setting of properties of the connection based property setting of dx::device. | |
template<typename key_t , typename = cf::enable_if_convertible<key_t>> | |
registry & | set (key_t key, ::CFTypeRef value) |
template<typename key_t , typename = cf::enable_if_convertible<key_t>> | |
registry & | set (key_t key, ::CFTypeRef value) |
template<typename key_t , typename value_t , typename = cf::enable_if_convertible<key_t>, typename = cf::enable_if_convertible<value_t>> | |
registry & | set (key_t key, value_t value) |
template<typename key_t , typename value_t , typename = cf::enable_if_convertible<key_t>, typename = cf::enable_if_convertible<value_t>> | |
registry & | set (key_t key, value_t value) |
virtual bool | start (uint64_t=0, unsigned int starting=1) |
virtual unsigned int | stop (bool force=false) noexcept |
device & | submit (const control &control) const |
template<typename data_t > | |
device & | submit (const request< data_t > &request, bool autoclear=true) const try |
Public Attributes | ||
union { | ||
struct { | ||
struct { | ||
struct { | ||
uint8_t id | ||
} selector | ||
struct { | ||
uint8_t id | ||
} source | ||
} clock | ||
} v2 | ||
} | adc | |
uint16_t | bcdADC = 0 | |
promoted< uint32_t >::preference< preference_t > | clocksource | |
bool | composite = false | |
indicate WinUSB matched against single interface of composit device; | ||
std::atomic< size_t > | counter | |
dx::driver< decltype(id)> & | driver | |
dx::driver< decltype(id)> & | driver | |
dx::driver< decltype(id)> & | driver | |
struct { | ||
dx::event< user > * clock | ||
std::atomic< size_t > counter | ||
uint32_t iosize | ||
} | hw | |
std::weak_ptr< dx::circular > | implicit_feedback | |
uint32_t | iosize | |
promoted< uint32_t >::preference< preference_t > | iosize | |
bool | launched {} | |
bool | launched {} | |
bool | launched {} | |
dx::stream::device::monitor | monitor | |
std::deque< std::function< void(control &)> | notify ) | |
preference_t | preference | |
std::string | puid | |
persistent UID - system unique - could change with location | ||
std::string | puid | |
persistent UID (i.e. serial number) - system unique - if no other option to identify could change with location | ||
std::string | puuid | |
persistent universal UID - universally unique ID (i.e. serial number) | ||
std::string | puuid | |
persistent universal UID - universally unique ID | ||
promoted< uint32_t >::preference< preference_t > | safety_offset [direction::directions] | |
return | size | |
enum dx::usb::platform::device::speed | speed | |
std::atomic< unsigned int > | started | |
std::map< decltype(_desc_t::stream::target.idx()), std::weak_ptr< stream_t > > | streams | |
promoted< uint32_t >::preference< preference_t > | sync_cycle_ticks | |
promoted< uint32_t >::preference< preference_t > | sync_reference | |
rx_t &rx const | try | |
dx::stream::device::monitor | version | |
Protected Types | |
enum class | type : ::DWORD { undefined = REG_NONE , uint32 = REG_DWORD , uint64 = REG_QWORD , string = REG_SZ , vendor = REG_BINARY } |
Protected Member Functions | |
dx_catchall_rethrow() class iterator iterator | begin () const |
iterator | end () const |
registry & | erase (const char *subkey=nullptr) try |
virtual void | flush () |
virtual void | halt () |
void | initialize (::IOCFPlugInInterface **cf_interface, ::CFUUIDRef uuid) |
registry & | initialize (const std::string &key, ::HKEY root=HKEY_CURRENT_USER, ::REGSAM rights=KEY_ALL_ACCESS) try |
registry & | initialize (const std::string &key, ::REGSAM rights, ::HKEY root, const char *path=nullptr) try |
void | initialize (io_object_t io_object, ::CFUUIDRef type, ::CFUUIDRef uuid) |
std::string | key_from_index (size_t index) const try |
dx_catchall_rethrow() registry &initialize( | operator keys () const noexcept |
::IOUSBDeviceInterface650 * | operator-> () const |
operator::IOUSBDeviceInterface650 ** () const | |
Protected Attributes | ||
struct { | ||
struct { | ||
bool initialized | ||
uint32_t value | ||
} samplerate | ||
} | cache | |
bool | connected = false | |
struct { | ||
cf::type< const char * > bundle_id | ||
cf::type< const char * > class_name | ||
} | kernel | |
std::atomic< int > | opened {} | |
io::port | port | |
decltype(super::samplerate) ::chain | samplerate_server | |
std::recursive_mutex | start_stop_in_progress | |
start/stop operation in progress | ||
struct { | ||
::WINUSB_INTERFACE_HANDLE handle | ||
} | winusb | |
|
inherited |
|
stronginherited |
|
stronginherited |
|
strongprotectedinherited |
|
inline |
|
inlineprotectedinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
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, preference_t, stream_t >, dx::usb::pipe< device_t >, dx::usb::pipe< device_t >, dx::virtuel::stream::_device< desc_t, preference_t, stream_t >, dx::proxy::device, dx::map::driver< device >, and dx::map::driver< device_t >.
|
inlineoverridevirtualnoexceptinherited |
conclude notifacation: device will be removed from tree
Reimplemented from dx::object.
Reimplemented in dx::proxy::stream::_device< desc_t, preference_t, stream_t >.
|
inlineinherited |
|
inlinevirtual |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineoverridenoexceptinherited |
|
inlineinherited |
for macOS compatibility only
|
inlineinherited |
standard device request
|
inlinenoexceptinherited |
|
inherited |
|
inherited |
|
inlineinherited |
device control request
|
inherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineprotectedvirtualinherited |
|
inlinevirtualinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineprotectedvirtualinherited |
|
inlinevirtualinherited |
|
inlineinherited |
Windows: member ioctl.
this member retreives data from the device by providing an IOCTL code. the template argument defines the type of data to be retreived. this member is intended as a convinient way to retreive only small amounts of data since there is an intermediate stack copy involved in returning the data.
the underlaying windows API is DeviceIoControl(). for detailed information see http://msdn.microsoft.com/en-us/library/aa363216(VS.85).aspx
n/a | microsoft does not give information about what possible errors values are provided by its OS other than |
ERROR_INSUFFICIENT_BUFFER | if the output buffer is too small to receive any data |
|
inlineinherited |
|
inlineoverridevirtualnoexcept |
log object class information
Reimplemented from dx::stream::device< dx::stream::control< usb::device >, desc_t, preference_t, stream_t >.
|
inlineprotectedinherited |
|
inlineinherited |
(re-)initialization the underlaying windows API is CreateFile(). for detailed information see http://msdn.microsoft.com/en-us/library/aa363858(VS.85).aspx
n/a | microsoft does not give information about what possible errors values are provided by its OS |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
protectedinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineprotectedinherited |
|
inlineoverridevirtual |
launch notification: object mounted and ready to use
Reimplemented from dx::object.
|
inlineinherited |
|
inlineinherited |
opens the USB device for exclusice access
|
inlinenoexceptinherited |
auto converter into const io_object
|
inlinenoexceptinherited |
auto converter into const io_object
|
inlineprotectednoexceptinherited |
|
inlineexplicitinherited |
|
inlineexplicitinherited |
|
inlineinherited |
|
inlineexplicitinherited |
|
inlineexplicitinherited |
|
inlineexplicitinherited |
|
inlineexplicitinherited |
|
inlinenoexceptinherited |
auto converter into io_object
|
inlinenoexceptinherited |
auto converter into io_object
|
inlinenoexceptinherited |
auto converter into io_object pointer
|
inlinenoexceptinherited |
auto converter into io_object pointer
|
inlineinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinenoexceptinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Setting properties in a registry entry is not generally supported, it is more common to support setting of properties of the connection based property setting of dx::device.
|
inlineinherited |
Setting properties in a registry entry is not generally supported, it is more common to support setting of properties of the connection based property setting of dx::device.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinevirtualinherited |
result indicates if start changed the state.
|
inlinevirtualnoexceptinherited |
result indicates the amount of stopped start references
|
inlineinherited |
union { ... } dx::usb::stream::_device< desc_t, preference_t, stream_t >::adc |
uint16_t dx::usb::stream::_device< desc_t, preference_t, stream_t >::bcdADC = 0 |
|
inherited |
struct { ... } dx::usb::stream::_device< desc_t, preference_t, stream_t >::cache |
struct { ... } dx::usb::stream::_device< desc_t, preference_t, stream_t >::clock |
|
inherited |
|
inherited |
indicate WinUSB matched against single interface of composit device;
|
protectedinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
struct { ... } dx::stream::device< dx::stream::control< usb::device > , desc_t , preference_t, stream_t >::hw |
uint8_t dx::usb::stream::_device< desc_t, preference_t, stream_t >::id |
std::weak_ptr<dx::circular> dx::usb::stream::_device< desc_t, preference_t, stream_t >::implicit_feedback |
bool dx::usb::stream::_device< desc_t, preference_t, stream_t >::initialized |
|
inherited |
|
inherited |
struct { ... } dx::proxy::device::kernel |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
protectedinherited |
|
protectedinherited |
|
inherited |
|
inherited |
persistent UID - system unique - could change with location
|
inherited |
persistent UID (i.e. serial number) - system unique - if no other option to identify could change with location
|
inherited |
persistent universal UID - universally unique ID (i.e. serial number)
|
inherited |
persistent universal UID - universally unique ID
|
inherited |
struct { ... } dx::usb::stream::_device< desc_t, preference_t, stream_t >::samplerate |
|
protected |
struct { ... } dx::usb::stream::_device< desc_t, preference_t, stream_t >::selector |
|
inherited |
struct { ... } dx::usb::stream::_device< desc_t, preference_t, stream_t >::source |
|
inherited |
|
protectedinherited |
start/stop operation in progress
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
struct { ... } dx::usb::stream::_device< desc_t, preference_t, stream_t >::v2 |
uint32_t dx::usb::stream::_device< desc_t, preference_t, stream_t >::value |
|
inherited |
struct { ... } dx::usb::platform::device::winusb |
(c) copyright 2009 dynamic acoustics e.U. | generated on Fri Aug 22 2025 |