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

OS proxy device 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

Public Member Functions

void conclude () noexcept override
 conclude notifacation: device will be removed from tree
auto count () const noexcept
void ctl (uint32_t ioctl) const try
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::string &puuid={}, const std::string &puid={})
 the device class constructor
 dx_catchall_rethrow (, "name: %s, access rights: %x, sharing options:%x", name, access, share)
 dx_catchall_rethrow () template< typename rx_t > enable_if_ptr< rx_t > ictl(uint32_t ioctl) const try
 dx_catchall_rethrow () template< typename rx_t > enable_if_scalar< rx_t > ictl(uint32_t ioctl) const try
 dx_catchall_rethrow () template< typename rx_t > hide_if_scalar_or_ptr< rx_t > ictl(uint32_t ioctl) const try
 member ioctl
 dx_catchall_rethrow () template< typename rx_t > size_t ictl(uint32_t ioctl
 dx_catchall_rethrow () template< typename tx_t
 dx_catchall_rethrow () ~device() override
 the device class destructor
 dx_pass (::IOConnectCallStructMethod(io_connect, ioctl, nullptr, 0, &rx, &size), "%s rx:%p size:%d", fourchar::to::string(ioctl).c_str(), &rx, size)
void exception (const dx::exception &exception, bool filtered=false) const noexcept override
 notification exception handler
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>
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. 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
 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::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
deviceoperator= (::CFTypeRef properties)
bool operator== (::io_registry_entry_t io_object) const noexcept
virtual deviceoperator>> (std::ostream &) const
virtual deviceoperator>> (std::ostream &) 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
referenceretain ()
deviceset (::CFStringRef key, ::CFTypeRef value) noexcept
template<typename value_t, typename = cf::enable_if_convertible<value_t>>
deviceset (::CFStringRef key, value_t value)
deviceset (::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>>
deviceset (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>>
deviceset (key_t key, value_t value)
virtual void sleep ()
 notify system will sleep stub
virtual void sleep ()
 notify system will sleep stub
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
bool try_launch ()
 atomically launch()es if not already launched; returns whether this call did it
virtual void wake ()
 notify system wake completed stub
virtual void wake ()
 notify system wake completed stub

Static Public Member Functions

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

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::atomic< bool > launched
std::atomic< bool > launched
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)
return size
rx_t &rx const try

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().
enum class  type : ::DWORD {
  undefined = REG_NONE , uint32 = REG_DWORD , uint64 = REG_QWORD , string = REG_SZ ,
  vendor = REG_BINARY
}

Protected Member Functions

std::string canonical (const std::string &name) const try
 catch (...)
 catch (...)
 dx_catchall_rethrow () registry(const registry &registry
registryerase (const char *subkey=nullptr) noexcept
registryinitialize (const std::string &key, ::HKEY root=HKEY_CURRENT_USER, ::REGSAM rights=KEY_ALL_ACCESS) try
registryinitialize (const std::string &key, ::REGSAM rights, ::HKEY root, const char *path=nullptr) try
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.
registryrun ()
dx_catchall_rethrow() registry &initialize(size_t size () const noexcept

Static Protected Member Functions

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

Protected Attributes

class dx::service::device::promoted clocksource
bool connected = false
::HANDLE handle = invalid_t
class dx::service::device::promoted iosize
struct { 
   cf::string   bundle_id 
   cf::string   class_name 
kernel
std::string key
const std::string & key: rights{registry.rights}
std::deque< std::function< void()> > listen
const std::string owns_root
class dx::service::device::promoted pipe
server pipe
io::port port
::HANDLE process = ::GetCurrentProcess()
const std::string root {registry.root}
class dx::service::device::promoted safety_offset [dx::stream::direction::out]
class dx::service::device::promoted safety_offset_in [dx::stream::direction::in]
class dx::service::device::promoted safety_offset_out [dx::stream::direction::out]
class dx::service::device::promoted samplerate
bool schedule_erase {}

Detailed Description

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

OS proxy device interface class.

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/dx_proxy_device.h:162
Definition macOS/dx_proxy_driver.h:54
int int32_t
Definition wdk/dxd_platform.h:110
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.

Member Typedef Documentation

◆ event_t

template<typename preference_t>
typedef shared::event dx::service::device< preference_t >::event_t
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
strongprotectedinherited
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() [2/2]

template<typename preference_t>
dx::proxy::device< preference_t >::device ( decltype(super::driver)& driver,
const std::string & id,
const std::string & puuid = {},
const std::string & puid = {} )
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()

self_t void dx::registry::assign ( const self_t & self,
const value_t & value )
inlinestaticprotectedinherited
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)
inlinestaticprotectedinherited

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 ( ...)
inlineprotectedinherited

◆ catch() [2/2]

dx::registry::catch ( ...)
inlineprotectedinherited

◆ children()

template<typename container_t, typename self_t>
container_t dx::registry::children ( const self_t & self)
inlinestaticprotectednoexceptinherited

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()

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

conclude notifacation: device will be removed from tree

Reimplemented from dx::object.

Reimplemented in dx::proxy::stream::_device< dx::stream::desc<>, dx::preference, stream< device< dx::stream::desc<>, dx::preference, stream > > >.

Here is the call graph for this function:

◆ count()

auto io::reference< ::io_registry_entry_t >::count ( ) const
inlinenoexceptinherited

◆ 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

Here is the call graph for this function:

◆ dx_catchall_rethrow() [1/8]

dx::file::dx_catchall_rethrow ( "name: % s,
access rights:% x,
sharing options:%x" ,
name ,
access ,
share  )
inherited

◆ dx_catchall_rethrow() [2/8]

template<typename preference_t>
dx::proxy::device< preference_t >::dx_catchall_rethrow ( ) const
inline

◆ dx_catchall_rethrow() [3/8]

template<typename preference_t>
dx::proxy::device< preference_t >::dx_catchall_rethrow ( ) const
inline

◆ dx_catchall_rethrow() [4/8]

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

◆ dx_catchall_rethrow() [5/8]

template<typename preference_t>
dx::proxy::device< preference_t >::dx_catchall_rethrow ( )

◆ dx_catchall_rethrow() [6/8]

template<typename preference_t>
dx::proxy::device< preference_t >::dx_catchall_rethrow ( )

◆ dx_catchall_rethrow() [7/8]

template<typename preference_t>
dx::proxy::device< preference_t >::dx_catchall_rethrow ( )
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

◆ dx_catchall_rethrow() [8/8]

dx::registry::dx_catchall_rethrow ( ) const &
protectedinherited

cheap: purely in-memory identity extension with a bare child name - what dx::key_value_tree::operator[] builds on.

◆ dx_pass()

template<typename preference_t>
dx::proxy::device< preference_t >::dx_pass ( ::IOConnectCallStructMethod(io_connect, ioctl, nullptr, 0, &rx, &size) ,
"%s rx:%p size:%d" ,
fourchar::to::string(ioctl).c_str() ,
& rx,
size  )
Here is the call graph for this function:

◆ erase()

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

◆ exception()

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 >, 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:

◆ fetch()

template<typename value_t, typename self_t>
bool dx::registry::fetch ( const self_t & self,
value_t & value )
inlinestaticprotectedinherited
Here is the call graph for this function:

◆ get() [1/7]

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() [2/7]

::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() [3/7]

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() [4/7]

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

◆ get() [5/7]

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() [6/7]

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() [7/7]

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:

◆ ictl() [1/2]

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() [2/2]

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()

◆ initialize() [1/3]

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 caller graph for this function:

◆ initialize() [2/3]

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

◆ initialize() [3/3]

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/2]

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() [2/2]

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:
Here is the caller 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]

template<typename preference_t>
void dx::service::device< preference_t >::launch ( )
inlineoverridevirtualinherited

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

Reimplemented from dx::object.

Reimplemented in dx::usb::stream::_device< desc_t, dx::preference, pipe< device< desc_t, dx::preference, pipe > > >.

◆ nested()

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

◆ octl()

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

◆ operator>>() [2/2]

virtual device & dx::device< ::io_service_t, preference_t >::operator>> ( std::ostream & ) const
inlinevirtualinherited
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:

◆ retain()

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

◆ run()

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

◆ set() [1/5]

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/5]

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/5]

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/5]

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/5]

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:

