|
dxd - dynax driver framework 2.7.0d222
cross platform open source driver development framework
|
#include <dx_proxy_stream_device.h>
Public Types | |
| enum class | bus { usb = 'usb ' , pci = 'pci ' , vm = 'virt' } |
| typedef dx::stream::desc<> | desc_t |
| typedef event | event_t |
| typedef stream< device< dx::stream::desc<>, dx::preference, stream > > | stream_t |
| typedef desc | value_t |
Public Member Functions | |
| struct stream * | align (struct stream *sync_reference) |
| uint32_t | align (uint32_t sync_reference) const |
| void | attach (channel_t **io[dx::stream::direction::directions][2], const std::vector< bool >(&channel_map)[2]) |
| DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN | catch (const dx::exception &__dx_exception) |
| void | conclude () noexcept override |
| unsigned char | configuration (unsigned char configuration) try |
| DX_PRAGMA_IGNORE_RETURN_VALUE_END unsigned char | configurations () const try |
| auto | count () const noexcept |
| void | ctl (uint32_t ioctl) const try |
| dx_catchall_handler (this,) void conclude() noexcept override | |
| dx_catchall_handler_or_rethrow (this, exception.error==not_implemented, return 0;) bool start(uint64_t frame=0 | |
| dx_catchall_rethrow (, "name: %s, access rights: %x, sharing options:%x", name, access, share) | |
| dx_catchall_rethrow () ~device() override | |
| the device class destructor | |
| dx_pass (::IOConnectCallStructMethod(io_connect, ioctl, nullptr, 0, &rx, &size), "%s rx:%p size:%d", fourchar::to::string(ioctl).c_str(), &rx, size) | |
| uint32_t | enumerate (const format &format=any) const |
| enumerate typified pins | |
| void | exception (const dx::exception &exception, bool filtered=false) const noexcept override |
| notification exception handler | |
| struct stream * | find (const decltype(stream::target.idx())&target) |
| struct stream * | find (const format &format=any, enum direction::direction direction=direction::any) |
| struct stream * | find (const target_t &target) |
| struct stream * | find (uint32_t &pin, const format &format=any, enum direction::direction direction=direction::any) |
| finds and returns the stream description and pin idx into this stream | |
| DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN virtual DX_PRAGMA_IGNORE_RETURN_VALUE_END uint64_t | frame () const try |
| template<typename value_t, typename = cf::enable_if_convertible<value_t>> | |
| value_t | get (::CFStringRef key) const |
| ::CFTypeRef | get (::CFStringRef key) const |
| template<typename value_t, typename = cf::enable_if_convertible<value_t>> | |
| value_t | get (::CFStringRef key, ::CFTypeRef dflt) const noexcept |
| ::CFTypeRef | 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 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 key_t, typename = cf::enable_if_convertible<key_t>> | |
| ::CFTypeRef | get (key_t key) const |
| virtual bool | hw_clock () const noexcept |
| virtual void | hw_clock (abstract::event *hw_clock) |
| rx_t | ictl (unsigned int ioctl) const |
| Windows: member ioctl. | |
| void | info (std::ostream &os) noexcept override |
| 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 | |
| size_t | ioctl (unsigned int ioctl, const tx_t &tx, rx_t &rx) const |
| 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. | |
| 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 const ::io_registry_entry_t & () const noexcept | |
| auto converter into const io_object | |
| operator const os_event () const noexcept | |
| operator const std::string & () const noexcept | |
| identifying device string, mirroring macOS' io::registry conversion | |
| operator os_event () noexcept | |
| operator uint64_t () const | |
| operator::CFMutableDictionaryRef () const | |
| operator::CFStringRef () const | |
| operator::HANDLE () const noexcept | |
| operator::io_registry_entry_t & () noexcept | |
| auto converter into io_object | |
| operator::io_registry_entry_t & () noexcept | |
| auto converter into io_object | |
| operator::io_registry_entry_t * () noexcept | |
| auto converter into io_object pointer | |
| operator::io_registry_entry_t * () noexcept | |
| auto converter into io_object pointer | |
| bool | operator== (const desc &desc) const |
| bool | operator== (::io_registry_entry_t io_object) const noexcept |
| virtual device & | operator>> (std::ostream &) const |
| virtual device & | operator>> (std::ostream &) const |
| ::CFTypeRef | operator[] (::CFStringRef key) const |
| template<typename key_t, typename = cf::enable_if_convertible<key_t>> | |
| ::CFTypeRef | operator[] (key_t key) const |
| registry | parent () const |
| _device & | reset () |
| reference & | retain () |
| device & | 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. | |
| registry & | set (::CFStringRef key, ::CFTypeRef value) |
| template<typename value_t, typename = cf::enable_if_convertible<value_t>> | |
| registry & | set (::CFStringRef key, value_t value) |
| 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) |
| virtual void | sleep () |
| notify system will sleep stub | |
| virtual void | sleep () |
| notify system will sleep stub | |
| virtual bool | start (uint64_t=0, unsigned int starting=1) |
| virtual unsigned int | stop (bool force=false) noexcept |
| virtual DX_PRAGMA_IGNORE_RETURN_VALUE_END std::string | string (uint8_t) const |
| uint32_t | sync_reference (struct stream *sync_reference) |
| struct stream * | sync_reference (uint32_t sync_reference) |
| bool | try_conclude () noexcept |
| atomically conclude()s if currently launched; returns whether this call did it | |
| 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 | |
| bool | try_launch () |
| atomically launch()es if not already launched; returns whether this call did it | |
| void | wake () override |
Public Attributes | |
| cf::string | bundle_id |
| enum dx::stream::desc::bus | bus |
| promoted< typename super::client_map, typename super::client_map::value_t > | clients |
| abstract::event * | clock |
| uint32_t | clocks {} |
| number of independent clocks [currenlty only single clock support] | |
| promoted< uint32_t >::preference< decltype(dx::stream::control< dx::proxy::device< dx::preference > >::preference)> | clocksource |
| std::atomic< size_t > | counter |
| promoted< dx::stream::desc<>, typename dx::stream::desc<>::value_t > | desc |
| bool | dflt {} |
| can be selected as default (OS audio) device | |
| dx::driver< decltype(id), dx::preference > & | driver |
| dx::driver< decltype(id), dx::preference > & | driver |
| bool | editable {} |
| can be edited | |
| bool | hidden {} |
| hide device | |
| struct { | |
| abstract::event * clock | |
| std::atomic< size_t > counter | |
| uint32_t iosize | |
| } | hw |
| promoted< std::string > | icon |
| const std::string | id |
| const ::io_service_t | id |
| promoted< uint32_t > | iosize |
| std::atomic< bool > | launched |
| std::atomic< bool > | launched |
| struct dx::stream::desc::name_id | model |
| dx::stream::device::monitor | monitor |
| std::deque< std::function< void(control &)> > | notify |
| bool | persistence {} |
| device has capability to store persistent settings (i.e. sample rate; clock source; etc.) | |
| dx::preference | preference |
| dx::preference | preference |
| std::string | puid |
| persistent UID - system unique - could change with location | |
| std::string | puid |
| persistent UID - system unique - could change with location | |
| std::string | puuid |
| persistent universal UID - universally unique ID (i.e. serial number) | |
| std::string | puuid |
| persistent universal UID - universally unique ID (i.e. serial number) | |
| promoted< uint32_t > | safety_offset [dx::stream::direction::directions] |
| dx::promoted< uint32_t > | samplerate |
| return | size |
| direction::direction | start_stop_order = direction::any |
| unsigned int | started |
| struct dx::stream::desc::stream | stream [max_streams] |
| std::map< decltype(dx::stream::desc<>::stream::target.idx()), std::weak_ptr< stream< device< dx::stream::desc<>, dx::preference, stream > > > > | streams |
| promoted< uint32_t >::preference< decltype(dx::stream::control< dx::proxy::device< dx::preference > >::preference)> | sync_cycle_ticks |
| promoted< structdesc_t::stream * >::template preference< decltype(dx::stream::control< dx::proxy::device< dx::preference > >::preference), uint32_t > | sync_reference |
| rx_t &rx const | try |
| struct dx::stream::desc::name_id | vendor |
| dx::stream::device::monitor | version |
Protected Types | |
| typedef service::request< service::stream::data< typename super_device_t::desc_t > > | request |
| typedef pipe< request >::template server< user_client, std::weak_ptr< device > > | server |
| pipe::server connecting user_clients The pipe holds a std::weak_ptr<device> as a temporary by the pipe::server::args variadic tuple to create shared device references for the user_client. At time of device construction there is not yet a std::shared_ptr<device>, therefore the pipe::server::args weak_ptr assignment happens at service::device::launch(). | |
| enum class | type : ::DWORD { undefined = REG_NONE , uint32 = REG_DWORD , uint64 = REG_QWORD , string = REG_SZ , vendor = REG_BINARY } |
Protected Member Functions | |
| std::string | canonical (const std::string &name) const try |
| catch (...) | |
| dx_catchall_rethrow () registry(const registry ®istry | |
| registry & | erase (const char *subkey=nullptr) noexcept |
| virtual void | flush () |
| void | halt () noexcept override |
| 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 |
| 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. | |
| registry & | run () |
| dx_catchall_rethrow() registry &initialize(size_t | size () const noexcept |
Static Protected Member Functions | |
| static self_t void | assign (const self_t &self, const value_t &value) try |
| template<typename self_t> | |
| static registry | at (const self_t &self) |
| template<typename container_t, typename self_t> | |
| static container_t | children (const self_t &self) noexcept try |
| template<typename value_t, typename self_t> | |
| static bool | fetch (const self_t &self, value_t &value) try |
| template<typename self_t> | |
| static bool | nested (const self_t &self) noexcept |
| template<typename self_t> | |
| static size_t | size (const self_t &self) noexcept |
Protected Attributes | |
| bool | connected |
| ::HANDLE | handle = invalid_t |
| struct { | |
| cf::string bundle_id | |
| cf::string class_name | |
| } | kernel |
| std::string | key |
| const std::string & | key: rights{registry.rights} |
| std::deque< std::function< void()> > | listen |
| const std::string | owns_root |
| server | pipe |
| io::port | port |
| ::HANDLE | process = ::GetCurrentProcess() |
| const std::string | root {registry.root} |
| class dx::service::device::promoted | safety_offset_in [dx::stream::direction::in] |
| class dx::service::device::promoted | safety_offset_out [dx::stream::direction::out] |
| bool | schedule_erase {} |
| std::recursive_mutex | start_stop_in_progress |
| start/stop operation in progress | |
|
inherited |
|
inherited |
|
protectedinherited |
|
protectedinherited |
pipe::server connecting user_clients The pipe holds a std::weak_ptr<device> as a temporary by the pipe::server::args variadic tuple to create shared device references for the user_client. At time of device construction there is not yet a std::shared_ptr<device>, therefore the pipe::server::args weak_ptr assignment happens at service::device::launch().
|
inherited |
|
inherited |
|
stronginherited |
|
strongprotectedinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinestaticprotectedinherited |
|
inlinestaticprotectedinherited |
dx::key_value_tree<registry> contract: resolves self's parent chain into one real key/value position, then delegates below - the only place a registry[k1][k2]..[kN] chain becomes real subkeys/values.
|
inlineinherited |
|
inlineprotectedinherited |
|
inlineinherited |
|
inlineprotectedinherited |
|
inlinestaticprotectednoexceptinherited |
self's own child names as any string container, yielding an empty one when the key is absent or inaccessible. Stays a static, not a dx::key_value_tree-style operator container_t(): registry is a dependent base of key_value_tree<registry> (inherited via the tree_t template parameter), and key_value_tree's own operator value_t() becomes entirely unreachable once a dependent base declares a same-shaped operator container_t() template of its own.
|
inlineoverridevirtualnoexceptinherited |
Reimplemented from dx::proxy::device< dx::preference >.
|
inlineinherited |
|
inlineinherited |
|
inlinenoexceptinherited |
|
inlineinherited |
|
inlineoverridenoexceptinherited |
|
pure virtualinherited |
|
inherited |
|
inlineoverrideinherited |
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
|
protectedinherited |
cheap: purely in-memory identity extension with a bare child name - what dx::key_value_tree::operator[] builds on.
|
inherited |
|
inlineinherited |
enumerate typified pins
|
inlineprotectednoexceptinherited |
|
inlineoverridevirtualnoexceptinherited |
notification exception handler
Reimplemented from dx::device<::io_service_t, dx::preference >.
Reimplemented in dx::usb::platform::device< preference_t >, and dx::usb::platform::device< dx::preference >.
|
inlinestaticprotectedinherited |
|
inlineinherited |
|
inlineinherited |
| format | search stream format filter |
| direction | search stream direction filter |
|
inlineinherited |
|
inlineinherited |
finds and returns the stream description and pin idx into this stream
| pin | in: global pin index, out: pin index into returned stream description |
| format | search stream format filter |
| direction | search stream direction filter |
|
inlineprotectedvirtualinherited |
|
inlinevirtualinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineoverrideprotectedvirtualnoexceptinherited |
Reimplemented from dx::stream::control< dx::proxy::device< dx::preference > >.
|
inlinevirtualnoexceptinherited |
|
inlinevirtualinherited |
|
inlineinherited |
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 |
| rx_t | type of rx_t needs to be explicitly specified as it can't be deduced |
|
inlineoverridevirtualnoexceptinherited |
Reimplemented from dx::proxy::device< dx::preference >.
|
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 |
|
inlineinherited |
|
inlineprotectedvirtualinherited |
launch notification: object mounted and ready to use. Called only through try_launch() - never call this directly from outside the class hierarchy.
|
inlineoverridevirtualinherited |
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::usb::stream::_device< desc_t, dx::preference, pipe< device< desc_t, dx::preference, pipe > > >.
|
inlinestaticprotectednoexceptinherited |
|
inlineinherited |
|
inlinenoexceptinherited |
auto converter into const io_object
|
inlinenoexceptinherited |
auto converter into const io_object
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
identifying device string, mirroring macOS' io::registry conversion
|
inlinenoexceptinherited |
|
inlineexplicitinherited |
|
inlineexplicitinherited |
|
inlineexplicitinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
auto converter into io_object
|
inlinenoexceptinherited |
auto converter into io_object
|
inlinenoexceptinherited |
auto converter into io_object pointer
|
inlinenoexceptinherited |
auto converter into io_object pointer
|
inlineinherited |
|
inlinenoexceptinherited |
|
inlinevirtualinherited |
|
inlinevirtualinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineprotectedinherited |
|
inlineinherited |
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineprotectednoexceptinherited |
stays a named method: base and derived conversion function templates are simultaneous overload candidates, so an operator value_t() here would compete with dx::key_value_tree's own. like get<value_t>() but returns false for ERROR_FILE_NOT_FOUND, from either RegQueryValueExA or value_of() itself; any other failure throws. a sibling thread/process may delete the containing key between value_of()'s create and the set - retry recreates the whole chain in that case subkey+value count straight off RegOpenKeyExA's own success/failure - never key_of()'s throwing wrapper, since "the key doesn't exist" is this method's ordinary, expected outcome here, not a genuine error.
|
inlinestaticprotectednoexceptinherited |
|
inlinevirtualinherited |
notify system will sleep stub
|
inlinevirtualinherited |
notify system will sleep stub
|
inlinevirtualinherited |
result indicates if start changed the state.
|
inlinevirtualnoexceptinherited |
result indicates the amount of stopped start references
|
inlinevirtualinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinenoexceptinherited |
atomically conclude()s if currently launched; returns whether this call did it
|
inlinenoexceptinherited |
atomically conclude()s if currently launched; returns whether this call did it
|
inlineinherited |
atomically launch()es if not already launched; returns whether this call did it
|
inlineinherited |
atomically launch()es if not already launched; returns whether this call did it
|
inlineoverrideinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
number of independent clocks [currenlty only single clock support]
|
inherited |
|
protectedinherited |
|
inherited |
|
inherited |
|
inherited |
can be selected as default (OS audio) device
|
inherited |
|
inherited |
|
inherited |
can be edited
|
protectedinherited |
|
inherited |
hide device
| struct { ... } dx::stream::device< dx::stream::control< dx::proxy::device< dx::preference > >, dx::stream::desc<>, stream< device< dx::stream::desc<>, dx::preference, stream > > >::hw |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
| struct { ... } dx::service::device< dx::preference >::kernel |
|
protectedinherited |
|
protectedinherited |
|
inherited |
|
inherited |
|
protectedinherited |
|
inherited |
|
inherited |
|
inherited |
|
protectedinherited |
|
inherited |
device has capability to store persistent settings (i.e. sample rate; clock source; etc.)
|
protectedinherited |
|
protectedinherited |
|
inherited |
|
inherited |
|
protectedinherited |
|
inherited |
persistent UID - system unique - could change with location
|
inherited |
persistent UID - system unique - could change with location
|
inherited |
persistent universal UID - universally unique ID (i.e. serial number)
|
inherited |
persistent universal UID - universally unique ID (i.e. serial number)
|
protectedinherited |
|
inherited |
|
protectedinherited |
|
protectedinherited |
|
inherited |
|
protectedinherited |
|
inherited |
|
protectedinherited |
start/stop operation in progress
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
| (c) copyright 2009 dynamic acoustics e.U. | generated on |