|
dxd - dynax driver framework 3.0.2
cross platform open source driver development framework
|
service client streaming device interface class: the device the service hosts under <product id>/<puuid>, its settings the service's - mirrored as a kernel driver's values are (dx::proxy::promoted) over the connection More...
#include <dx_service_client_device.h>
Classes | |
| struct | mirror |
| the transport settings' mirror (dx::stream::settings, a hosted device's): the setting mapped to the service's IOCTL More... | |
Public Types | |
| typedef desc_t | desc_t |
| typedef shared::event | event_t |
| typedef promoted<uint32_t>::template preference<decltype(super_device_t::preference)> | source_t |
| typedef dx::device<std::string, preference_t> | super_device_t |
| the device this streaming device sits on: its own operations of a name this class takes for itself (a USB device's configuration()) are reached through it | |
Public Member Functions | |
| virtual desc_t::configuration | align(const typename desc_t::configuration& value, const typename desc_t::configuration &) |
| a configuration the device can run: every stream's index within its configurations, one past them the stream off - a bus device narrows it to what its bus carries, the streams value leaves as current has them standing | |
| void | attach(void** io[dx::stream::direction::directions][2], const std::vector<bool>(& channel_map)[2], const dx::stream::format(& format)[2]) |
| the consumer's planar channel buffers in the format each direction's buffers carry | |
| virtual uint64_t | budget(const typename desc_t::configuration &) |
| the periodic bus time the configuration takes, in ns - a bus device with a periodic budget states it | |
| 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. | |
| void | exception(const dx::exception& exception, bool filtered= false) const noexcept override |
| notification exception handler | |
| virtual uint64_t | frame() const |
| void | hw_clock(abstract::event *event, uint32_t iosize) override |
| registers a consumer with the device's clock: it is signalled every iosize samples of the clock's own advance. A bus whose driver owns the clock hands the registration on instead | |
| virtual bool | hw_clock() const noexcept |
| 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. | |
| std::shared_ptr<stream_t> | open(const typename desc_t::stream::desc& descdesc, bool client= false) |
| the desc's stream: the registered one, else created, registered and launched - a host's client takes a data driven stream alone, its ring has one writer and one reader | |
| const struct desc_t::stream::config& | operator ()(const struct desc_t::stream& stream) |
| the stream configuration the device runs the stream in: the stream is one of the desc's | |
| virtual device& | operator >>(std::ostream &) const |
| the device's own diagnostics, beyond its operator << | |
| group_t& | operator [](const typename desc_t::stream::desc& stream) |
| the stream's group, created on first use | |
| _device& | reset() |
| void | setting(dx::stream::setting setting, uint32_t index, f_t&& f) |
| the setting a host keeps for its clients handed to f as its promoted: the transport settings the sync reference's group's, the source the one of the stream whose target index is index | |
| virtual void | sleep() |
| notify system will sleep stub | |
| virtual std::pair<source_t &, bool> | source(const struct desc_t::stream& stream) |
| the stream's source selector, created on first use: the preference by stream target, the value an index into the stream's sources | |
| std::string | string(uint32_t idx) |
| 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 | |
| void | wake() override |
| ~_device() override | |
Public Attributes | |
| dx::promoted<typename super::client_map> | clients |
| proxy::promoted<service::connection, uint32_t> | clocksource{connection, dx::ioctl::service::clocksource} |
| proxy::promoted<service::connection, typename desc_t::configuration> | configuration{connection, dx::ioctl::service::configuration} |
| proxy::promoted<service::connection, desc_t> | desc{connection, dx::ioctl::service::desc} |
| the service's desc, asked at launch() | |
| dx::driver<decltype(id), preference_t>& | driver |
| std::map<decltype(desc_t::stream::group), group_t> | group |
| struct dx::stream::device:: { ... } | hw |
| promoted<std::string>::preference<decltype(super::preference)> | icon |
| const std::string | id |
| promoted<uint32_t>::preference<decltype(super::preference)> | iosize |
| std::atomic<bool> | launched |
| dx::stream::device::monitor | monitor |
| preference_t | preference |
| std::string | puid |
| persistent UID - system unique - could change with location | |
| std::string | puuid |
| persistent universal UID - universally unique ID (i.e. serial number) | |
| dx::shared::reference | reference |
| this process' crash-safe hold on the puuid's client-local preference store | |
| proxy::promoted<service::connection, uint32_t> | samplerate{connection, dx::ioctl::service::samplerate} |
| < the service's device settings, mirrored: nothing of them persists here | |
| std::map<decltype(desc_t::stream::target.idx()), source_t> | sources |
| promoted<structdesc_t::stream *>::template preference<decltype(super::preference), uint32_t> | sync_reference |
| dx::stream::device::monitor | version |
Static Public Attributes | |
| static constexpr bool | hosted{true} |
Protected Member Functions | |
| virtual void | grouped(group_t &) |
| operator[](): a group just came into existence, a host wires its per-group transports here | |
Protected Attributes | |
| service::connection | connection{std::string{this->driver.product_id}+ "/"+ this->id} |
Friends | |
| template<typename> | |
| class | client::group |
| the app wraps this bus's own group, so friendship has to name it, not just the device's group_t //////////////////////////////////////////////////////////////////////////// | |
service client streaming device interface class: the device the service hosts under <product id>/<puuid>, its settings the service's - mirrored as a kernel driver's values are (dx::proxy::promoted) over the connection
| In | case of an error returned by the underlaying API the device class throws a dx::exception. |
|
inherited |
| typedef shared::event dx::service::client::_device<desc_t, preference_t, stream_t, group_t>::event_t |
|
inherited |
|
inherited |
the device this streaming device sits on: its own operations of a name this class takes for itself (a USB device's configuration()) are reached through it
|
inlineoverride |
|
inlinevirtualinherited |
a configuration the device can run: every stream's index within its configurations, one past them the stream off - a bus device narrows it to what its bus carries, the streams value leaves as current has them standing
|
inlineinherited |
the consumer's planar channel buffers in the format each direction's buffers carry
|
inlinevirtualinherited |
the periodic bus time the configuration takes, in ns - a bus device with a periodic budget states it
|
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.
|
inlineoverridevirtualnoexcept |
notification exception handler
Reimplemented from dx::device< std::string, preference_t >.
|
inlinevirtual |
|
inlineprotectedvirtualinherited |
operator[](): a group just came into existence, a host wires its per-group transports here
|
inlineoverridevirtual |
registers a consumer with the device's clock: it is signalled every iosize samples of the clock's own advance. A bus whose driver owns the clock hands the registration on instead
Reimplemented from dx::stream::device< dx::device< std::string, preference_t >, desc_t, stream_t, group_t >.
|
inlinevirtualnoexceptinherited |
|
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.
|
inlineinherited |
the desc's stream: the registered one, else created, registered and launched - a host's client takes a data driven stream alone, its ring has one writer and one reader
|
inlineinherited |
the stream configuration the device runs the stream in: the stream is one of the desc's
|
inlinevirtualinherited |
the device's own diagnostics, beyond its operator <<
|
inlineinherited |
the stream's group, created on first use
|
inline |
|
inlineinherited |
the setting a host keeps for its clients handed to f as its promoted: the transport settings the sync reference's group's, the source the one of the stream whose target index is index
|
inlinevirtualinherited |
notify system will sleep stub
|
inlinevirtualinherited |
the stream's source selector, created on first use: the preference by stream target, the value an index into the stream's sources
|
inline |
|
inlinenoexceptinherited |
atomically conclude()s if currently launched; returns whether this call did it
|
inlineinherited |
|
inlineoverridevirtualinherited |
Reimplemented from dx::device< std::string, preference_t >.
|
friend |
the app wraps this bus's own group, so friendship has to name it, not just the device's group_t ////////////////////////////////////////////////////////////////////////////
| dx::promoted<typename super::client_map> dx::service::client::_device<desc_t, preference_t, stream_t, group_t>::clients |
| proxy::promoted<service::connection, uint32_t> dx::service::client::_device<desc_t, preference_t, stream_t, group_t>::clocksource{connection, dx::ioctl::service::clocksource} |
| proxy::promoted<service::connection, typename desc_t::configuration> dx::service::client::_device<desc_t, preference_t, stream_t, group_t>::configuration{connection, dx::ioctl::service::configuration} |
the service runs the configuration: its streams' rings are the service's
|
protected |
| proxy::promoted<service::connection, desc_t> dx::service::client::_device<desc_t, preference_t, stream_t, group_t>::desc{connection, dx::ioctl::service::desc} |
the service's desc, asked at launch()
|
inherited |
|
inherited |
streaming groups by desc::stream::group id: every stream of this device is registered with its group - behind the settings its groups listen to, so they go first
|
staticconstexpr |
| struct { ... } dx::stream::device<dx::device<std::string, preference_t>, desc_t, stream_t, group_t>::hw |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
persistent UID - system unique - could change with location
|
inherited |
persistent universal UID - universally unique ID (i.e. serial number)
| dx::shared::reference dx::service::client::_device<desc_t, preference_t, stream_t, group_t>::reference |
this process' crash-safe hold on the puuid's client-local preference store
dx::device::preference (driver.preference[puuid]) is this client process' own settings cache for the device - distinct from the service's own copy. The preference path is namespaced per connecting application (the driver's constructor, process::name()): several instances of the same application share it, so conclude() erases it only where this instance was its last holder - reference is that hold, released by the OS at the process' end even on a crash (dx_shared_reference.h); release() runs the erase where this was the last holder.
| proxy::promoted<service::connection, uint32_t> dx::service::client::_device<desc_t, preference_t, stream_t, group_t>::samplerate{connection, dx::ioctl::service::samplerate} |
< the service's device settings, mirrored: nothing of them persists here
|
inherited |
source selectors by stream target: a stream with sources gets its own on first use
|
inherited |
|
inherited |