|
dxd - dynax driver framework 3.0.2
cross platform open source driver development framework
|
DriverKit device: the plain C++ object its IOService shell (dxd_device) holds. More...
#include <dxd_platform_device.h>
Classes | |
| class | client |
| an open of the device: one per dxd_user_client the device's shell opens More... | |
Public Member Functions | |
| client* | client_create() override |
| a client for an open: the platform's device makes the platform's client | |
| device(dxd::driver& driver, ::DEVICE_OBJECT* wdm_device, ::DEVICE_OBJECT* wdm_pdo, ::DEVICE_OBJECT* wdm_bus) | |
| the puid is the last part of the devnode's instance id, what its enumerator named it by - a software device's id as its host spelled it | |
| device(dxd::driver& driver, ::IOService* service) | |
| void | identify(uint64_t id) |
| the OS's identity of the hardware as the puid, until launch() states a persistent one | |
| os_result | ioctl(unsigned int ioctl, const void* in, size_t size_in, void* out, size_t size_out, size_t& size) override |
| 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 reference_t> | |
| int | release(reference_t& reference) |
| template<typename desc_t> | |
| os_result | requested(desc_t& desc) const |
| the desc the host created this device with | |
| void | retain() |
| void | try_conclude() |
| conclude()s if launched | |
| os_result | try_launch() |
| launch()es unless launched, a failure concluded | |
| ~device() override | |
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{not_initialized} |
| const char* | vendor{} |
| the vendor's name the desc states, published with the puid for user mode to match by | |
Protected Member Functions | |
| client* | client_create() override |
| a client for an open: the platform's device makes the platform's client | |
| void | conclude() override |
| remove hook, the last word to the hardware | |
| virtual void | filter(::IO_RESOURCE_REQUIREMENTS_LIST &) |
| the resource requirements the bus states, filtered ahead of the start | |
| virtual os_result | launch() |
| start hook, called before any client can reach the device | |
| virtual os_result | sleep() |
| os_result | start(const ::CM_RESOURCE_LIST* raw, const ::CM_RESOURCE_LIST* translated, const ::GUID& guid) |
| the start: launch() with the resources at hand, then the control clients' interface | |
| void | unplugged() override |
| the control interface goes while the PDO stands: at the surprise removal, else at the remove | |
| 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 | |
| ::IOService* | provider{} |
| the driver's shell it stands on | |
| bool | removed{} |
| the device vanished: the stack below no longer answers | |
| ::IOService* | service |
| the shell hosting this device | |
| struct dxd::platform::device:: { ... } | wdm |
Friends | |
| class | ::dxd_device |
| class | driver |
| template<typename> | |
| class | dxd::power |
DriverKit device: the plain C++ object its IOService shell (dxd_device) holds.
plain WDM device, one per FDO
The driver makes it on the host's request: it binds the shell's provider - its own shell - and the request, and runs launch(); the OS object stays with the shell, since iig classes can neither be templates nor bases of framework code.
The KMDF bound counterpart is dxd::kmdf::device (kmdf/dxd_kmdf_device.h): both stand on the same contract, so classes built on either (dxd::streaming::device, the bus devices) name only that. Its client is the contract's: plain WDM adds nothing to an open. The form starts it with the start's resources (start()), which a device kind takes in its launch().
|
inline |
|
inlineoverridevirtual |
Reimplemented from dxd::device.
Reimplemented in dxd::portcls::adapter::device.
|
inline |
the puid is the last part of the devnode's instance id, what its enumerator named it by - a software device's id as its host spelled it
|
inlineoverridevirtual |
a client for an open: the platform's device makes the platform's client
Implements dxd::device.
|
inlineoverrideprotectedvirtual |
a client for an open: the platform's device makes the platform's client
Implements dxd::device.
|
inlineoverrideprotectedvirtual |
remove hook, the last word to the hardware
Reimplemented from dxd::device.
Reimplemented in dxd::usb::device< super_device_t >.
|
inlineprotectedvirtual |
the resource requirements the bus states, filtered ahead of the start
Reimplemented in dxd::pci::device.
|
inlineinherited |
the OS's identity of the hardware as the puid, until launch() states a persistent one
|
inlineoverridevirtual |
dx::ioctl::device::reenumerate: the shell of a device the OS matched on its hardware terminates, the OS matches the hardware anew - a dext a replacement activated takes it, kernelmanagerd leaving the replaced one to its devices
Reimplemented from dxd::device.
Reimplemented in dxd::usb::device< super_device_t >.
|
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 >.
|
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
|
inlineinherited |
|
inline |
the desc the host created this device with
|
inlineinherited |
|
inlineprotectedvirtualinherited |
Reimplemented in dxd::firewire::controller< super_device_t >, dxd::pci::device, and dxd::pci::device.
|
inlineprotected |
the start: launch() with the resources at hand, then the control clients' interface
|
inlineinherited |
conclude()s if launched
|
inlineinherited |
launch()es unless launched, a failure concluded
|
inlineoverrideprotectedvirtual |
the control interface goes while the PDO stands: at the surprise removal, else at the remove
Reimplemented from dxd::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 |
|
friend |
|
inherited |
|
inherited |
the model's name alike
|
inherited |
in the working state
|
protected |
the driver's shell it stands on
|
inherited |
persistent UID, system unique: the platform takes it from the OS's identity of the device
|
inherited |
|
protected |
the device vanished: the stack below no longer answers
|
protected |
the shell hosting this device
|
inherited |
|
inherited |
the vendor's name the desc states, published with the puid for user mode to match by
| struct { ... } dxd::platform::device::wdm |