dxd - dynax driver framework 2.5.0d148
cross platform open source driver development framework
|
OS proxy device interface class. More...
#include <dx_proxy_device.h>
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, const std::string &id) | |
the device class constructor | |
template<typename driver_t > | |
device (driver_t &driver, ::io_service_t id) | |
the device class constructor | |
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() noexcept override | |
the device class destructor | |
dx_catchall_rethrow (, "name: %s, access rights: %x, sharing options:%x", name, access, share) | |
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 | |
::CFTypeRef | get (::CFStringRef key) const |
template<typename value_t , typename = cf::enable_if_convertible<value_t>> | |
value_t | get (::CFStringRef key) const |
::CFTypeRef | get (::CFStringRef key, ::CFTypeRef dflt) const noexcept |
template<typename value_t , typename = cf::enable_if_convertible<value_t>> | |
value_t | get (::CFStringRef key, ::CFTypeRef dflt) const noexcept |
template<typename value_t , typename = cf::enable_if_convertible<value_t>> | |
value_t | get (::CFStringRef key, value_t dflt) const noexcept |
template<typename key_t , typename = cf::enable_if_convertible<key_t>> | |
::CFTypeRef | get (key_t key) const |
template<typename key_t , typename value_t , typename = cf::enable_if_convertible<key_t>, typename = cf::enable_if_convertible<value_t>> | |
value_t | get (key_t key) const |
template<typename rx_t > | |
rx_t | ictl (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 |
virtual void | launch () |
launch notification: object mounted and ready to use | |
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 uint64_t () const | |
operator::CFMutableDictionaryRef () const | |
operator::CFStringRef () const | |
operator::io_registry_entry_t & () noexcept | |
auto converter into io_object | |
operator::io_registry_entry_t * () noexcept | |
auto converter into io_object pointer | |
registry & | operator= (::CFTypeRef properties) |
bool | operator== (::io_registry_entry_t io_object) const noexcept |
::CFTypeRef | operator[] (::CFStringRef key) const |
template<typename key_t , typename = cf::enable_if_convertible<key_t>> | |
::CFTypeRef | operator[] (key_t key) const |
reference & | retain () |
registry & | set (::CFStringRef key, ::CFTypeRef value) noexcept |
template<typename value_t , typename = cf::enable_if_convertible<value_t>> | |
registry & | set (::CFStringRef key, value_t value) |
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) |
Public Attributes | |
dx::driver< decltype(id)> & | driver |
dx::driver< decltype(id)> & | driver |
const ::io_service_t | id |
const std::string | id |
bool | launched {} |
bool | launched {} |
std::string | puid |
persistent UID (i.e. serial number) - system unique - if no other option to identify could change with location | |
std::string | puuid |
persistent universal UID - universally unique ID | |
return | size |
rx_t &rx const | try |
Protected Types | |
enum class | type : ::DWORD { undefined = REG_NONE , uint32 = REG_DWORD , uint64 = REG_QWORD , string = REG_SZ , vendor = REG_BINARY } |
Protected Member Functions | |
dx_catchall_rethrow() class iterator iterator | begin () const |
iterator | end () const |
registry & | erase (const char *subkey=nullptr) try |
registry & | initialize (const std::string &key, ::HKEY root=HKEY_CURRENT_USER, ::REGSAM rights=KEY_ALL_ACCESS) try |
registry & | initialize (const std::string &key, ::REGSAM rights, ::HKEY root, const char *path=nullptr) try |
std::string | key_from_index (size_t index) const try |
dx_catchall_rethrow() registry &initialize( | operator keys () const noexcept |
Protected Attributes | ||
bool | connected = false | |
struct { | ||
cf::type< const char * > bundle_id | ||
cf::type< const char * > class_name | ||
} | kernel | |
io::port | port | |
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:
in | case 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. |
|
strongprotectedinherited |
|
inline |
the device class constructor
kIOReturn | NoMemory means that the system couldn't allocate the class defined in the drivers plist, or nub which ever its trying connecting to |
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.
driver | device tree hosting dx::driver |
id | the IOService object to open the device connection for. This will be retained during device class lifetime |
|
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
n/a | microsoft does not give information about what possible errors values are provided by its OS |
|
inlineprotectedinherited |
|
inlineoverridevirtualnoexcept |
conclude notifacation: device will be removed from tree
Reimplemented from dx::object.
Reimplemented in dx::proxy::stream::_device< desc_t, preference_t, stream_t >.
|
inlinenoexceptinherited |
|
inline |
|
inline |
|
inline |
|
inline |
|
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::proxy::device::dx_catchall_rethrow | ( | ) |
dx::proxy::device::dx_catchall_rethrow | ( | ) |
|
inlineoverridenoexcept |
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
|
inherited |
dx::proxy::device::dx_pass | ( | ::IOConnectCallStructMethod(io_connect, ioctl, nullptr, 0, &rx, &size) | , |
"%s rx:%p size:%d" | , | ||
fourchar::to::string(ioctl).c_str() | , | ||
& | rx, | ||
size | ) |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineoverridevirtualnoexcept |
notification exception handler
Reimplemented from dx::device<::io_service_t >.
Reimplemented in dx::usb::platform::device.
|
inlineinherited |
|
inlineinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlineinherited |
|
inlineinherited |
|
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
n/a | microsoft does not give information about what possible errors values are provided by its OS other than |
ERROR_INSUFFICIENT_BUFFER | if the output buffer is too small to receive any data |
|
inline |
|
inlineoverridevirtualnoexcept |
log object class information
Reimplemented from dx::device<::io_service_t >.
Reimplemented in dx::proxy::stream::_device< desc_t, preference_t, stream_t >, dx::usb::stream::_device< desc_t, preference_t, stream_t >, and dx::usb::platform::device.
|
inlineinherited |
(re-)initialization the underlaying windows API is CreateFile(). for detailed information see http://msdn.microsoft.com/en-us/library/aa363858(VS.85).aspx
n/a | microsoft does not give information about what possible errors values are provided by its OS |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inline |
|
inline |
|
inlineprotectedinherited |
|
inlinevirtualinherited |
launch notification: object mounted and ready to use
Reimplemented in dx::stream::stream< device< desc_t, dx::preference, pipe >, dx::circular, usb::pipe< device< desc_t, dx::preference, pipe > > >, dx::stream::stream< device_t, dx::circular, usb::pipe< device_t > >, dx::usb::stream::_device< desc_t, preference_t, stream_t >, dx::virtuel::driver< device_t >, dx::map::driver< device >, dx::map::driver< device_t >, dx::proxy::driver< device< pin_t > >, dx::proxy::driver< device< stream_pin_t > >, dx::proxy::driver< device< super_device_t > >, dx::proxy::driver< device_t >, dx::proxy::driver< dx::test::device< super_device_t > >, dx::proxy::driver< dx::test::midi::device< super_device_t > >, dx::proxy::driver< device_t >, dx::proxy::driver< device< pin_t > >, dx::proxy::driver< device< stream_pin_t > >, dx::proxy::driver< device< super_device_t > >, dx::proxy::driver< device_t >, dx::proxy::driver< dx::test::device< super_device_t > >, dx::proxy::driver< dx::test::midi::device< super_device_t > >, and dx::proxy::driver< device_t >.
|
inline |
|
inlinenoexceptinherited |
auto converter into const io_object
|
inlineprotectednoexceptinherited |
|
inlineexplicitinherited |
|
inlineexplicitinherited |
|
inlineexplicitinherited |
|
inlinenoexceptinherited |
auto converter into io_object
|
inlinenoexceptinherited |
auto converter into io_object pointer
|
inline |
|
inlinenoexceptinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinenoexcept |
|
inline |
|
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.
|
inline |
|
inline |
cf::type<const char*> dx::proxy::device::bundle_id |
cf::type<const char*> dx::proxy::device::class_name |
|
protected |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
struct { ... } dx::proxy::device::kernel |
|
inherited |
|
inherited |
|
protected |
std::string dx::proxy::device::puid |
persistent UID (i.e. serial number) - system unique - if no other option to identify could change with location
std::string dx::proxy::device::puuid |
persistent universal UID - universally unique ID
return dx::proxy::device::size |
rx_t& rx const dx::proxy::device::try |
(c) copyright 2009 dynamic acoustics e.U. | generated on Fri Aug 22 2025 |