|
| void | attach (channel_t **io[dx::stream::direction::directions][2], const std::vector< bool >(&channel_map)[2]) |
| 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 |
| virtual bool | hw_clock () const noexcept |
| 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 device & | operator>> (std::ostream &) const |
| group_t & | operator[] (const typename desc_t::stream::desc &stream) |
| | the stream's group, created on first use
|
| _device & | reset () |
| 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
|
| void | wake () override |
| | ~_device () override |
|
| dx::promoted< typename super::client_map > | clients |
| dx::shared::guard< std::map< abstract::event *, dx::stream::clock::consumer > > | clock |
| | event -> its own iosize and sample counter
|
| client::promoted< uint32_t, request > | clocksource {pipe, request::id::clocksource} |
| client::promoted< desc_t, request > | desc {pipe, request::id::desc} |
| | the service's desc, asked over the pipe at launch()
|
| dx::driver< decltype(id), preference_t > & | driver |
| std::map< decltype(desc_t::stream::group), group_t > | group |
| | 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
|
| struct { | |
| dx::shared::guard< std::map< abstract::event *, dx::stream::clock::consumer > > clock | |
| | event -> its own iosize and sample counter More...
|
| uint32_t iosize | |
| | staging value for registration paths without their own iosize argument (macOS CF property bridge) More...
|
| } | hw |
| promoted< std::string >::preference< decltype(super::preference)> | icon |
| const std::string | id |
| promoted< uint32_t >::preference< decltype(super::preference)> | iosize |
| uint32_t | iosize |
| | staging value for registration paths without their own iosize argument (macOS CF property bridge)
|
| 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
|
| client::promoted< uint32_t, request > | samplerate {pipe, request::id::samplerate} |
| | < the service's device settings, mirrored: born with the pipe as their server, the service's broadcasts commit them, 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 |
template<typename
desc_t, typename preference_t, typename
stream_t, typename
group_t>
class dx::service::client::_device< desc_t, preference_t, stream_t, group_t >
service client streaming device interface class
- Exceptions
-
| In | case of an error returned by the underlaying API the device class throws a dx::exception. |
Initial value:{
std::string puuid
Definition dx_device.h:52
const char * product_id
Definition dx_driver.h:144
service client driver interface class
Definition dx_service_client_driver.h:99
process
Definition macOS/dx_sync.h:351
static constexpr auto bus
Definition dx_service_client_driver.h:149
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 (a different registry hive: the service runs as LocalSystem, clients as the interactive user). Live values (samplerate, iosize, ...) already reach this object independently via the chain<> pipe broadcast below; what preference persists here is only what should survive this process disconnecting and reconnecting later.
The preference path is namespaced per connecting application (see the driver constructor in dx_service_client_driver.h, via process::name()), not just per device: two different applications must not share one settings key, but several instances of the same application legitimately should - and can therefore hold that identical key open at the same time. conclude() must not simply erase it on every single instance's own disconnect (schedule_erase only ever fires for non-persistent devices to begin with) - that would delete settings a sibling instance still actively uses, racing its concurrent registry access.
reference is this instance's hold on that shared identity: holding it signals "I am
interested" to every other process under the same name, with no protocol beyond its own construction/release() - the OS releases the underlying named mutex (Windows) / advisory lock (macOS) on process exit even on a crash, so this can never desync the way a value manually incremented/decremented in memory would (dx_shared_reference.h). release() reports whether this was the last holder; only then may conclude() erase.