|
dxd - dynax driver framework 3.0.2
cross platform open source driver development framework
|
a KMDF device: the contract's hooks on the framework's callbacks, its clients created per file object More...
#include <dxd_kmdf_device.h>
Public Member Functions | |
| device(dxd::driver& driver, ::WDFDEVICE wdf_device) | |
| void | identify(uint64_t id) |
| the OS's identity of the hardware as the puid, until launch() states a persistent one | |
| os_result | notify_clients(const ::GUID& guid) |
| operator const ::HANDLE() const | |
| operator ::DEVICE_OBJECT*() const | |
| operator ::WDFDEVICE() const | |
| operator ::WDFDRIVER() const | |
| ::DEVICE_OBJECT* | pdo() const |
| template<typename transition_t> | |
| os_result | powered(bool on, transition_t&& transition) |
| a power transition, as dxd::power binds the OS's: sleep() ahead of leaving the working state, the transition, wake() once in it - a change of a launched device alone | |
| template<typename type_t> | |
| os_result | property(property::key key, type_t& value) |
| < the device's creation status, not the Parameters key's | |
| template<typename type_t> | |
| os_result | query(const ::UNICODE_STRING& key, type_t& value) |
| template<typename key_t, typename type_t> | |
| os_result | query(key_t* key, type_t& value) |
| template<typename reference_t> | |
| int | release(reference_t& reference) |
| os_result | remove() |
| void | retain() |
| os_result | set(const ::UNICODE_STRING& key, const ::GUID& value) |
| os_result | set(const ::UNICODE_STRING& key, const ::UNICODE_STRING& value, unsigned long type= REG_SZ) |
| os_result | set(const ::UNICODE_STRING& key, const char* value) |
| os_result | set(const ::UNICODE_STRING& key, const wchar_t* value) |
| os_result | set(const ::UNICODE_STRING& key, unsigned int value) |
| template<typename key_t, typename type_t> | |
| os_result | set(key_t* key, const type_t& value) |
| void | try_conclude() |
| conclude()s if launched | |
| os_result | try_launch() |
| launch()es unless launched, a failure concluded | |
| template<typename type_t> | |
| unsigned long | type() |
Public Attributes | |
| bool | launched{} |
| const char* | model{} |
| the model's name alike | |
| bool | on{true} |
| char | puid [0x80] {} |
| persistent UID, system unique: the platform takes it from the OS's identity of the device | |
| atomic<int> | references{} |
| os_result | status |
| const char* | vendor{} |
| the vendor's name the desc states, published with the puid for user mode to match by | |
Protected Member Functions | |
| virtual void | conclude() |
| remove hook, the last word to the hardware | |
| virtual::NTSTATUS | filter(::WDFIORESREQLIST) |
| the resource requirements the bus states, filtered ahead of the start | |
| os_result | ioctl(unsigned int ioctl, const void* in, size_t size_in, void* out, size_t size_out, size_t& size) override |
| control I/O, reached through client::ioctl(): the driver answers what the device does not | |
| virtual os_result | launch() |
| start hook, called before any client can reach the device | |
| virtual os_result | sleep() |
| virtual void | unplugged() |
| surprise removal hook: the hardware side goes at once, what open clients hold waits for conclude() | |
| virtual os_result | wake() |
| power hooks: a launched device comes back to the working state, and leaves it - its start and its removal are launch() and conclude() | |
Protected Attributes | |
| bool | removed{} |
| struct dxd::kmdf::device:: { ... } | wdf |
| struct dxd::kmdf::device:: { ... } | wdm |
Friends | |
| class | bus |
| class | driver |
a KMDF device: the contract's hooks on the framework's callbacks, its clients created per file object
The framework device object is the driver's, made on the framework's add (driver); the device stands on it, held by reference - one for the device object's context, one per open client. A rebalance releases the hardware, which retires the device as its clients see a removal - unplugged(), conclude(), removed -, and prepares it anew: a successor on the device object takes its place and launches on the new resources, the retired one goes with its last client. The WDM counterpart, which the PortCls path takes, is dxd::platform::device.
|
inline |
|
inlineprotectedvirtualinherited |
remove hook, the last word to the hardware
Reimplemented in dxd::firewire::controller< super_device_t >, dxd::firewire::platform::device< super_device_t >, dxd::kmdf::pci::device, dxd::pci::device, dxd::pci::device, dxd::platform::device, and dxd::usb::device< super_device_t >.
|
inlineprotected |
the resource requirements the bus states, filtered ahead of the start
|
inlineinherited |
the OS's identity of the hardware as the puid, until launch() states a persistent one
|
inlineoverrideprotectedvirtual |
control I/O, reached through client::ioctl(): the driver answers what the device does not
Reimplemented from dxd::device.
|
inlineprotectedvirtualinherited |
start hook, called before any client can reach the device
Reimplemented in dxd::firewire::controller< super_device_t >, dxd::firewire::platform::device< super_device_t >, dxd::kmdf::pci::device, dxd::pci::device, dxd::pci::device, and dxd::usb::device< super_device_t >.
|
inline |
|
inlineinherited |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineinherited |
a power transition, as dxd::power binds the OS's: sleep() ahead of leaving the working state, the transition, wake() once in it - a change of a launched device alone
|
inline |
< the device's creation status, not the Parameters key's
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineprotectedvirtualinherited |
Reimplemented in dxd::firewire::controller< super_device_t >, dxd::pci::device, and dxd::pci::device.
|
inlineinherited |
conclude()s if launched
|
inlineinherited |
launch()es unless launched, a failure concluded
|
inherited |
|
inlineprotectedvirtualinherited |
surprise removal hook: the hardware side goes at once, what open clients hold waits for conclude()
Reimplemented in dxd::pci::device, and dxd::platform::device.
|
inlineprotectedvirtualinherited |
power hooks: a launched device comes back to the working state, and leaves it - its start and its removal are launch() and conclude()
Reimplemented in dxd::firewire::controller< super_device_t >, dxd::firewire::platform::device< super_device_t >, dxd::pci::device, and dxd::pci::device.
|
friend |
|
friend |
|
inherited |
|
inherited |
the model's name alike
|
inherited |
in the working state
|
inherited |
persistent UID, system unique: the platform takes it from the OS's identity of the device
|
inherited |
|
protected |
the hardware released - removed or rebalanced: the device takes no I/O any more
|
inherited |
the vendor's name the desc states, published with the puid for user mode to match by
| struct { ... } dxd::kmdf::device::wdf |
| struct { ... } dxd::kmdf::device::wdm |