|
dxd - dynax driver framework 3.0.1d223
cross platform open source driver development framework
|
device mapping driver interface class More...
#include <dx_driver.h>
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 driver_settings< dx::promoted< dx::log >::preference< decltype(_device_t::preference) > > | settings |
| typedef std::conditional_t< held, typename view::value_type, typename holders::value_type > | value_type |
Public Member Functions | |
| const_iterator | begin () const noexcept |
| iterator | begin () noexcept |
| virtual bool | boot () |
| void | conclude () noexcept override |
| conclude notification: object will be removed. If you overwrite conclude() you also need to overwrite destructor and check if its needed to be called from there. Called only through try_conclude() - never call this directly from outside the class hierarchy. | |
| template<typename product_id_t, typename... args_t> requires std::is_convertible_v<product_id_t, const char*> | |
| driver (product_id_t &&product_id, args_t &&... args) | |
| const_iterator | end () const noexcept |
| 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) |
| const_iterator | find (const device_id_t &device_id) const |
| void | info (std::ostream &os) noexcept override |
| log object class information | |
| 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 driver & | operator<< (const char *file) |
| virtual driver & | operator<< (std::ifstream &) |
| restores device settings | |
| virtual driver & | operator>> (const char *file) const |
| 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 | |
| T | elements |
| STL member. | |
| K | keys |
| STL member. | |
| std::atomic< bool > | launched |
| dx::log | log |
| cached local log level, mirrors settings::log | |
| decltype(_device_t::preference) | preference |
| const char * | product_id |
| promoted< os_result > | status |
| the driver's condition, promoted so a host follows it without polling | |
| uint32_t | version |
Protected Types | |
| typedef decltype(device_t::id) | device_id_t |
| typedef _device_t | device_t |
| typedef std::map< device_id_t, std::shared_ptr< holder_t > > | holders |
Protected Member Functions | |
| virtual void | add (const decltype(_device_t::id) &)=0 |
| adds a new device to the device list | |
| void | add (const device_id_t &device_id) override |
| adds a new device to the device list | |
| virtual void | arrived () |
| notify device arrivals completed stub | |
| virtual void | arrived (device_t &) |
| notify specific device arrival stub | |
| virtual void | clear () noexcept |
| replaces std::map::clear to call virtual notification methods | |
| virtual void | remove (const decltype(_device_t::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 | |
| virtual void | removed (device_t &) noexcept |
| notify specific device removal stub | |
| void | sleep () override |
| < notify system will sleep | |
| void | wake () override |
device mapping driver interface class
The device mapping driver class is a common driver helper to create consistently device objects and to bind and keep the device to the driver identified by the set of matching device IDs.
device arrival/removal is initiated by launch/conclude at driver start/end and as IOService notification. Therefor manipulating the device std::deque needs to be locked.
| in | case of an error returned by the underlaying API the driver class throws a dx::exception. |
| typedef std::conditional_t<held, typename view::template iterator<typename holders::const_iterator>, typename holders::const_iterator> dx::map::driver< _device_t, holder_t >::const_iterator |
|
protected |
|
protected |
|
protected |
| typedef std::conditional_t<held, typename view::template iterator<typename holders::iterator>, typename holders::iterator> dx::map::driver< _device_t, holder_t >::iterator |
| typedef driver dx::map::driver< _device_t, holder_t >::map |
|
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
| typedef std::conditional_t<held, typename view::value_type, typename holders::value_type> dx::map::driver< _device_t, holder_t >::value_type |
|
inline |
|
protectedpure virtualinherited |
adds a new device to the device list
| dx::exception |
|
inlineoverrideprotected |
adds a new device to the device list
| dx::exception |
|
inlineprotectedvirtual |
notify device arrivals completed stub
Reimplemented from dx::driver< decltype(_device_t::id), decltype(_device_t::preference)>.
|
inlineprotectedvirtual |
notify specific device arrival stub
Reimplemented in dx::stream::driver< dx::map::driver< device_t > >, and dx::stream::driver< map::driver< device_t > >.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinevirtualinherited |
|
inlineprotectedvirtualnoexcept |
replaces std::map::clear to call virtual notification methods
|
inlineoverridevirtualnoexcept |
conclude notification: object will be removed. If you overwrite conclude() you also need to overwrite destructor and check if its needed to be called from there. Called only through try_conclude() - never call this directly from outside the class hierarchy.
Reimplemented from dx::object.
Reimplemented in dx::midi::services::driver< device_t >, dx::proxy::driver< device_t >, dx::service::client::driver< device_t >, and dx::wasapi::client::driver< device_t >.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineoverridenoexceptinherited |
notification exception handler
|
pure virtualnoexceptinherited |
notification exception handler
|
inline |
|
inline |
|
inlineoverridevirtualnoexcept |
log object class information
Reimplemented from dx::driver< decltype(_device_t::id), decltype(_device_t::preference)>.
Reimplemented in dx::midi::services::driver< device_t >, dx::proxy::driver< device_t >, dx::proxy::driver< device_t >, dx::service::client::driver< device_t >, dx::stream::driver< dx::map::driver< device<> > >, dx::stream::driver< dx::map::driver< device_t > >, dx::stream::driver< map::driver< device_t > >, dx::virtuel::driver< device_t >, dx::virtuel::driver< device<> >, and dx::wasapi::client::driver< device_t >.
|
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::object.
Reimplemented in dx::midi::services::driver< device_t >, dx::proxy::driver< device_t >, dx::proxy::driver< device_t >, dx::service::client::driver< device_t >, dx::virtuel::driver< device_t >, dx::virtuel::driver< device<> >, and dx::wasapi::client::driver< device_t >.
|
inlinevirtual |
Reimplemented in dx::coreaudio::driver< device_t >.
|
inlinevirtual |
restores device settings
Reimplemented in dx::coreaudio::driver< device_t >, and dx::coremidi::driver< device_t >.
|
inlinevirtual |
|
inlinevirtual |
saves device tree
Reimplemented in dx::coreaudio::driver< device_t >.
|
protectedpure virtualinherited |
finds and removes a device from the device list
|
inlineoverrideprotected |
finds and removes a device from the device list
| dx::exception |
|
inlineprotectedvirtualnoexcept |
notify device removals completed stub
Reimplemented from dx::driver< decltype(_device_t::id), decltype(_device_t::preference)>.
|
inlineprotectedvirtualnoexcept |
notify specific device removal stub
|
inlinevirtualinherited |
client driver::shutdown/boot(): override to shutdown/boot host driver
|
inlineoverrideprotected |
< notify system will sleep
notify system wake completed stub
|
inlinenoexceptinherited |
atomically conclude()s if currently launched; returns whether this call did it
|
inlineinherited |
|
inlineoverrideprotected |
|
inherited |
STL member.
|
inherited |
STL member.
|
inherited |
|
inherited |
cached local log level, mirrors settings::log
|
inherited |
|
inherited |
|
inherited |
the driver's condition, promoted so a host follows it without polling
|
inherited |
| (c) copyright 2009 dynamic acoustics e.U. | generated on |