|
dxd - dynax driver framework 3.0.1d223
cross platform open source driver development framework
|
the platform half of a USB device: the IOKit registry entry, the IOUSBLib device interface and the open count over it - what dx::usb::device puts its descriptors and interfaces on More...
#include <dx_usb_platform_device.h>
Classes | |
| struct | void_struct |
Public Types | |
| typedef shared::event | event_t |
| typedef std::set< std::string > | keys |
| enum | type |
| the value types this store keeps - a scalar rides as REG_DWORD/REG_QWORD rather than as a byte copy, so a value written here reads like any other in the registry editor More... | |
Public Member Functions | |
| catch (...) | |
| catch (...) | |
| device & | clear () |
| device & | close () noexcept |
| device & | close (bool force=false) noexcept |
| void | conclude () noexcept override |
| conclude notification: device will be removed from tree | |
| uint8_t | configuration () const |
| unsigned char | configuration () const noexcept |
| virtual uint8_t | configuration (uint8_t configuration) |
| virtual unsigned char | configuration (unsigned char configuration) |
| uint8_t | configurations () const |
| unsigned char | configurations () const noexcept |
| auto | count () const noexcept |
| auto | count () const noexcept |
| void | ctl (uint32_t ioctl) const |
| device (decltype(super::driver)&driver, ::io_service_t id, const std::pair< std::string, std::string > &identity={}) | |
| device (decltype(super::driver)&driver, decltype(super::id)&id, const std::pair< std::string, std::string > &identity={}) | |
| the device class constructor | |
| registry & | erase (const char *subkey=nullptr) noexcept |
| 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) const |
| current bus frame number; timestamp: dx::timestamp() of the readout | |
| uint64_t | frame (int64_t *timestamp=nullptr) const |
| current bus frame number; timestamp: dx::timestamp() of the readout | |
| virtual void | free () noexcept |
| value_t | get () const |
| ::CFTypeRef | get (::CFStringRef key) const |
| ::CFTypeRef | get (::CFStringRef key, ::CFTypeRef dflt) const noexcept |
| value_t | get (::CFStringRef key, value_t dflt) const noexcept |
| ::CFTypeRef | get (key_t key) const |
| bool | get (value_t &value) const |
| template<typename value_t, typename = cf::enable_if_convertible<value_t>> | |
| value_t | get (::CFStringRef key) const |
| ::CFTypeRef | get (::CFStringRef key) const |
| template<typename value_t, typename = cf::enable_if_convertible<value_t>> | |
| value_t | get (::CFStringRef key, ::CFTypeRef dflt) const noexcept |
| ::CFTypeRef | 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 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 key_t, typename = cf::enable_if_convertible<key_t>> | |
| ::CFTypeRef | get (key_t key) const |
| template<typename rx_t> | |
| size_t | ictl (unsigned int ioctl, rx_t &rx) const |
| hide_if_scalar_or_ptr< rx_t > | ictl (uint32_t ioctl) const |
| member ioctl | |
| void | info (std::ostream &os) noexcept override |
| log object class information | |
| registry & | initialize (::HKEY root, ::REGSAM rights=KEY_ALL_ACCESS) |
| registry & | initialize (::REGSAM rights=KEY_ALL_ACCESS, ::HKEY root=HKEY_CURRENT_USER) |
| void | initialize (const char *name, ::DWORD access=GENERIC_READ|GENERIC_WRITE, ::DWORD share=FILE_SHARE_READ|FILE_SHARE_WRITE) |
| (re-)initialization the underlaying windows API is CreateFile(). for detailed information see http://msdn.microsoft.com/en-us/library/aa363858(VS.85).aspx | |
| registry & | initialize (const std::string &key, ::HKEY root=HKEY_CURRENT_USER, ::REGSAM rights=KEY_ALL_ACCESS) |
| template<typename rx_t, typename tx_t> | |
| rx_t | ioctl (unsigned int ioctl, const tx_t &tx) const |
| size_t | ioctl (uint32_t ioctl, const tx_t &tx, rx_t &rx) const |
| void | launch () override |
| launch notification: object mounted and ready to use. Called only through try_launch() - never call this directly from outside the class hierarchy. | |
| template<typename tx_t> | |
| void | octl (unsigned int ioctl, const tx_t &tx) const |
| device & | octl (uint32_t ioctl, const tx_t &tx) |
| device & | open () |
| opens the USB device for exclusice access | |
| device & | open () |
| for macOS compatibility only | |
| 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 const ::io_registry_entry_t & () const noexcept | |
| auto converter into const io_object | |
| operator const os_event () const noexcept | |
| operator const std::string & () const noexcept | |
| identifying device string, mirroring macOS' io::registry conversion | |
| operator os_event () noexcept | |
| operator uint64_t () const | |
| operator uint64_t () const | |
| operator::CFMutableDictionaryRef () const | |
| operator::CFMutableDictionaryRef () const | |
| operator::CFStringRef () const | |
| operator::CFStringRef () const | |
| operator::HANDLE () const noexcept | |
| operator::HKEY () const noexcept | |
| 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 | |
| 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::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 |
| virtual device & | operator>> (std::ostream &) const |
| the device's own diagnostics, beyond dx::object::info | |
| virtual device & | operator>> (std::ostream &) const |
| the device's own diagnostics, beyond dx::object::info | |
| ::CFTypeRef | operator[] (::CFStringRef key) const |
| ::CFTypeRef | operator[] (key_t key) const |
| ::CFTypeRef | operator[] (::CFStringRef key) const |
| template<typename key_t, typename = cf::enable_if_convertible<key_t>> | |
| ::CFTypeRef | operator[] (key_t key) const |
| registry | parent () const |
| registry | parent () const |
| device & | reenumerate () |
| device & | reenumerate () |
| device & | reset () |
| device & | reset () |
| reference & | retain () |
| reference & | retain () |
| registry & | run () |
| device & | 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 (::DWORD typetype, const void *value, size_t size) |
| registry & | set (::CFStringRef key, ::CFTypeRef value) |
| registry & | set (::CFStringRef key, value_t value) |
| registry & | set (key_t key, ::CFTypeRef value) |
| registry & | set (key_t key, value_t value) |
| registry & | set (::CFStringRef key, ::CFTypeRef 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. | |
| 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) |
| size_t | size () const noexcept |
| virtual void | sleep () |
| notify system will sleep stub | |
| virtual void | sleep () |
| notify system will sleep stub | |
| os_result | status () const noexcept |
| std::string | string (uint8_t) const |
| template<size_t size = 0x100> | |
| std::string | string (unsigned char idx, enum languagelanguage languagelanguage=language::standard) const |
| device & | submit (const control &control) |
| template<typename data_t> | |
| data_t | submit (const control &control) |
| device control request | |
| template<typename data_t = void_struct> | |
| data_t | submit (const control &control, bool autoclear=true) const |
| template<typename data_t> | |
| device & | submit (const requestrequest< data_t > &requestrequest) |
| standard device request | |
| template<typename data_t> | |
| device & | submit (const requestrequest< data_t > &requestrequest, bool autoclear=true) const |
| 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 | |
| type | type () const noexcept |
| virtual void | wake () |
| notify system wake completed stub | |
| virtual void | wake () |
| notify system wake completed stub | |
| ~device () noexcept override=default | |
| ~device () override | |
Static Public Member Functions | |
| static void | assign (const self_t &self, const value_t &value) |
| static registry | at (const self_t &self) |
| static container_t | children (const self_t &self) noexcept |
| static void | create (const char *product_id, const ::GUID &guid, const std::string &id, const desc_t &desc) |
| persisted software device: PnP keeps it enumerated after the creating handle closes | |
| static void | destroy (const char *product_id, const ::GUID &guid, const std::string &id) |
| re-acquires the persisted device and binds it to the closing handle; PnP keeps the removed device's node as a phantom, uninstalled here | |
| static bool | fetch (const self_t &self, value_t &value) |
| static std::pair< std::string, std::string > | identity (::io_service_t id) |
| the device class constructor | |
| static bool | nested (const self_t &self) noexcept |
| static void | purge (const self_t &self) noexcept |
| static size_t | size (const self_t &self) noexcept |
Public Attributes | |
| bool | composite {} |
| indicate WinUSB matched against single interface of composite device; | |
| dx::driver< decltype(id), dx::preference > & | driver |
| dx::driver< decltype(id), dx::preference > & | driver |
| const ::io_service_t | id |
| const ::io_service_t | id |
| std::string | key |
| std::atomic< bool > | launched |
| std::atomic< bool > | launched |
| std::deque< std::function< void()> > | listen |
| dx::preference | preference |
| dx::preference | preference |
| std::string | puid |
| persistent UID - system unique - could change with location | |
| std::string | puid |
| persistent UID - system unique - 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 (i.e. serial number) | |
| bool | schedule_erase |
| enum speed | speed |
Protected Types | |
| typedef service::request< service::stream::data< typename super_device_t::desc_t > > | request |
| typedef pipe< request >::template server< user_client, std::weak_ptr< device > > | server |
| pipe::server connecting user_clients The pipe holds a std::weak_ptr<device> as a temporary by the pipe::server::args variadic tuple to create shared device references for the user_client. At time of device construction there is not yet a std::shared_ptr<device>, therefore the pipe::server::args weak_ptr assignment happens at service::device::launch(). | |
Protected Member Functions | |
| std::string | canonical (const std::string &name) const |
| void | grouped (typename super::group_t &group) override |
| void | initialize (::IOCFPlugInInterface **cf_interface, ::CFUUIDRef uuid) |
| registry & | initialize (const std::string &key, ::REGSAM rights, ::HKEY root, const char *path=nullptr) |
| 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. | |
| ::IOUSBDeviceInterface650 * | operator-> () const |
| operator::IOUSBDeviceInterface650 ** () const | |
Protected Attributes | |
| class dx::service::device::promoted | clocksource |
| bool | connected |
| std::list< promoted > | group_server |
| per-group chains, wired as each group comes into existence (grouped()) | |
| ::HANDLE | handle |
| struct dx::service::device:: { ... } | kernel |
| std::atomic< int > | opened {} |
| class dx::service::device::promoted | pipe |
| server | pipe |
| io::port | port |
| ::HANDLE | process |
| class dx::service::device::promoted | samplerate |
| struct dx::usb::platform::device:: { ... } | winusb |
the platform half of a USB device: the IOKit registry entry, the IOUSBLib device interface and the open count over it - what dx::usb::device puts its descriptors and interfaces on
the platform half of a USB device: the WinUSB handle over the device interface the proxy base opened. composite marks a package that matched one interface of a composite device rather than the whole of it
|
inherited |
|
inherited |
|
protectedinherited |
|
protectedinherited |
pipe::server connecting user_clients The pipe holds a std::weak_ptr<device> as a temporary by the pipe::server::args variadic tuple to create shared device references for the user_client. At time of device construction there is not yet a std::shared_ptr<device>, therefore the pipe::server::args weak_ptr assignment happens at service::device::launch().
|
stronginherited |
the value types this store keeps - a scalar rides as REG_DWORD/REG_QWORD rather than as a byte copy, so a value written here reads like any other in the registry editor
|
inline |
statically gets the device speed
| id | the IOService object to open the device connection for. This will be held (but not retained) during device class lifetime |
|
inlineoverride |
|
inline |
the device class constructor
statically gets the device speed
|
overridedefaultnoexcept |
|
inlinestaticinherited |
|
inlinestaticinherited |
dx::key_value_tree<registry> contract: resolves self's parent chain into one real key/value position, then delegates below - the only place a registry[k1][k2]..[kN] chain becomes real subkeys/values.
|
inlineprotectedinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinestaticnoexceptinherited |
self's own child names as any string container, yielding an empty one when the key is absent or inaccessible. Stays a static, not a dx::key_value_tree-style operator container_t(): registry is a dependent base of key_value_tree<registry> (inherited via the tree_t template parameter), and key_value_tree's own operator value_t() becomes entirely unreachable once a dependent base declares a same-shaped operator container_t() template of its own.
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineoverridevirtualnoexcept |
conclude notification: device will be removed from tree
Reimplemented from dx::object.
|
inline |
|
inlinenoexcept |
|
inlinevirtual |
Reimplemented in dx::usb::device< preference_t >.
|
inlinevirtual |
|
inline |
|
inlinenoexcept |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinestaticinherited |
persisted software device: PnP keeps it enumerated after the creating handle closes
|
inlineinherited |
|
inlinestaticinherited |
re-acquires the persisted device and binds it to the closing handle; PnP keeps the removed device's node as a phantom, uninstalled here
|
inlinenoexceptinherited |
|
inlineoverridevirtualnoexcept |
notification exception handler
Reimplemented from dx::device<::io_service_t, dx::preference >.
|
inlineoverridevirtualnoexcept |
notification exception handler
Reimplemented from dx::device<::io_service_t, dx::preference >.
|
inlinestaticinherited |
a value that serializes itself into a tree node recurses through its own named children; only what has no such serialization reaches the flat position below, where a struct would become one opaque REG_BINARY of its layout
|
inline |
current bus frame number; timestamp: dx::timestamp() of the readout
|
inline |
current bus frame number; timestamp: dx::timestamp() of the readout
|
inlinevirtualnoexceptinherited |
|
inlineinherited |
stays a named method: base and derived conversion function templates are simultaneous overload candidates, so an operator value_t() here would compete with dx::key_value_tree's own.
|
inlineinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlineinherited |
|
inlineinherited |
like get<value_t>() but returns false for ERROR_FILE_NOT_FOUND, from either RegQueryValueExA or value_of() itself; any other failure throws.
|
inlineinherited |
|
inlineinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineoverrideprotectedinherited |
|
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.
|
inlinestatic |
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 |
the registry holds the device's string descriptors before anyone opens it: vendor, product and serial name the device, the path locates it; without a serial the path stands for both
|
inlineoverridevirtualnoexcept |
log object class information
Reimplemented from dx::device<::io_service_t, dx::preference >.
Reimplemented in dx::usb::stream::_device< desc_t, preference_t, stream_t, group_t >, dx::usb::stream::_device< desc_t, dx::preference, pipe< device< desc_t, dx::preference, pipe, group > >, group< device< desc_t, dx::preference, pipe, group > > >, and dx::usb::stream::_device< desc_t, preference_t, stream_t< device< desc_t, preference_t, stream_t, group_t > >, group_t< device< desc_t, preference_t, stream_t, group_t > > >.
|
inlineprotectedinherited |
|
inlineinherited |
|
inlineinherited |
|
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 |
|
inlineprotectedinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineprotectedvirtualinherited |
launch notification: object mounted and ready to use. Called only through try_launch() - never call this directly from outside the class hierarchy.
|
inlineoverrideinherited |
launch notification: object mounted and ready to use. Called only through try_launch() - never call this directly from outside the class hierarchy.
|
inlinestaticnoexceptinherited |
|
inlineinherited |
|
inlineinherited |
|
inline |
opens the USB device for exclusice access
|
inline |
for macOS compatibility only
|
inlinenoexceptinherited |
auto converter into const io_object
|
inlinenoexceptinherited |
auto converter into const io_object
|
inlinenoexceptinherited |
auto converter into const io_object
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
identifying device string, mirroring macOS' io::registry conversion
|
inlinenoexceptinherited |
|
inlineexplicitinherited |
|
inlineexplicitinherited |
|
inlineinherited |
|
inlineexplicitinherited |
|
inlineexplicitinherited |
|
inlineexplicitinherited |
|
inlineexplicitinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
auto converter into 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
|
inlinenoexceptinherited |
auto converter into io_object pointer
|
inlineinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinevirtualinherited |
the device's own diagnostics, beyond dx::object::info
|
inlinevirtualinherited |
the device's own diagnostics, beyond dx::object::info
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinestaticnoexceptinherited |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineinherited |
|
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 |
a sibling thread/process may delete the containing key between value_of()'s create and the set - retry recreates the whole chain in that case
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
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 |
|
inlineinherited |
|
inlinenoexceptinherited |
subkey+value count, 0 if the key doesn't exist (key_of()'s non-throwing overload - an ordinary, expected outcome here, not a genuine error).
|
inlinestaticnoexceptinherited |
|
inlinevirtualinherited |
notify system will sleep stub
|
inlinevirtualinherited |
notify system will sleep stub
|
inlinenoexcept |
|
inlineinherited |
|
inline |
|
inline |
|
inline |
device control request
|
inline |
|
inline |
standard device request
|
inline |
|
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 |
|
inlinenoexceptinherited |
|
inlinevirtualinherited |
notify system wake completed stub
Reimplemented in dx::stream::device< dx::proxy::device< dx::preference >, dx::stream::desc<>, stream< device< dx::stream::desc<>, dx::preference, stream, group > >, group< device< dx::stream::desc<>, dx::preference, stream, group > > >, dx::stream::device< usb::device< dx::preference >, desc_t, pipe< device< desc_t, dx::preference, pipe, group > >, group< device< desc_t, dx::preference, pipe, group > > >, and dx::stream::device< usb::device< preference_t >, desc_t, stream_t, group_t >.
|
inlinevirtualinherited |
notify system wake completed stub
|
protectedinherited |
| bool dx::usb::platform::device< preference_t >::composite {} |
indicate WinUSB matched against single interface of composite device;
|
protectedinherited |
|
inherited |
|
inherited |
|
protectedinherited |
per-group chains, wired as each group comes into existence (grouped())
|
protectedinherited |
|
inherited |
|
inherited |
| struct { ... } dx::service::device< dx::preference >::kernel |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
protected |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
inherited |
|
inherited |
|
protectedinherited |
|
inherited |
persistent UID - system unique - could change with location
|
inherited |
persistent UID - system unique - could change with location
|
inherited |
persistent universal UID - universally unique ID (i.e. serial number)
|
inherited |
persistent universal UID - universally unique ID (i.e. serial number)
|
protectedinherited |
|
inherited |
| enum speed dx::usb::platform::device< preference_t >::speed |
| struct { ... } dx::usb::platform::device< preference_t >::winusb |
| (c) copyright 2009 dynamic acoustics e.U. | generated on |