◆ size() [1/2]

dx_catchall_rethrow() registry &initialize(size_t dx::registry::size ( ) const
inlineprotectednoexceptinherited

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. like get<value_t>() but returns false for ERROR_FILE_NOT_FOUND, from either RegQueryValueExA or value_of() itself; any other failure throws. 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 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)
inlinestaticprotectednoexceptinherited
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

◆ 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

◆ try_launch() [2/2]

bool dx::object::try_launch ( )
inlineinherited

atomically launch()es if not already launched; returns whether this call did it

◆ wake() [1/2]

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

notify system wake completed stub

◆ wake() [2/2]

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

notify system wake completed stub

Member Data Documentation

◆ bundle_id

template<typename preference_t>
cf::string dx::service::device< preference_t >::bundle_id
inherited

◆ 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

◆ 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

◆ iosize

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

◆ [struct]

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

◆ key [1/2]

std::string dx::registry::key
protectedinherited

◆ key [2/2]

const std::string& dx::registry::key
protectedinherited

◆ 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
protectedinherited

◆ owns_root

const std::string dx::registry::owns_root
protectedinherited
Initial value:
{false}{
this->key= key;
}
public:
struct property{
static constexpr auto software= "SOFTWARE";
static constexpr auto root= software;
}
const std::string & key
Definition dx_registry.h:227

