|
dxd - dynax driver framework 3.0.2
cross platform open source driver development framework
|
#include <dx_proxy_driver.h>
Classes | |
| struct | notification |
| the device notifications this driver's window is subscribed to: one per interface class it matches, and one per open handle whose removal it must hear about More... | |
| struct | property |
| this bus's name in the device tree and the preference store More... | |
| class | setup |
| the device information set of one interface class: what enumerates the devices present and names their paths More... | |
Public Types | |
| typedef std::conditional_t<held, typename view::template iterator<typename holders::const_iterator>, typename holders::const_iterator> | const_iterator |
| typedef std::conditional_t<held, typename view::template iterator<typename holders::iterator>, typename holders::iterator> | iterator |
| typedef driver | map |
| typedef super::match | match |
| typedef super::match | match |
| typedef driver_settings<dx::promoted<dx::log>::preference<decltype(device<>::preference)>> | settings |
| typedef std::conditional_t<held, typename view::value_type, typename holders::value_type> | value_type |
Public Member Functions | |
| iterator | begin() noexcept |
| virtual bool | boot() |
| void | conclude() noexcept override |
| the device notifications go ahead of their window | |
| std::vector<cf::dictionary<>> | dictionary() const |
| driver(const char* product_id, dx::log log= {}) | |
| driver(const match& matching_ids, const char* product_id, const decltype(super::preference)& preferencepreference, dx::log log= {}) | |
| the virtual driver interface class constructor | |
| driver(const match& matching_ids, const char* product_id, const decltype(super::preference)& preferencepreference, dx::log log= {}) | |
| the driver interface class constructor | |
| driver(const match& matching_ids, const char* product_id, dx::log log= {}) | |
| driver(const match& matching_ids, const char* product_id, dx::log log= {}) | |
| iterator | end() noexcept |
| void | exception(const class exception& exception, bool filtered= false) const noexcept override |
| notification exception handler | |
| virtual void | exception(const exception& exception, bool filtered= false) const noexcept= 0 |
| notification exception handler | |
| iterator | find(const device_id_t& device_id) |
| 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. | |
| 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. | |
| virtual | operator bool() const noexcept |
| virtual driver& | operator <<(std::ifstream &) |
| restores device settings | |
| virtual driver& | operator >>(std::ostream& ostream) const |
| saves device tree | |
| virtual bool | shutdown() |
| client driver::shutdown/boot(): override to shutdown/boot host driver | |
| 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 | |
Public Attributes | |
| cf::string | connection_id = ::IOObjectCopyBundleIdentifierForClass(cf::string{this->product_id}.retain()) |
| T | elements |
| STL member. | |
| T | elements |
| STL member. | |
| K | keys |
| STL member. | |
| K | keys |
| STL member. | |
| std::atomic<bool> | launched |
| dx::log | log |
| cached local log level, mirrors settings::log | |
| redirect::pipe | pipe |
| where the process's lines go: the log's pipes, files under its path named after the product | |
| decltype(device<>::preference) | preference |
| const char* | product_id |
| io::registry | registry{::IOServiceGetMatchingService(::kIOMainPortDefault, cf::dictionary<>{}.set(CFSTR("IOUserServerName"),* this).retain())} |
| std::deque<setup> | setup |
| promoted<os_result> | status |
| the driver's condition, promoted so a host follows it without polling | |
| uint32_t | version |
Static Public Attributes | |
| static constexpr auto | connection_id{class_name} |
Protected Types | |
| typedef decltype(device_t::id) | device_id_t |
| typedef device<> | device_t |
| typedef std::map<device_id_t, std::shared_ptr<device<>>> | holders |
Protected Member Functions | |
| virtual bool | add(const decltype(device<>::id) &)= 0 |
| adds a new device to the device list | |
| virtual bool | add(const decltype(device<>::id) &)= 0 |
| adds a new device to the device list | |
| bool | add(const device_id_t& device_id) override |
| a device whose bus states nothing of it: an empty match takes it | |
| bool | add(const ::io_service_t& id) override |
| bool | add(const typename super::device_id_t& uid) override |
| a device interface the system lists or announces: its path states its class, hardware id and instance, its devnode its names (dx::match::pnp) | |
| virtual void | arrived() |
| notify device arrivals completed stub | |
| void | call(ioctl::driver::ioctl ioctl, const std::vector<uint8_t>& request) |
| a request to the driver's own user client, the connection open for the call alone | |
| virtual void | clear() noexcept |
| replaces std::map::clear to call virtual notification methods | |
| template<typename desc_t> | |
| void | create(const std::string& id, const desc_t& desc) |
| the host's request to make a device: the driver makes it, the arrival follows through the device's matching | |
| template<typename desc_t> | |
| void | create(const std::string& id, const desc_t& desc) |
| the host's request to make a device: PnP makes it, the arrival follows through its interface notification | |
| void | destroy(const std::string& id) |
| void | destroy(const std::string& id) |
| virtual void | remove(const decltype(device<>::id) &)= 0 |
| finds and removes a device from the device list | |
| virtual void | remove(const decltype(device<>::id) &)= 0 |
| finds and removes a device from the device list | |
| void | remove(const device_id_t& device_id) override |
| finds and removes a device from the device list | |
| virtual void | removed() noexcept |
| notify device removals completed stub | |
| void | sleep() override |
| < notify system will sleep | |
| void | wake() override |
Static Protected Member Functions | |
| static std::set<dx::guid> | classes(const dx::match& matchmatch) |
| the device interface classes the match names, the product's own (DX_PRODUCT_GUID) for a dictionary that names none | |
Protected Attributes | |
| match | matching_ids |
| which devices of the bus this driver takes | |
| struct dx::proxy::driver::notification | notification |
|
inherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
inherited |
|
inherited |
| typedef super::match dx::proxy::driver<device_t>::match |
| typedef super::match dx::proxy::driver<device_t>::match |
|
inherited |
the driver's own settings: the log a promoted::preference on the store's dx::log::id node, resolved like a stream desc (dx::log's DX_TREE_SERIALIZE), the constructor's log its default - stored as no entry, reloaded on the store's change
|
inherited |
|
inline |
the virtual driver interface class constructor
checks if kext is installed at all
| matching_ids | the matching dictionaries identifying the devices |
| product_id | driver ID |
| preference | preference |
| log | log settings |
|
inline |
|
inline |
|
inline |
the driver interface class constructor
| matching_ids | the matching dictionaries identifying the devices |
| product_id | driver ID |
| preference | preference |
| log | log settings |
|
inline |
|
protectedpure virtualinherited |
|
protectedpure virtualinherited |
|
inlineoverrideprotectedinherited |
a device whose bus states nothing of it: an empty match takes it
|
inlineoverrideprotected |
a service IOKit lists or announces: its registry entry states the verbs - a dxd device's the names its desc states and its puid, a PCI device's ids as little endian bytes -, its class the IOProviderClass
|
inlineoverrideprotected |
a device interface the system lists or announces: its path states its class, hardware id and instance, its devnode its names (dx::match::pnp)
|
protectedvirtualinherited |
notify device arrivals completed stub
Reimplemented from dx::driver< decltype(device<>::id), decltype(device<>::preference)>.
|
inlinenoexceptinherited |
|
inlinevirtualinherited |
|
inlineprotected |
a request to the driver's own user client, the connection open for the call alone
|
inlinestaticprotected |
the device interface classes the match names, the product's own (DX_PRODUCT_GUID) for a dictionary that names none
|
inlineprotectedvirtualnoexceptinherited |
replaces std::map::clear to call virtual notification methods
|
inlineoverridevirtualnoexcept |
the device notifications go ahead of their window
Reimplemented from dx::map::driver< device<> >.
|
inlineprotected |
the host's request to make a device: the driver makes it, the arrival follows through the device's matching
|
inlineprotected |
the host's request to make a device: PnP makes it, the arrival follows through its interface notification
|
inlineprotected |
|
inlineprotected |
|
inline |
what IOKit enumerates for the match: per dictionary the class it names, else the bus's own - the device's (device_t::device_class) or the driver's devices, which state their product as dxd (DriverKit and IOKit alike) -, its numbers beside; its texts the registry entry answers
|
inlinenoexceptinherited |
|
inlineoverridenoexceptinherited |
notification exception handler
|
pure virtualnoexceptinherited |
notification exception handler
|
inlineinherited |
|
inlinevirtual |
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::map::driver< device<> >.
|
inlineoverridevirtual |
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::map::driver< device<> >.
|
inlinevirtualnoexcept |
|
inlinevirtualinherited |
restores device settings
|
inlinevirtualinherited |
saves device tree
|
protectedpure virtualinherited |
finds and removes a device from the device list
|
protectedpure virtualinherited |
finds and removes a device from the device list
|
inlineoverrideprotectedinherited |
finds and removes a device from the device list
| dx::exception |
|
protectedvirtualinherited |
notify device removals completed stub
Reimplemented from dx::driver< decltype(device<>::id), decltype(device<>::preference)>.
|
inlinevirtualinherited |
client driver::shutdown/boot(): override to shutdown/boot host driver
|
inlineoverrideprotectedinherited |
< notify system will sleep
notify system wake completed stub
|
inlinenoexceptinherited |
atomically conclude()s if currently launched; returns whether this call did it
|
inlineinherited |
|
inlineoverrideprotectedinherited |
| cf::string dx::proxy::driver<device_t>::connection_id= ::IOObjectCopyBundleIdentifierForClass(cf::string{this->product_id}.retain()) |
|
staticconstexpr |
|
inherited |
STL member.
|
inherited |
STL member.
|
inherited |
STL member.
|
inherited |
STL member.
|
inherited |
|
inherited |
cached local log level, mirrors settings::log
|
protectedinherited |
which devices of the bus this driver takes
|
protected |
|
inherited |
where the process's lines go: the log's pipes, files under its path named after the product
|
inherited |
|
inherited |
| io::registry dx::proxy::driver<device_t>::registry{::IOServiceGetMatchingService(::kIOMainPortDefault, cf::dictionary<>{}.set(CFSTR("IOUserServerName"), *this).retain())} |
| std::deque<setup> dx::proxy::driver<device_t>::setup |
|
inherited |
the driver's condition, promoted so a host follows it without polling
|
inherited |