dxd - dynax driver framework 2.1.0d71
cross platform open source driver development framework
|
#include <dx_usb_device_platform.h>
Public Types | |
typedef ::io_service_t | creator |
enum class | speed : uint8_t { 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 | |
device & | close () 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. | |
virtual void | conclude () noexcept |
conclude notification: device will be removed from tree | |
unsigned char | configuration () const noexcept |
virtual unsigned char | configuration (unsigned char configuration) try |
auto | count () const noexcept |
auto | count () const noexcept |
void | ctl (uint32_t ioctl) const |
void | ctl (unsigned int ioctl) const |
device (generic::driver &driver, ::io_service_t io_service) | |
the device class constructor | |
device (generic::driver &driver, const creator &creator) | |
the device class constructor | |
dx_catchall_rethrow () bool operator | |
dx_catchall_rethrow () device &open() | |
for macOS compatibility only | |
dx_catchall_rethrow () struct void_struct | |
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) ->reset();} 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 | |
registry & | erase (const char *key=nullptr) |
void | exception (const dx::exception &exception, bool filtered=false) const noexcept override |
notification exception handler | |
uint64_t | frame () const |
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 |
template<typename rx_t > | |
rx_t | ictl (uint32_t ioctl) const |
member ioctl | |
template<typename rx_t > | |
size_t | ictl (uint32_t ioctl, rx_t &rx) const |
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 |
virtual void | info ()=0 |
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 | |
void | initialize (const char *path, ::HKEY root, ::REGSAM rights=KEY_READ, const char *key=nullptr) |
void | initialize (const char *path, ::REGSAM rights=KEY_READ, ::HKEY root=HKEY_CURRENT_USER, const char *key=nullptr) |
template<typename rx_t , typename tx_t > | |
rx_t | ioctl (uint32_t ioctl, const tx_t &tx) const |
template<typename rx_t , typename tx_t > | |
size_t | ioctl (uint32_t ioctl, const tx_t &tx, rx_t &rx) const |
size_t | ioctl (uint32_t ioctl, const void *tx=nullptr, size_t tx_size=0, void *rx=nullptr, size_t rx_size=0) const |
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 |
virtual void | launch () |
launch notification: object mounted and ready to use | |
virtual void | launch () |
launch notification: device mounted in tree and ready to use | |
template<typename tx_t > | |
void | octl (uint32_t ioctl, const tx_t &tx) const |
template<typename tx_t > | |
void | octl (unsigned int ioctl, const tx_t &tx) const |
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 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 | |
operator std::string () const | |
operator uint64_t () const | |
operator uint64_t () const | |
template<typename value_t > | |
operator value_t () const | |
template<typename value_t > | |
value_t | operator() (value_t dflt) const |
operator::CFMutableDictionaryRef () const | |
operator::CFMutableDictionaryRef () const | |
operator::CFStringRef () const | |
operator::CFStringRef () const | |
operator::HKEY () const noexcept | |
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 |
registry | operator[] (const char *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) |
device & | submit (const control &control) const |
template<typename data_t > | |
device & | submit (const request< data_t > &request) const try |
standard device request | |
template<typename data_t > | |
device & | submit (const request< data_t > &request, bool autoclear=true) const try |
~device () noexcept override | |
Public Attributes | |
bool | composite = false |
indicate WinUSB matched against single interface of composit device; | |
generic::driver & | driver |
bool | launched {} |
bool | launched = false |
cf::preference | preference |
enum dx::usb::platform::device::speed | speed |
Protected Member Functions | |
void | initialize (::IOCFPlugInInterface **cf_interface, ::CFUUIDRef uuid) |
void | initialize (io_object_t io_object, ::CFUUIDRef type, ::CFUUIDRef uuid) |
::IOUSBDeviceInterface650 * | operator-> () const |
operator::IOUSBDeviceInterface650 ** () const | |
Protected Attributes | ||
struct { | ||
cf::type< const char * > bundle_id | ||
cf::type< const char * > class_name | ||
} | kernel | |
std::atomic< int > | opened {} | |
io::port | port | |
struct { | ||
::WINUSB_INTERFACE_HANDLE handle | ||
} | winusb | |
typedef ::io_service_t dx::usb::platform::device::creator |
|
strong |
|
inline |
the device class constructor
kIOReturn | NoMemory means that the system couldn't allocate the class defined in the drivers plist, or nub which ever its trying connecting to |
obtain version info
statically gets the device speed
io_service | the IOService object to open the device connection for. This will be held (but not retained) during device class lifetime |
|
inlineoverridevirtualnoexcept |
Reimplemented from dx::device.
|
inline |
the device class constructor
statically gets the device speed
|
inlinenoexcept |
|
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::coreaudio::driver< dx::coreaudio::device >, dx::coreaudio::driver< device_t >, and dx::coreaudio::device.
|
inlinevirtualnoexceptinherited |
conclude notification: device will be removed from tree
|
inlinenoexcept |
|
inlinevirtual |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlineinherited |
|
inlineinherited |
dx::usb::platform::device::dx_catchall_rethrow | ( | ) |
|
inline |
for macOS compatibility only
|
inline |
|
inlinenoexcept |
|
inherited |
dx::usb::platform::device::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 ) |
|
inline |
device control request
|
inlineinherited |
|
inlineoverridevirtualnoexcept |
notification exception handler
Implements dx::object.
|
inline |
|
inline |
|
inlineinherited |
|
inlineinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
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.
|
inlineinherited |
|
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 |
|
pure virtualinherited |
log object class information
Implemented in dx::virtuel::stream::device< desc_t >, dx::coreaudio::driver< dx::coreaudio::device >, dx::coreaudio::driver< device_t >, and dx::coreaudio::device.
|
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 |
|
inlineinherited |
|
inlineinherited |
|
protectedinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinevirtualinherited |
launch notification: object mounted and ready to use
Reimplemented in dx::usb::stream::device< desc_t >, dx::coreaudio::driver< dx::coreaudio::device >, and dx::coreaudio::driver< device_t >.
|
inlinevirtualinherited |
launch notification: device mounted in tree and ready to use
Reimplemented in dx::usb::stream::device< desc_t >.
|
inlineinherited |
|
inlineinherited |
|
inlinenoexceptinherited |
auto converter into const io_object
|
inlinenoexceptinherited |
auto converter into const io_object
|
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 |
|
inlineexplicitinherited |
|
inlineexplicitinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineexplicitinherited |
|
inlineexplicitinherited |
|
inlineexplicitinherited |
|
inlineexplicitinherited |
|
inlinenoexceptinherited |
|
inlineinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inline |
|
inline |
|
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 |
|
inline |
standard device request
|
inline |
cf::type<const char*> dx::usb::platform::device::bundle_id |
cf::type<const char*> dx::usb::platform::device::class_name |
bool dx::usb::platform::device::composite = false |
indicate WinUSB matched against single interface of composit device;
generic::driver& dx::usb::platform::device::driver |
::WINUSB_INTERFACE_HANDLE dx::usb::platform::device::handle |
struct { ... } dx::usb::platform::device::kernel |
|
inherited |
|
inherited |
|
protected |
|
protectedinherited |
cf::preference dx::usb::platform::device::preference |
struct { ... } dx::usb::platform::device::winusb |
(c) copyright 2009 dynamic acoustics e.U. | generated on Wed Oct 2 2024 |