◆ pipe [1/2]

template<typename preference_t>
class dx::service::device::promoted dx::service::device< preference_t >::pipe[dx::stream::direction::out]
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){
try{
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_device_t::desc_t>(*request.data);
break;
}
instance<< device::request{.id= request.id, .data= static_cast<typename super_device_t::desc_t>(*this)};
break;
}
}dx_catchall_rethrow(,"%s: data:%s variant:%d",
fourchar::to::string(reinterpret_cast<const uint32_t&>(request.id)).c_str(),
request.data.has_value()? "yes":"no",
request.data.has_value()? request.data->index(): -1)}},{}}
std::string puuid
Definition dx_device.h:52
OS proxy device interface class.
Definition macOS/dx_proxy_device.h:140
service::request< service::stream::data< typename super_device_t::desc_t > > request
Definition dx_service_device.h:64
#define dx_catchall_rethrow(inject,...)
Definition dx_exception.h:122
std::recursive_mutex io_mutex
Definition dx_common.cpp:28
Definition dx_service_request.h:33
@ debug
Definition dx_common.h:75

◆ 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)

◆ root

const std::string dx::registry::root {registry.root}
protectedinherited

◆ safety_offset

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

◆ safety_offset_in

template<typename preference_t>
class dx::service::device::promoted dx::service::device< preference_t >::safety_offset_in[dx::stream::direction::in]
protectedinherited

◆ safety_offset_out

template<typename preference_t>
class dx::service::device::promoted dx::service::device< preference_t >::safety_offset_out[dx::stream::direction::out]
protectedinherited

◆ samplerate

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

◆ schedule_erase

bool dx::registry::schedule_erase {}
protectedinherited

◆ size

template<typename preference_t>
return dx::proxy::device< preference_t >::size

◆ try

template<typename preference_t>
rx_t& rx const dx::proxy::device< preference_t >::try
Initial value:
{
size_t size= sizeof rx
return size
Definition macOS/dx_proxy_device.h:279

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.