dxd - dynax driver framework 3.0.1d223
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::proxy::device< preference_t > Class Template Reference

OS proxy device driver interface class. More...

#include <dx_proxy_device.h>

Inheritance diagram for dx::proxy::device< preference_t >:
Collaboration diagram for dx::proxy::device< preference_t >:

Classes

class  software
 Software Device API instance. More...

Public Types

typedef shared::event event_t
typedef std::set< std::string > keys
enum class  type : ::DWORD {
  undefined = REG_NONE , uint32 = REG_DWORD , uint64 = REG_QWORD , string = REG_SZ ,
  vendor = REG_BINARY
}
 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 (...)
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.
void conclude () noexcept override
 conclude notifacation: device will be removed from tree
auto count () const noexcept
void ctl (uint32_t ioctl) const
void ctl (unsigned int ioctl) const
 device (decltype(super::driver)&driver, ::io_service_t id)
 the device class constructor
 device (decltype(super::driver)&driver, const std::string &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
virtual void free () noexcept
template<typename value_t>
value_t get () const
template<typename value_t>
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>
enable_if_ptr< rx_t > ictl (uint32_t ioctl) const
template<typename rx_t>
enable_if_scalar< rx_t > ictl (uint32_t ioctl) const
template<typename rx_t>
hide_if_scalar_or_ptr< 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
void info (std::ostream &os) noexcept override
 log object class information
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)
 (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 (::HKEY root, ::REGSAM rights=KEY_ALL_ACCESS)
registry & initialize (::REGSAM rights=KEY_ALL_ACCESS, ::HKEY root=HKEY_CURRENT_USER)
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 (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
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, typename = hide_if_ptr<tx_t>>
device & octl (uint32_t ioctl, const tx_t &tx)
template<typename tx_t, typename = enable_if_ptr<tx_t>>
device & octl (uint32_t ioctl, const tx_t tx)
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 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::CFMutableDictionaryRef () 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 pointer
 operator::io_registry_entry_t * () noexcept
 auto converter into io_object pointer
device & operator= (::CFTypeRef properties)
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
template<typename key_t, typename = cf::enable_if_convertible<key_t>>
::CFTypeRef operator[] (key_t key) const
registry parent () const
reference & retain ()
registry & run ()
device & set (::CFStringRef key, ::CFTypeRef value) noexcept
template<typename value_t, typename = cf::enable_if_convertible<value_t>>
device & set (::CFStringRef key, value_t value)
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.
template<typename key_t, typename = cf::enable_if_convertible<key_t>>
device & 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>>
device & set (key_t key, value_t value)
registry & set (::DWORD typetype, const void *value, size_t size)
size_t size () const noexcept
virtual void sleep ()
 notify system will sleep stub
virtual void sleep ()
 notify system will sleep stub
std::string string (uint8_t) 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 () override
 the device class destructor

Static Public Member Functions

template<typename value_t, typename self_t>
static void assign (const self_t &self, const value_t &value)
template<typename self_t>
static registry at (const self_t &self)
template<typename container_t, typename self_t>
static container_t children (const self_t &self) noexcept
template<typename desc_t>
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
template<typename value_t, typename self_t>
static bool fetch (const self_t &self, value_t &value)
template<typename self_t>
static bool nested (const self_t &self) noexcept
template<typename self_t>
static void purge (const self_t &self) noexcept
template<typename self_t>
static size_t size (const self_t &self) noexcept

Public Attributes

dx::driver< decltype(id), preference_t > & driver
dx::driver< decltype(id), preference_t > & driver
const std::string id
const ::io_service_t id
std::string key
std::atomic< bool > launched
std::atomic< bool > launched
std::deque< std::function< void()> > listen
preference_t preference
preference_t 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 {}

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
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.

Protected Attributes

class dx::service::device::promoted clocksource
bool connected = false
std::list< promoted > group_server
 per-group chains, wired as each group comes into existence (grouped())
::HANDLE handle {invalid_t}
struct dx::service::device:: { ... }  kernel
class dx::service::device::promoted pipe
server pipe
io::port port
::HANDLE process {::GetCurrentProcess()}
class dx::service::device::promoted samplerate

Detailed Description

template<typename preference_t>
class dx::proxy::device< preference_t >

OS proxy device driver interface class.

OS proxy driver interface class.

OS proxy device interface class.

This is the specific device interface to a driver identified by a matching IDs. The driver class is a helper to create device objects and to bind the device to the driver identified by the product ID.

Exceptions
incase of an error returned by the underlaying API the driver class throws a dx::exception.

This is the OS proxy device interface class. This class is used for a platform independent way of accessing kernel/driverkit devices. The device class uses the driver interface helper class to construct the device object and to bind the device to the driver identified by the GUID.

example:

try() { // guard the block
// choose a driver
// enumerate devices
std::cout<< driver.size()<< " device(s) found:"<< std::endl;
// go thru all devices; you have to lock the driver if this multi-threaded
for (auto device: driver){
// return an int32_t from an IOCTL served by the driver
int32_t my_data{device.ioctl<int32_t>(kMyIoctl)};
}
} cd_catchall()
dx::driver< decltype(id), preference_t > & driver
Definition dx_device.h:54
device(decltype(super::driver)&driver, ::io_service_t id)
the device class constructor
Definition macOS/proxy/dx_proxy_device.h:164
Definition macOS/proxy/dx_proxy_driver.h:53
int int32_t
Definition wdk/dxd_platform.h:116
Exceptions
incase of an error returned by the underlaying API the device class throws an exception converted from dx::os_result. with the default exception_t=dx::os_result template parameter the dx::os_result itself will be thrown.

This is the specific device interface to a driver identified by a matching IDs. The driver class is a helper to create device objects and to bind the device to the driver identified by the product GUID.

Exceptions
incase of an error returned by the underlaying API the driver class throws a dx::exception.
Todo
distinguish between "driver not installed" and "no device"

Member Typedef Documentation

◆ event_t

template<typename preference_t>
typedef shared::event dx::service::device< preference_t >::event_t
inherited

◆ keys

typedef std::set<std::string> dx::registry::keys
inherited

◆ request

template<typename preference_t>
typedef service::request<service::stream::data<typename super_device_t::desc_t> > dx::service::device< preference_t >::request
protectedinherited

◆ server

template<typename preference_t>
typedef pipe<request>::template server<user_client, std::weak_ptr<device> > dx::service::device< preference_t >::server
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().

Member Enumeration Documentation

◆ type

enum class dx::registry::type : ::DWORD
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

Enumerator
undefined 
uint32 
uint64 
string 
vendor 

Constructor & Destructor Documentation

◆ device() [1/2]

template<typename preference_t>
dx::proxy::device< preference_t >::device ( decltype(super::driver)& driver,
::io_service_t id )
inline

the device class constructor

Exceptions
kIOReturnNoMemory means that the system couldn't allocate the class defined in the drivers plist, or nub which ever its trying connecting to

Constructs and open device,

connects notification port and ignores if it failed: It will fail on drivers not providing a notificaion port, like Apple Family drivers.

Todo
proxy::device: find a way to set notification port only propratary DriverKit devices and except on failure to do so.
Parameters
driverdevice tree hosting dx::driver
idthe IOService object to open the device connection for. This will be retained during device class lifetime
Here is the caller graph for this function:

◆ ~device()

template<typename preference_t>
dx::proxy::device< preference_t >::~device ( )
inlineoverride

the device class destructor

the underlaying IOKit API is IOServiceClose().

remark: The io_service reference itself is managed by inherited io::reference

for detailed information see

Disconnect notification port,

closes the connection to the IOService object

Here is the call graph for this function:

◆ device() [2/2]

template<typename preference_t>
dx::proxy::device< preference_t >::device ( decltype(super::driver)& driver,
const std::string & id,
const std::pair< std::string, std::string > & identity = {} )
inline

the device class constructor

the underlaying windows API is RegisterDeviceNotification(). for detailed information see http://msdn.microsoft.com/en-us/library/windows/desktop/aa363431(v=vs.85).aspx

Exceptions
n/amicrosoft does not give information about what possible errors values are provided by its OS

Member Function Documentation

◆ assign()

template<typename value_t, typename self_t>
void dx::registry::assign ( const self_t & self,
const value_t & value )
inlinestaticinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ at()

template<typename self_t>
registry dx::registry::at ( const self_t & self)
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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ canonical()

std::string dx::registry::canonical ( const std::string & name) const
inlineprotectedinherited
Here is the caller graph for this function:

◆ catch() [1/2]

dx::registry::catch ( ...)
inlineinherited

◆ catch() [2/2]

dx::registry::catch ( ...)
inlineinherited

◆ children()

template<typename container_t, typename self_t>
container_t dx::registry::children ( const self_t & self)
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.

Here is the call graph for this function:

◆ conclude() [1/2]

template<typename preference_t>
void dx::proxy::device< preference_t >::conclude ( )
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::object.

Reimplemented in dx::proxy::stream::_device< desc_t, preference_t, stream_t, group_t >, dx::proxy::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 > > >, dx::proxy::stream::_device< dx::stream::desc<>, dx::preference, stream< device< dx::stream::desc<>, dx::preference, stream, group > >, group< device< dx::stream::desc<>, dx::preference, stream, group > > >, 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< dx::proxy::device< preference_t >, desc_t, stream_t, group_t >, 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 > > >, dx::stream::device< usb::device< preference_t >, desc_t, stream_t, group_t >, dx::usb::device< preference_t >, dx::usb::device< dx::preference >, dx::usb::platform::device< preference_t >, dx::usb::platform::device< dx::preference >, and dx::usb::platform::device< preference_t >.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ conclude() [2/2]

template<typename preference_t>
void dx::proxy::device< preference_t >::conclude ( )
inlineoverridevirtualnoexcept

◆ count()

auto io::reference< ::io_registry_entry_t >::count ( ) const
inlinenoexceptinherited
Here is the caller graph for this function:

◆ create()

template<typename preference_t>
template<typename desc_t>
void dx::proxy::device< preference_t >::create ( const char * product_id,
const ::GUID & guid,
const std::string & id,
const desc_t & desc )
inlinestatic

persisted software device: PnP keeps it enumerated after the creating handle closes

Here is the call graph for this function:

◆ ctl() [1/2]

template<typename preference_t>
void dx::proxy::device< preference_t >::ctl ( uint32_t ioctl) const
inline
Here is the call graph for this function:

◆ ctl() [2/2]

template<typename preference_t>
void dx::proxy::device< preference_t >::ctl ( unsigned int ioctl) const
inline
Here is the call graph for this function:

◆ destroy()

template<typename preference_t>
void dx::proxy::device< preference_t >::destroy ( const char * product_id,
const ::GUID & guid,
const std::string & id )
inlinestatic

re-acquires the persisted device and binds it to the closing handle; PnP keeps the removed device's node as a phantom, uninstalled here

Here is the call graph for this function:

◆ erase()

registry & dx::registry::erase ( const char * subkey = nullptr)
inlinenoexceptinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ exception() [1/2]

template<typename preference_t>
void dx::proxy::device< preference_t >::exception ( const dx::exception & exception,
bool filtered = false ) const
inlineoverridevirtualnoexcept

notification exception handler

Reimplemented from dx::device<::io_service_t, preference_t >.

Reimplemented in dx::usb::device< preference_t >, dx::usb::device< dx::preference >, dx::usb::platform::device< preference_t >, dx::usb::platform::device< preference_t >, dx::usb::platform::device< dx::preference >, dx::usb::platform::device< preference_t >, and dx::usb::platform::device< preference_t >.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ exception() [2/2]

template<typename preference_t>
void dx::proxy::device< preference_t >::exception ( const dx::exception & exception,
bool filtered = false ) const
inlineoverridevirtualnoexcept

notification exception handler

Reimplemented from dx::device<::io_service_t, preference_t >.

Reimplemented in dx::usb::platform::device< preference_t >, and dx::usb::platform::device< preference_t >.

Here is the call graph for this function:

◆ fetch()

template<typename value_t, typename self_t>
bool dx::registry::fetch ( const self_t & self,
value_t & value )
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

Here is the call graph for this function:

◆ free()

◆ get() [1/9]

template<typename value_t>
value_t dx::registry::get ( ) const
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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get() [2/9]

template<typename value_t>
bool dx::registry::get ( value_t & value) const
inlineinherited

like get<value_t>() but returns false for ERROR_FILE_NOT_FOUND, from either RegQueryValueExA or value_of() itself; any other failure throws.

Here is the call graph for this function:

◆ get() [3/9]

template<typename value_t, typename = cf::enable_if_convertible<value_t>>
value_t io::registry::get ( ::CFStringRef key) const
inlineinherited
Here is the call graph for this function:

◆ get() [4/9]

::CFTypeRef io::registry::get ( ::CFStringRef key) const
inlineinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get() [5/9]

template<typename value_t, typename = cf::enable_if_convertible<value_t>>
value_t io::registry::get ( ::CFStringRef key,
::CFTypeRef dflt ) const
inlinenoexceptinherited
Here is the call graph for this function:

◆ get() [6/9]

::CFTypeRef io::registry::get ( ::CFStringRef key,
::CFTypeRef dflt ) const
inlinenoexceptinherited
Here is the call graph for this function:

◆ get() [7/9]

template<typename value_t, typename = cf::enable_if_convertible<value_t>>
value_t io::registry::get ( ::CFStringRef key,
value_t dflt ) const
inlinenoexceptinherited
Here is the call graph for this function:

◆ get() [8/9]

template<typename key_t, typename value_t, typename = cf::enable_if_convertible<key_t>, typename = cf::enable_if_convertible<value_t>>
value_t io::registry::get ( key_t key) const
inlineinherited
Here is the call graph for this function:

◆ get() [9/9]

template<typename key_t, typename = cf::enable_if_convertible<key_t>>
::CFTypeRef io::registry::get ( key_t key) const
inlineinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ grouped()

template<typename preference_t>
void dx::service::device< preference_t >::grouped ( typename super::group_t & group)
inlineoverrideprotectedinherited

◆ ictl() [1/6]

template<typename preference_t>
template<typename rx_t>
enable_if_ptr< rx_t > dx::proxy::device< preference_t >::ictl ( uint32_t ioctl) const
inline
Here is the call graph for this function:

◆ ictl() [2/6]

template<typename preference_t>
template<typename rx_t>
enable_if_scalar< rx_t > dx::proxy::device< preference_t >::ictl ( uint32_t ioctl) const
inline
Here is the call graph for this function:

◆ ictl() [3/6]

template<typename preference_t>
template<typename rx_t>
hide_if_scalar_or_ptr< rx_t > dx::proxy::device< preference_t >::ictl ( uint32_t ioctl) const
inline

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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ictl() [4/6]

template<typename preference_t>
template<typename rx_t>
size_t dx::proxy::device< preference_t >::ictl ( uint32_t ioctl,
rx_t & rx ) const
inline
Here is the call graph for this function:

◆ ictl() [5/6]

template<typename preference_t>
template<typename rx_t>
rx_t dx::proxy::device< preference_t >::ictl ( unsigned int ioctl) const
inline

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

Exceptions
n/amicrosoft does not give information about what possible errors values are provided by its OS other than
ERROR_INSUFFICIENT_BUFFERif the output buffer is too small to receive any data
Template Parameters
rx_ttype of rx_t needs to be explicitly specified as it can't be deduced
Here is the call graph for this function:

◆ ictl() [6/6]

template<typename preference_t>
template<typename rx_t>
size_t dx::proxy::device< preference_t >::ictl ( unsigned int ioctl,
rx_t & rx ) const
inline
Here is the call graph for this function:

◆ info() [1/2]

template<typename preference_t>
void dx::proxy::device< preference_t >::info ( std::ostream & os)
inlineoverridevirtualnoexcept

log object class information

Reimplemented from dx::device<::io_service_t, preference_t >.

Reimplemented in dx::proxy::stream::_device< desc_t, preference_t, stream_t, group_t >, dx::proxy::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 > > >, dx::proxy::stream::_device< dx::stream::desc<>, dx::preference, stream< device< dx::stream::desc<>, dx::preference, stream, group > >, group< device< dx::stream::desc<>, dx::preference, stream, group > > >, 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< dx::proxy::device< preference_t >, desc_t, stream_t, group_t >, 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 > > >, dx::stream::device< usb::device< preference_t >, desc_t, stream_t, group_t >, dx::usb::device< preference_t >, dx::usb::device< dx::preference >, dx::usb::platform::device< preference_t >, dx::usb::platform::device< dx::preference >, dx::usb::platform::device< preference_t >, 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 > > >.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ info() [2/2]

template<typename preference_t>
void dx::proxy::device< preference_t >::info ( std::ostream & os)
inlineoverridevirtualnoexcept

◆ initialize() [1/5]

void dx::file::initialize ( const char * name,
::DWORD access = GENERIC_READ| GENERIC_WRITE,
::DWORD share = FILE_SHARE_READ| FILE_SHARE_WRITE )
inlineinherited

(re-)initialization the underlaying windows API is CreateFile(). for detailed information see http://msdn.microsoft.com/en-us/library/aa363858(VS.85).aspx

Exceptions
n/amicrosoft does not give information about what possible errors values are provided by its OS
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialize() [2/5]

registry & dx::registry::initialize ( ::HKEY root,
::REGSAM rights = KEY_ALL_ACCESS )
inlineinherited
Here is the call graph for this function:

◆ initialize() [3/5]

registry & dx::registry::initialize ( ::REGSAM rights = KEY_ALL_ACCESS,
::HKEY root = HKEY_CURRENT_USER )
inlineinherited
Here is the call graph for this function:

◆ initialize() [4/5]

registry & dx::registry::initialize ( const std::string & key,
::HKEY root = HKEY_CURRENT_USER,
::REGSAM rights = KEY_ALL_ACCESS )
inlineinherited
Here is the call graph for this function:

◆ initialize() [5/5]

registry & dx::registry::initialize ( const std::string & key,
::REGSAM rights,
::HKEY root,
const char * path = nullptr )
inlineprotectedinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ioctl() [1/5]

template<typename preference_t>
template<typename rx_t, typename tx_t>
rx_t dx::proxy::device< preference_t >::ioctl ( uint32_t ioctl,
const tx_t & tx ) const
inline
Here is the call graph for this function:

◆ ioctl() [2/5]

template<typename preference_t>
template<typename rx_t, typename tx_t>
size_t dx::proxy::device< preference_t >::ioctl ( uint32_t ioctl,
const tx_t & tx,
rx_t & rx ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ioctl() [3/5]

template<typename preference_t>
size_t dx::proxy::device< preference_t >::ioctl ( uint32_t ioctl,
const void * tx = nullptr,
size_t tx_size = 0,
void * rx = nullptr,
size_t rx_size = 0 ) const
inline
Here is the call graph for this function:

◆ ioctl() [4/5]

template<typename preference_t>
template<typename rx_t, typename tx_t>
rx_t dx::proxy::device< preference_t >::ioctl ( unsigned int ioctl,
const tx_t & tx ) const
inline
Here is the call graph for this function:

◆ ioctl() [5/5]

template<typename preference_t>
template<typename tx_t, typename rx_t>
size_t dx::proxy::device< preference_t >::ioctl ( unsigned int ioctl,
const tx_t & tx,
rx_t & rx ) const
inline
Here is the call graph for this function:

◆ launch() [1/2]

virtual void dx::object::launch ( )
inlineprotectedvirtualinherited

launch notification: object mounted and ready to use. Called only through try_launch() - never call this directly from outside the class hierarchy.

◆ launch() [2/2]

◆ nested()

template<typename self_t>
bool dx::registry::nested ( const self_t & self)
inlinestaticnoexceptinherited
Here is the call graph for this function:

◆ octl() [1/3]

template<typename preference_t>
template<typename tx_t, typename = hide_if_ptr<tx_t>>
device & dx::proxy::device< preference_t >::octl ( uint32_t ioctl,
const tx_t & tx )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ octl() [2/3]

template<typename preference_t>
template<typename tx_t, typename = enable_if_ptr<tx_t>>
device & dx::proxy::device< preference_t >::octl ( uint32_t ioctl,
const tx_t tx )
inline
Here is the call graph for this function:

◆ octl() [3/3]

template<typename preference_t>
template<typename tx_t>
void dx::proxy::device< preference_t >::octl ( unsigned int ioctl,
const tx_t & tx ) const
inline
Here is the call graph for this function:

◆ operator const ::io_registry_entry_t &() [1/2]

io::reference< ::io_registry_entry_t >::operator const ::io_registry_entry_t & ( ) const
inlinenoexceptinherited

auto converter into const io_object

◆ operator const ::io_registry_entry_t &() [2/2]

io::reference< ::io_registry_entry_t >::operator const ::io_registry_entry_t & ( ) const
inlinenoexceptinherited

auto converter into const io_object

◆ operator const os_event()

template<::HANDLE invalid_t = INVALID_HANDLE_VALUE>
dx::resource< invalid_t >::operator const os_event ( ) const
inlinenoexceptinherited

◆ operator const std::string &()

template<typename preference_t>
dx::proxy::device< preference_t >::operator const std::string & ( ) const
inlinenoexcept

identifying device string, mirroring macOS' io::registry conversion

◆ operator os_event()

template<::HANDLE invalid_t = INVALID_HANDLE_VALUE>
dx::resource< invalid_t >::operator os_event ( )
inlinenoexceptinherited

◆ operator uint64_t()

io::registry::operator uint64_t ( ) const
inlineexplicitinherited

◆ operator::CFMutableDictionaryRef()

io::registry::operator::CFMutableDictionaryRef ( ) const
inlineexplicitinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator::CFStringRef()

io::registry::operator::CFStringRef ( ) const
inlineexplicitinherited
Here is the caller graph for this function:

◆ operator::HANDLE()

template<::HANDLE invalid_t = INVALID_HANDLE_VALUE>
dx::resource< invalid_t >::operator::HANDLE ( ) const
inlinenoexceptinherited
Here is the caller graph for this function:

◆ operator::HKEY()

dx::registry::operator::HKEY ( ) const
inlinenoexceptinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator::io_registry_entry_t &() [1/2]

io::reference< ::io_registry_entry_t >::operator ::io_registry_entry_t & ( )
inlinenoexceptinherited

auto converter into io_object

◆ operator::io_registry_entry_t &() [2/2]

io::reference< ::io_registry_entry_t >::operator ::io_registry_entry_t & ( )
inlinenoexceptinherited

auto converter into io_object

◆ operator::io_registry_entry_t *() [1/2]

io::reference< ::io_registry_entry_t >::operator ::io_registry_entry_t * ( )
inlinenoexceptinherited

auto converter into io_object pointer

◆ operator::io_registry_entry_t *() [2/2]

io::reference< ::io_registry_entry_t >::operator ::io_registry_entry_t * ( )
inlinenoexceptinherited

auto converter into io_object pointer

◆ operator=()

template<typename preference_t>
device & dx::proxy::device< preference_t >::operator= ( ::CFTypeRef properties)
inline
Here is the call graph for this function:

◆ operator==()

bool io::reference< ::io_registry_entry_t >::operator== ( ::io_registry_entry_t io_object) const
inlinenoexceptinherited

◆ operator>>() [1/2]

virtual device & dx::device< std::string, preference_t >::operator>> ( std::ostream & ) const
inlinevirtualinherited

the device's own diagnostics, beyond dx::object::info

◆ operator>>() [2/2]

virtual device & dx::device< ::io_service_t, preference_t >::operator>> ( std::ostream & ) const
inlinevirtualinherited

the device's own diagnostics, beyond dx::object::info

Here is the call graph for this function:

◆ operator[]() [1/2]

::CFTypeRef io::registry::operator[] ( ::CFStringRef key) const
inlineinherited
Here is the call graph for this function:

◆ operator[]() [2/2]

template<typename key_t, typename = cf::enable_if_convertible<key_t>>
::CFTypeRef io::registry::operator[] ( key_t key) const
inlineinherited
Here is the call graph for this function:

◆ parent()

registry io::registry::parent ( ) const
inlineinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ purge()

template<typename self_t>
void dx::registry::purge ( const self_t & self)
inlinestaticnoexceptinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ retain()

reference & io::reference< ::io_registry_entry_t >::retain ( )
inlineinherited
Here is the caller graph for this function:

◆ run()

registry & dx::registry::run ( )
inlineinherited
Here is the call graph for this function:

◆ set() [1/6]

template<typename preference_t>
device & dx::proxy::device< preference_t >::set ( ::CFStringRef key,
::CFTypeRef value )
inlinenoexcept
Here is the call graph for this function:

◆ set() [2/6]

template<typename preference_t>
template<typename value_t, typename = cf::enable_if_convertible<value_t>>
device & dx::proxy::device< preference_t >::set ( ::CFStringRef key,
value_t value )
inline
Here is the call graph for this function:

◆ set() [3/6]

template<typename preference_t>
device & dx::proxy::device< preference_t >::set ( ::CFTypeRef properties)
inline

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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set() [4/6]

template<typename preference_t>
template<typename key_t, typename = cf::enable_if_convertible<key_t>>
device & dx::proxy::device< preference_t >::set ( key_t key,
::CFTypeRef value )
inline
Here is the call graph for this function:

◆ set() [5/6]

template<typename preference_t>
template<typename key_t, typename value_t, typename = cf::enable_if_convertible<key_t>, typename = cf::enable_if_convertible<value_t>>
device & dx::proxy::device< preference_t >::set ( key_t key,
value_t value )
inline
Here is the call graph for this function:

◆ set() [6/6]

registry & dx::registry::set ( ::DWORD type,
const void * value,
size_t size )
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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ size() [1/2]

size_t dx::registry::size ( ) const
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).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ size() [2/2]

template<typename self_t>
size_t dx::registry::size ( const self_t & self)
inlinestaticnoexceptinherited
Here is the call graph for this function:

◆ sleep() [1/2]

virtual void dx::device< std::string, preference_t >::sleep ( )
inlinevirtualinherited

notify system will sleep stub

◆ sleep() [2/2]

virtual void dx::device< ::io_service_t, preference_t >::sleep ( )
inlinevirtualinherited

notify system will sleep stub

◆ string()

template<typename preference_t>
std::string dx::proxy::device< preference_t >::string ( uint8_t ) const
inline

◆ try_conclude() [1/2]

bool dx::object::try_conclude ( )
inlinenoexceptinherited

atomically conclude()s if currently launched; returns whether this call did it

◆ try_conclude() [2/2]

bool dx::object::try_conclude ( )
inlinenoexceptinherited

atomically conclude()s if currently launched; returns whether this call did it

◆ try_launch() [1/2]

bool dx::object::try_launch ( )
inlineinherited

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

◆ try_launch() [2/2]

bool dx::object::try_launch ( )
inlineinherited

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 dx::registry::type ( ) const
inlinenoexceptinherited

◆ wake() [1/2]

virtual void dx::device< std::string, preference_t >::wake ( )
inlinevirtualinherited

◆ wake() [2/2]

virtual void dx::device< ::io_service_t, preference_t >::wake ( )
inlinevirtualinherited

notify system wake completed stub

Reimplemented in dx::stream::device< dx::proxy::device< preference_t >, desc_t, stream_t, group_t >.

Here is the caller graph for this function:

Member Data Documentation

◆ clocksource

template<typename preference_t>
class dx::service::device::promoted dx::service::device< preference_t >::clocksource
protectedinherited

◆ connected

template<typename preference_t>
bool dx::proxy::device< preference_t >::connected = false
protected

◆ driver [1/2]

dx::driver<decltype(id), preference_t>& dx::device< std::string, preference_t >::driver
inherited

◆ driver [2/2]

dx::driver<decltype(id), preference_t>& dx::device< ::io_service_t, preference_t >::driver
inherited

◆ group_server

template<typename preference_t>
std::list<promoted> dx::service::device< preference_t >::group_server
protectedinherited

per-group chains, wired as each group comes into existence (grouped())

◆ handle

template<::HANDLE invalid_t = INVALID_HANDLE_VALUE>
::HANDLE dx::resource< invalid_t >::handle {invalid_t}
protectedinherited

◆ id [1/2]

const std::string dx::device< std::string, preference_t >::id
inherited

◆ id [2/2]

const ::io_service_t dx::device< ::io_service_t, preference_t >::id
inherited

◆ kernel

struct { ... } dx::service::device< preference_t >::kernel

◆ key

std::string dx::registry::key
inherited

◆ launched [1/2]

std::atomic<bool> dx::object::launched
inherited

◆ launched [2/2]

std::atomic<bool> dx::object::launched
inherited

◆ listen

std::deque<std::function<void()> > dx::registry::listen
inherited

◆ pipe [1/2]

template<typename preference_t>
class dx::service::device::promoted dx::service::device< preference_t >::pipe
protectedinherited

◆ pipe [2/2]

template<typename preference_t>
class dx::service::device::promoted dx::service::device< preference_t >::pipe
protectedinherited
Initial value:
{
std::string{this->driver.product_id}+ "/"+ this->puuid,
{[this](class server::instance& instance, const request& request){
{
if(this->driver.log.bus.setup>= dx::log::level::debug){
std::lock_guard lock{io_mutex};
std::clog<< class_name<< "<"<< this->puuid<< ">::pipe::listen: "<< request<< std::endl;
}
switch(request.id){
case request::id::desc:
if constexpr(requires{std::declval<device>().desc;})
if(request.data){
this->desc= std::get<super::desc_t>(*request.data);
break;
}
instance<< device::request{.id= request.id, .data= static_cast<typename super::desc_t>(*this)};
break;
}
}
}},{}}
std::string puuid
Definition dx_device.h:52
const char * product_id
Definition dx_driver.h:149
dx::log log
cached local log level, mirrors settings::log
Definition dx_driver.h:153
OS proxy device driver interface class.
Definition macOS/proxy/dx_proxy_device.h:142
service::request< service::stream::data< typename super_device_t::desc_t > > request
Definition dx_service_device.h:66
std::recursive_mutex io_mutex
the one lock every diagnostic sink takes, so a chain unfolded from one thread stays unbroken
Definition dx_exception.h:302
one message on the service's pipe: what is asked, what came back and the value it carries....
Definition dx_service_request.h:34
@ debug
Definition dx_log.h:53

◆ port

template<typename preference_t>
io::port dx::proxy::device< preference_t >::port
protected

◆ preference [1/2]

preference_t dx::device< std::string, preference_t >::preference
inherited

◆ preference [2/2]

preference_t dx::device< ::io_service_t, preference_t >::preference
inherited

◆ process

template<::HANDLE invalid_t = INVALID_HANDLE_VALUE>
::HANDLE dx::resource< invalid_t >::process {::GetCurrentProcess()}
protectedinherited

◆ puid [1/2]

std::string dx::device< std::string, preference_t >::puid
inherited

persistent UID - system unique - could change with location

◆ puid [2/2]

std::string dx::device< ::io_service_t, preference_t >::puid
inherited

persistent UID - system unique - could change with location

◆ puuid [1/2]

std::string dx::device< std::string, preference_t >::puuid
inherited

persistent universal UID - universally unique ID (i.e. serial number)

◆ puuid [2/2]

std::string dx::device< ::io_service_t, preference_t >::puuid
inherited

persistent universal UID - universally unique ID (i.e. serial number)

◆ samplerate

template<typename preference_t>
class dx::service::device::promoted dx::service::device< preference_t >::samplerate
protectedinherited

◆ schedule_erase

bool dx::registry::schedule_erase {}
inherited

The documentation for this class was generated from the following files:

(c) copyright 2009 dynamic acoustics e.U. generated on

a closed source license may be obtained by requesting a written permission from dynamic acoustics e.U.
however - governmental use generally and military use especially is strictly prohibited though.