dxd - dynax driver framework 3.0.1d223
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::proxy::stream::device< desc_t, preference_t, stream_t, group_t > Class Template Reference

the bus's device as a product composes it: the _device above with this bus's own stream and group, the group's clock being the driver's More...

#include <dx_proxy_stream_device.h>

Inheritance diagram for dx::proxy::stream::device< desc_t, preference_t, stream_t, group_t >:
Collaboration diagram for dx::proxy::stream::device< desc_t, preference_t, stream_t, group_t >:

Public Types

typedef dx::stream::desc<> desc_t
typedef shared::event event_t
 the driver signals this client through it: the engine's clock and every stream's data events
typedef std::set< std::string > keys
typedef promoted< uint32_t >::template preference< decltype(dx::proxy::device< dx::preference >::preference)> source_t
typedef stream< device< dx::stream::desc<>, dx::preference, stream, group > > stream_t
enum  type
 the value types this store keeps - a scalar rides as REG_DWORD/REG_QWORD rather than as a byte copy, so a value written here reads like any other in the registry editor More...
typedef desc value_t

Public Member Functions

struct stream * align (struct stream *sync_reference)
 the given stream where it may be the sync reference, else the first one that may - what a stored reference is aligned to when the desc changed under it
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])
 catch (...)
 catch (...)
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.
unsigned char configuration (unsigned char configuration)
unsigned char configurations () const
auto count () const noexcept
void ctl (uint32_t ioctl) const
void ctl (unsigned int ioctl) const
uint32_t enumerate (const format &format=any) const
 enumerate typified pins
registry & erase (const char *subkey=nullptr) noexcept
void exception (const dx::exception &exception, bool filtered=false) const noexcept override
 notification exception handler
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
virtual uint64_t frame () const
virtual void free () noexcept
bool get (value_t &value) const
value_t get () const
value_t get (::CFStringRef key) const
::CFTypeRef get (::CFStringRef key) const
value_t get (::CFStringRef key, ::CFTypeRef dflt) const noexcept
::CFTypeRef get (::CFStringRef key, ::CFTypeRef dflt) const noexcept
value_t get (::CFStringRef key, value_t dflt) const noexcept
value_t get (key_t key) const
::CFTypeRef get (key_t key) const
bool get (value_t &value) const
void grouped (typename super::group< device< dx::stream::desc<>, dx::preference, stream, group > > &group) override
virtual bool hw_clock () const noexcept
void hw_clock (abstract::event *hw_clock, uint32_t iosize) override
 registers this client's buffer switch event with the driver's clock domain
enable_if_ptr< rx_t > ictl (uint32_t ioctl) const
enable_if_scalar< rx_t > ictl (uint32_t ioctl) const
hide_if_scalar_or_ptr< rx_t > ictl (uint32_t ioctl) const
 member ioctl
size_t ictl (uint32_t ioctl, rx_t &rx) const
rx_t ictl (unsigned int ioctl) const
 Windows: member ioctl.
size_t ictl (unsigned int ioctl, rx_t &rx) const
void info (std::ostream &os) noexcept override
 log object class information
registry & initialize (::HKEY root, ::REGSAM rights=KEY_ALL_ACCESS)
registry & initialize (::REGSAM rights=KEY_ALL_ACCESS, ::HKEY root=HKEY_CURRENT_USER)
void initialize (const char *name, ::DWORD access=GENERIC_READ|GENERIC_WRITE, ::DWORD share=FILE_SHARE_READ|FILE_SHARE_WRITE)
 (re-)initialization the underlaying windows API is CreateFile(). for detailed information see http://msdn.microsoft.com/en-us/library/aa363858(VS.85).aspx
registry & initialize (const std::string &key, ::HKEY root=HKEY_CURRENT_USER, ::REGSAM rights=KEY_ALL_ACCESS)
rx_t ioctl (uint32_t ioctl, const tx_t &tx) const
size_t ioctl (uint32_t ioctl, const tx_t &tx, rx_t &rx) const
size_t ioctl (uint32_t ioctl, const void *tx=nullptr, size_t tx_size=0, void *rx=nullptr, size_t rx_size=0) const
rx_t ioctl (unsigned int ioctl, const tx_t &tx) const
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.
device & octl (uint32_t ioctl, const tx_t &tx)
device & octl (uint32_t ioctl, const tx_t tx)
void octl (unsigned int ioctl, const tx_t &tx) const
std::shared_ptr< stream< device< dx::stream::desc<>, dx::preference, stream, group > > > open (const typename dx::stream::desc<>::stream::desc &desc)
 the desc's stream: the registered one, else created, registered and launched
std::shared_ptr< stream_t > open (const typename dx::stream::desc<>::stream::desc &desc)
 the desc's stream: the registered one, else created, registered and launched
 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::HKEY () 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== (::io_registry_entry_t io_object) const noexcept
bool operator== (const desc &desc) const
virtual device & operator>> (std::ostream &) const
 the device's own diagnostics, beyond dx::object::info
virtual device & operator>> (std::ostream &) const
 the device's own diagnostics, beyond dx::object::info
::CFTypeRef operator[] (::CFStringRef key) const
group< device< dx::stream::desc<>, dx::preference, stream, group > > & operator[] (const typename dx::stream::desc<>::stream::desc &stream)
 the stream's group, created on first use
::CFTypeRef operator[] (key_t key) const
group_t & operator[] (const typename dx::stream::desc<>::stream::desc &stream)
 the stream's group, created on first use
registry parent () const
_device & reset ()
reference & retain ()
registry & run ()
device & set (::CFStringRef key, ::CFTypeRef value) noexcept
device & set (::CFStringRef key, value_t value)
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 (::DWORD type, const void *value, size_t size)
device & set (key_t key, ::CFTypeRef value)
device & set (key_t key, value_t value)
size_t size () const noexcept
virtual void sleep ()
 notify system will sleep stub
virtual void sleep ()
 notify system will sleep stub
virtual std::pair< source_t &, bool > source (const struct dx::stream::desc<>::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
virtual std::string string (uint8_t) const
uint32_t sync_reference (struct stream *sync_reference)
struct stream * sync_reference (uint32_t sync_reference)
 the n-th stream qualifying as sync reference, and the twin below the index of a given one - the two directions of the preference's value
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
type type () const noexcept
void wake () override

Static Public Member Functions

static void assign (const self_t &self, const value_t &value)
static void assign (const self_t &self, const value_t &value)
static registry at (const self_t &self)
static container_t children (const self_t &self) noexcept
static void create (const char *product_id, const ::GUID &guid, const std::string &id, const desc_t &desc)
 persisted software device: PnP keeps it enumerated after the creating handle closes
static void create (const char *product_id, const ::GUID &guid, const std::string &id, const dx::stream::desc<> &desc)
 persisted software device: PnP keeps it enumerated after the creating handle closes
static void destroy (const char *product_id, const ::GUID &guid, const std::string &id)
 re-acquires the persisted device and binds it to the closing handle; PnP keeps the removed device's node as a phantom, uninstalled here
static bool fetch (const self_t &self, value_t &value)
static bool fetch (const self_t &self, value_t &value)
static bool nested (const self_t &self) noexcept
static void purge (const self_t &self) noexcept
static size_t size (const self_t &self) noexcept

Public Attributes

cf::string bundle_id
dx::stream::bus::bus bus {}
 the bus this device hangs on
promoted< typename super::client_map, typename super::client_map::value_t > clients
dx::shared::lockfree::list< registration > clock
 the tick walks it without a lock
uint32_t clocks {}
promoted< uint32_t >::preference< decltype(super::preference)> clocksource
dx::stream::clock::consumer consumer
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
abstract::event * event
struct dx::stream::desc::firmware firmware
std::map< decltype(dx::stream::desc<>::stream::group), group< device< dx::stream::desc<>, dx::preference, stream, group > > > 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
bool hidden {}
 hide device
struct { 
   struct registration { 
      dx::stream::clock::consumer   consumer 
      abstract::event *   event 
      volatile bool   reset {} 
   } 
   dx::shared::lockfree::list< registration >   clock 
 the tick walks it without a lock More...
   uint32_t   iosize 
 staging value for registration paths without their own iosize argument (macOS CF property bridge) More...
   std::mutex   mutex 
 the registrations' writers More...
   std::map< abstract::event *, std::unique_ptr< registration > >   registrations 
} hw
promoted< std::string > icon
const ::io_service_t id
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)
chain< uint32_t > iosize_server
std::string key
std::atomic< bool > launched
std::atomic< bool > launched
std::deque< std::function< void()> > listen
struct dx::stream::desc::name_id model
dx::stream::device::monitor monitor
std::mutex mutex
 the registrations' writers
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)
std::map< abstract::event *, std::unique_ptr< registration > > registrations
std::list< promoted< uint32_t > > safety_offset_server
 per group: the kernel keeps the client margins of its streams
dx::promoted< uint32_t > samplerate
bool schedule_erase
std::map< decltype(dx::stream::desc<>::stream::target.idx()), source_t > sources
direction::direction start_stop_order {direction::any}
struct dx::stream::desc::stream stream [max_streams]
uint32_t streams {}
 number of streams
promoted< structdesc_t::stream * >::template preference< decltype(super::preference), uint32_t > sync_reference
class dx::proxy::stream::_device::monitor * this
struct dx::stream::desc::name_id vendor
dx::stream::device::monitor version

Static Public Attributes

static constexpr bool hosted
 the transport's settings belong to another process' device: a hosted device mirrors them through its chains, it keeps no store of them

Protected Types

typedef service::request< service::stream::data< typename super_device_t::dx::stream::desc<> > > 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().

Protected Member Functions

std::string canonical (const std::string &name) const
virtual void grouped (group< device< dx::stream::desc<>, dx::preference, stream, group > > &)
 operator[](): a group just came into existence, a host wires its per-group transports here
void grouped (typename super::group< device< dx::stream::desc<>, dx::preference, stream, group > > &group) override
registry & initialize (const std::string &key, ::REGSAM rights, ::HKEY root, const char *path=nullptr)
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.

Protected Attributes

bool connected
std::list< promoted > group_server
 per-group chains, wired as each group comes into existence (grouped())
::HANDLE handle
struct { 
   cf::string   bundle_id 
   cf::string   class_name 
} kernel
class dx::service::device::promoted pipe
server pipe
io::port port
::HANDLE process

Detailed Description

template<typename desc_t = dx::stream::desc<>, typename preference_t = dx::preference, template< typename ... > typename stream_t = stream, template< typename ... > typename group_t = group>
class dx::proxy::stream::device< desc_t, preference_t, stream_t, group_t >

the bus's device as a product composes it: the _device above with this bus's own stream and group, the group's clock being the driver's

< the app's consumer group (dx::stream::engine::group) wraps this bus's own

Member Typedef Documentation

◆ desc_t

◆ event_t

the driver signals this client through it: the engine's clock and every stream's data events

◆ keys

typedef std::set<std::string> dx::registry::keys
inherited

◆ request

typedef service::request<service::stream::data<typename super_device_t::dx::stream::desc<>> > dx::service::device< dx::preference >::request
protectedinherited

◆ server

typedef pipe<request>::template server<user_client, std::weak_ptr<device> > dx::service::device< dx::preference >::server
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().

◆ source_t

◆ stream_t

◆ value_t

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
typedef desc dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::value_t
inherited

Member Enumeration Documentation

◆ type

enum dx::registry::type : ::DWORD
stronginherited

the value types this store keeps - a scalar rides as REG_DWORD/REG_QWORD rather than as a byte copy, so a value written here reads like any other in the registry editor

Member Function Documentation

◆ align() [1/2]

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
struct stream * dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::align ( struct stream * sync_reference)
inlineinherited

the given stream where it may be the sync reference, else the first one that may - what a stored reference is aligned to when the desc changed under it

◆ align() [2/2]

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
uint32_t dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::align ( uint32_t sync_reference) const
inlineinherited

◆ assign() [1/2]

void dx::registry::assign ( const self_t & self,
const value_t & value )
inlinestaticinherited

◆ assign() [2/2]

void dx::registry::assign ( const self_t & self,
const value_t & value )
inlinestaticinherited

◆ at()

registry dx::registry::at ( const self_t & self)
inlinestaticinherited

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.

◆ attach()

void dx::stream::device< dx::proxy::device< dx::preference >, dx::stream::desc<>, stream< device< dx::stream::desc<>, dx::preference, stream, group > >, group< device< dx::stream::desc<>, dx::preference, stream, group > > >::attach ( channel_t ** io[dx::stream::direction::directions][2],
const std::vector< bool >(&) channel_map[2] )
inlineinherited

◆ canonical()

std::string dx::registry::canonical ( const std::string & name) const
inlineprotectedinherited

◆ catch() [1/2]

dx::registry::catch ( ...)
inlineinherited

◆ catch() [2/2]

dx::registry::catch ( ...)
inlineinherited

◆ children()

container_t dx::registry::children ( const self_t & self)
inlinestaticnoexceptinherited

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.

◆ conclude()

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::proxy::device< dx::preference >.

◆ configuration()

unsigned char dx::proxy::stream::_device< dx::stream::desc<>, dx::preference, stream< device< dx::stream::desc<>, dx::preference, stream, group > >, group< device< dx::stream::desc<>, dx::preference, stream, group > > >::configuration ( unsigned char configuration)
inlineinherited

◆ configurations()

◆ count()

auto io::reference< ::io_registry_entry_t >::count ( ) const
inlinenoexceptinherited

◆ create() [1/2]

void dx::proxy::device< dx::preference >::create ( const char * product_id,
const ::GUID & guid,
const std::string & id,
const desc_t & desc )
inlinestaticinherited

persisted software device: PnP keeps it enumerated after the creating handle closes

◆ create() [2/2]

void dx::proxy::device< dx::preference >::create ( const char * product_id,
const ::GUID & guid,
const std::string & id,
const dx::stream::desc<> & desc )
inlinestaticinherited

persisted software device: PnP keeps it enumerated after the creating handle closes

◆ ctl() [1/2]

void dx::proxy::device< dx::preference >::ctl ( uint32_t ioctl) const
inlineinherited

◆ ctl() [2/2]

void dx::proxy::device< dx::preference >::ctl ( unsigned int ioctl) const
inlineinherited

◆ destroy()

void dx::proxy::device< dx::preference >::destroy ( const char * product_id,
const ::GUID & guid,
const std::string & id )
inlinestaticinherited

re-acquires the persisted device and binds it to the closing handle; PnP keeps the removed device's node as a phantom, uninstalled here

◆ enumerate()

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
uint32_t dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::enumerate ( const format & format = any) const
inlineinherited

enumerate typified pins

Here is the caller graph for this function:

◆ erase()

registry & dx::registry::erase ( const char * subkey = nullptr)
inlinenoexceptinherited

◆ exception() [1/2]

void dx::proxy::device< dx::preference >::exception ( const dx::exception & exception,
bool filtered = false ) const
inlineoverridenoexceptinherited

notification exception handler

◆ exception() [2/2]

void dx::proxy::device< dx::preference >::exception ( const dx::exception & exception,
bool filtered = false ) const
inlineoverridenoexceptinherited

notification exception handler

◆ fetch() [1/2]

bool dx::registry::fetch ( const self_t & self,
value_t & value )
inlinestaticinherited

a value that serializes itself into a tree node recurses through its own named children; only what has no such serialization reaches the flat position below, where a struct would become one opaque REG_BINARY of its layout

◆ fetch() [2/2]

bool dx::registry::fetch ( const self_t & self,
value_t & value )
inlinestaticinherited

a value that serializes itself into a tree node recurses through its own named children; only what has no such serialization reaches the flat position below, where a struct would become one opaque REG_BINARY of its layout

◆ find() [1/4]

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
struct stream * dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::find ( const decltype(stream::target.idx())& target)
inlineinherited

◆ find() [2/4]

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
struct stream * dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::find ( const format & format = any,
enum direction::direction direction = direction::any )
inlineinherited
Parameters
formatsearch stream format filter
directionsearch stream direction filter

◆ find() [3/4]

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
struct stream * dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::find ( const target_t & target)
inlineinherited

◆ find() [4/4]

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
struct stream * dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::find ( uint32_t & pin,
const format & format = any,
enum direction::direction direction = direction::any )
inlineinherited

finds and returns the stream description and pin idx into this stream

Returns
stream description of indexed pin, pin idx will be altered on return!
Parameters
pinin: global pin index, out: pin index into returned stream description
formatsearch stream format filter
directionsearch stream direction filter
Here is the caller graph for this function:

◆ frame()

◆ free()

virtual void dx::resource< invalid_t >::free ( )
inlinevirtualnoexceptinherited

◆ get() [1/10]

bool dx::registry::get ( value_t & value) const
inlineinherited

like get<value_t>() but returns false for ERROR_FILE_NOT_FOUND, from either RegQueryValueExA or value_of() itself; any other failure throws.

◆ get() [2/10]

value_t dx::registry::get ( ) const
inlineinherited

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.

◆ get() [3/10]

value_t io::registry::get ( ::CFStringRef key) const
inlineinherited

◆ get() [4/10]

::CFTypeRef io::registry::get ( ::CFStringRef key) const
inlineinherited

◆ get() [5/10]

value_t io::registry::get ( ::CFStringRef key,
::CFTypeRef dflt ) const
inlinenoexceptinherited

◆ get() [6/10]

::CFTypeRef io::registry::get ( ::CFStringRef key,
::CFTypeRef dflt ) const
inlinenoexceptinherited

◆ get() [7/10]

value_t io::registry::get ( ::CFStringRef key,
value_t dflt ) const
inlinenoexceptinherited

◆ get() [8/10]

value_t io::registry::get ( key_t key) const
inlineinherited

◆ get() [9/10]

::CFTypeRef io::registry::get ( key_t key) const
inlineinherited

◆ get() [10/10]

bool dx::registry::get ( value_t & value) const
inlineinherited

like get<value_t>() but returns false for ERROR_FILE_NOT_FOUND, from either RegQueryValueExA or value_of() itself; any other failure throws.

◆ grouped() [1/3]

operator[](): a group just came into existence, a host wires its per-group transports here

◆ grouped() [2/3]

◆ grouped() [3/3]

void dx::service::device< dx::preference >::grouped ( typename super::group< device< dx::stream::desc<>, dx::preference, stream, group > > & group)
inlineoverrideprotectedinherited

◆ hw_clock() [1/2]

virtual bool dx::stream::device< dx::proxy::device< dx::preference >, dx::stream::desc<>, stream< device< dx::stream::desc<>, dx::preference, stream, group > >, group< device< dx::stream::desc<>, dx::preference, stream, group > > >::hw_clock ( ) const
inlinevirtualnoexceptinherited

◆ hw_clock() [2/2]

registers this client's buffer switch event with the driver's clock domain

The driver owns the clock: it signals every registered client at that client's own iosize, so the engine's event has to be one the driver can signal. A device whose driver does not take the registration falls back to the engine's own software clock through not_implemented.

Reimplemented from dx::stream::device< dx::proxy::device< dx::preference >, dx::stream::desc<>, stream< device< dx::stream::desc<>, dx::preference, stream, group > >, group< device< dx::stream::desc<>, dx::preference, stream, group > > >.

◆ ictl() [1/6]

enable_if_ptr< rx_t > dx::proxy::device< dx::preference >::ictl ( uint32_t ioctl) const
inlineinherited

◆ ictl() [2/6]

enable_if_scalar< rx_t > dx::proxy::device< dx::preference >::ictl ( uint32_t ioctl) const
inlineinherited

◆ ictl() [3/6]

hide_if_scalar_or_ptr< rx_t > dx::proxy::device< dx::preference >::ictl ( uint32_t ioctl) const
inlineinherited

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.

◆ ictl() [4/6]

size_t dx::proxy::device< dx::preference >::ictl ( uint32_t ioctl,
rx_t & rx ) const
inlineinherited

◆ ictl() [5/6]

rx_t dx::proxy::device< dx::preference >::ictl ( unsigned int ioctl) const
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

Exceptions
n/amicrosoft does not give information about what possible errors values are provided by its OS other than
ERROR_INSUFFICIENT_BUFFERif the output buffer is too small to receive any data
Template Parameters
rx_ttype of rx_t needs to be explicitly specified as it can't be deduced

◆ ictl() [6/6]

size_t dx::proxy::device< dx::preference >::ictl ( unsigned int ioctl,
rx_t & rx ) const
inlineinherited

◆ info()

void dx::proxy::stream::_device< dx::stream::desc<>, dx::preference, stream< device< dx::stream::desc<>, dx::preference, stream, group > >, group< device< dx::stream::desc<>, dx::preference, stream, group > > >::info ( std::ostream & os)
inlineoverridevirtualnoexceptinherited

log object class information

Reimplemented from dx::proxy::device< dx::preference >.

◆ initialize() [1/5]

registry & dx::registry::initialize ( ::HKEY root,
::REGSAM rights = KEY_ALL_ACCESS )
inlineinherited

◆ initialize() [2/5]

registry & dx::registry::initialize ( ::REGSAM rights = KEY_ALL_ACCESS,
::HKEY root = HKEY_CURRENT_USER )
inlineinherited

◆ initialize() [3/5]

void dx::file::initialize ( const char * name,
::DWORD access = GENERIC_READ| GENERIC_WRITE,
::DWORD share = FILE_SHARE_READ| FILE_SHARE_WRITE )
inlineinherited

(re-)initialization the underlaying windows API is CreateFile(). for detailed information see http://msdn.microsoft.com/en-us/library/aa363858(VS.85).aspx

Exceptions
n/amicrosoft does not give information about what possible errors values are provided by its OS

◆ initialize() [4/5]

registry & dx::registry::initialize ( const std::string & key,
::HKEY root = HKEY_CURRENT_USER,
::REGSAM rights = KEY_ALL_ACCESS )
inlineinherited

◆ initialize() [5/5]

registry & dx::registry::initialize ( const std::string & key,
::REGSAM rights,
::HKEY root,
const char * path = nullptr )
inlineprotectedinherited

◆ ioctl() [1/5]

rx_t dx::proxy::device< dx::preference >::ioctl ( uint32_t ioctl,
const tx_t & tx ) const
inlineinherited

◆ ioctl() [2/5]

size_t dx::proxy::device< dx::preference >::ioctl ( uint32_t ioctl,
const tx_t & tx,
rx_t & rx ) const
inlineinherited

◆ ioctl() [3/5]

size_t dx::proxy::device< dx::preference >::ioctl ( uint32_t ioctl,
const void * tx = nullptr,
size_t tx_size = 0,
void * rx = nullptr,
size_t rx_size = 0 ) const
inlineinherited

◆ ioctl() [4/5]

rx_t dx::proxy::device< dx::preference >::ioctl ( unsigned int ioctl,
const tx_t & tx ) const
inlineinherited

◆ ioctl() [5/5]

size_t dx::proxy::device< dx::preference >::ioctl ( unsigned int ioctl,
const tx_t & tx,
rx_t & rx ) const
inlineinherited

◆ launch() [1/2]

virtual void dx::object::launch ( )
inlineprotectedvirtualinherited

launch notification: object mounted and ready to use. Called only through try_launch() - never call this directly from outside the class hierarchy.

◆ launch() [2/2]

void dx::service::device< dx::preference >::launch ( )
inlineoverrideinherited

launch notification: object mounted and ready to use. Called only through try_launch() - never call this directly from outside the class hierarchy.

◆ nested()

bool dx::registry::nested ( const self_t & self)
inlinestaticnoexceptinherited

◆ octl() [1/3]

device & dx::proxy::device< dx::preference >::octl ( uint32_t ioctl,
const tx_t & tx )
inlineinherited

◆ octl() [2/3]

device & dx::proxy::device< dx::preference >::octl ( uint32_t ioctl,
const tx_t tx )
inlineinherited

◆ octl() [3/3]

void dx::proxy::device< dx::preference >::octl ( unsigned int ioctl,
const tx_t & tx ) const
inlineinherited

◆ open() [1/2]

the desc's stream: the registered one, else created, registered and launched

◆ open() [2/2]

the desc's stream: the registered one, else created, registered and launched

◆ operator const ::io_registry_entry_t &() [1/2]

io::reference< ::io_registry_entry_t >::operator const ::io_registry_entry_t & ( ) const
inlinenoexceptinherited

auto converter into const io_object

◆ operator const ::io_registry_entry_t &() [2/2]

io::reference< ::io_registry_entry_t >::operator const ::io_registry_entry_t & ( ) const
inlinenoexceptinherited

auto converter into const io_object

◆ operator const os_event()

dx::resource< invalid_t >::operator const os_event ( ) const
inlinenoexceptinherited

◆ operator const std::string &()

dx::proxy::device< dx::preference >::operator const std::string & ( ) const
inlinenoexceptinherited

identifying device string, mirroring macOS' io::registry conversion

◆ operator os_event()

dx::resource< invalid_t >::operator os_event ( )
inlinenoexceptinherited

◆ operator uint64_t()

io::registry::operator uint64_t ( ) const
inlineexplicitinherited

◆ operator::CFMutableDictionaryRef()

io::registry::operator::CFMutableDictionaryRef ( ) const
inlineexplicitinherited

◆ operator::CFStringRef()

io::registry::operator::CFStringRef ( ) const
inlineexplicitinherited

◆ operator::HANDLE()

dx::resource< invalid_t >::operator::HANDLE ( ) const
inlinenoexceptinherited

◆ operator::HKEY()

dx::registry::operator::HKEY ( ) const
inlinenoexceptinherited

◆ operator::io_registry_entry_t &() [1/2]

io::reference< ::io_registry_entry_t >::operator ::io_registry_entry_t & ( )
inlinenoexceptinherited

auto converter into io_object

◆ operator::io_registry_entry_t &() [2/2]

io::reference< ::io_registry_entry_t >::operator ::io_registry_entry_t & ( )
inlinenoexceptinherited

auto converter into io_object

◆ operator::io_registry_entry_t *() [1/2]

io::reference< ::io_registry_entry_t >::operator ::io_registry_entry_t * ( )
inlinenoexceptinherited

auto converter into io_object pointer

◆ operator::io_registry_entry_t *() [2/2]

io::reference< ::io_registry_entry_t >::operator ::io_registry_entry_t * ( )
inlinenoexceptinherited

auto converter into io_object pointer

◆ operator==() [1/2]

bool io::reference< ::io_registry_entry_t >::operator== ( ::io_registry_entry_t io_object) const
inlinenoexceptinherited

◆ operator==() [2/2]

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
bool dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::operator== ( const desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources > & desc) const
inlineinherited

◆ operator>>() [1/2]

virtual device & dx::device< ::io_service_t, dx::preference >::operator>> ( std::ostream & ) const
inlinevirtualinherited

the device's own diagnostics, beyond dx::object::info

◆ operator>>() [2/2]

virtual device & dx::device< std::string, dx::preference >::operator>> ( std::ostream & ) const
inlinevirtualinherited

the device's own diagnostics, beyond dx::object::info

◆ operator[]() [1/4]

::CFTypeRef io::registry::operator[] ( ::CFStringRef key) const
inlineinherited

◆ operator[]() [2/4]

the stream's group, created on first use

◆ operator[]() [3/4]

::CFTypeRef io::registry::operator[] ( key_t key) const
inlineinherited

◆ operator[]() [4/4]

the stream's group, created on first use

◆ parent()

registry io::registry::parent ( ) const
inlineinherited

◆ purge()

void dx::registry::purge ( const self_t & self)
inlinestaticnoexceptinherited

◆ reset()

◆ retain()

reference & io::reference< ::io_registry_entry_t >::retain ( )
inlineinherited

◆ run()

registry & dx::registry::run ( )
inlineinherited

◆ set() [1/6]

device & dx::proxy::device< dx::preference >::set ( ::CFStringRef key,
::CFTypeRef value )
inlinenoexceptinherited

◆ set() [2/6]

device & dx::proxy::device< dx::preference >::set ( ::CFStringRef key,
value_t value )
inlineinherited

◆ set() [3/6]

device & dx::proxy::device< dx::preference >::set ( ::CFTypeRef properties)
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.

◆ set() [4/6]

registry & dx::registry::set ( ::DWORD type,
const void * value,
size_t size )
inlineinherited

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

◆ set() [5/6]

device & dx::proxy::device< dx::preference >::set ( key_t key,
::CFTypeRef value )
inlineinherited

◆ set() [6/6]

device & dx::proxy::device< dx::preference >::set ( key_t key,
value_t value )
inlineinherited

◆ size() [1/2]

size_t dx::registry::size ( ) const
inlinenoexceptinherited

subkey+value count, 0 if the key doesn't exist (key_of()'s non-throwing overload - an ordinary, expected outcome here, not a genuine error).

◆ size() [2/2]

size_t dx::registry::size ( const self_t & self)
inlinestaticnoexceptinherited

◆ sleep() [1/2]

virtual void dx::device< ::io_service_t, dx::preference >::sleep ( )
inlinevirtualinherited

notify system will sleep stub

◆ sleep() [2/2]

virtual void dx::device< std::string, dx::preference >::sleep ( )
inlinevirtualinherited

notify system will sleep stub

◆ source()

virtual std::pair< source_t &, bool > dx::stream::device< dx::proxy::device< dx::preference >, dx::stream::desc<>, stream< device< dx::stream::desc<>, dx::preference, stream, group > >, group< device< dx::stream::desc<>, dx::preference, stream, group > > >::source ( const struct dx::stream::desc<>::stream & stream)
inlinevirtualinherited

the stream's source selector, created on first use: the preference by stream target, the value an index into the stream's sources

◆ string()

◆ sync_reference() [1/2]

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
uint32_t dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::sync_reference ( struct stream * sync_reference)
inlineinherited

◆ sync_reference() [2/2]

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
struct stream * dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::sync_reference ( uint32_t sync_reference)
inlineinherited

the n-th stream qualifying as sync reference, and the twin below the index of a given one - the two directions of the preference's value

Here is the caller graph for this function:

◆ try_conclude() [1/2]

bool dx::object::try_conclude ( )
inlinenoexceptinherited

atomically conclude()s if currently launched; returns whether this call did it

◆ try_conclude() [2/2]

bool dx::object::try_conclude ( )
inlinenoexceptinherited

atomically conclude()s if currently launched; returns whether this call did it

◆ try_launch() [1/2]

bool dx::object::try_launch ( )
inlineinherited

atomically launch()es if not already launched; returns whether this call did it

◆ try_launch() [2/2]

bool dx::object::try_launch ( )
inlineinherited

atomically launch()es if not already launched; returns whether this call did it

◆ type()

type dx::registry::type ( ) const
inlinenoexceptinherited

◆ wake()

Member Data Documentation

◆ bundle_id

◆ bus

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
dx::stream::bus::bus dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::bus {}
inherited

the bus this device hangs on

◆ clients

promoted<typename super::client_map, typename super::client_map::value_t> dx::proxy::stream::_device< dx::stream::desc<>, dx::preference, stream< device< dx::stream::desc<>, dx::preference, stream, group > >, group< device< dx::stream::desc<>, dx::preference, stream, group > > >::clients
inherited

◆ clock

◆ clocks

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
uint32_t dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::clocks {}
inherited

number of independent clocks [currenlty only single clock support]

◆ clocksource

◆ connected

bool dx::proxy::device< dx::preference >::connected
protectedinherited

◆ consumer

◆ desc

◆ dflt

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
bool dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::dflt {}
inherited

can be selected as default (OS audio) device

◆ driver [1/2]

dx::driver<decltype(id), dx::preference>& dx::device< ::io_service_t, dx::preference >::driver
inherited

◆ driver [2/2]

dx::driver<decltype(id), dx::preference>& dx::device< std::string, dx::preference >::driver
inherited

◆ editable

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
bool dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::editable {}
inherited

can be edited

◆ event

◆ firmware

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
struct dx::stream::desc::firmware dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::firmware
inherited

◆ 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

◆ group_server

std::list<promoted> dx::service::device< dx::preference >::group_server
protectedinherited

per-group chains, wired as each group comes into existence (grouped())

◆ handle

::HANDLE dx::resource< invalid_t >::handle
protectedinherited

◆ hidden

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
bool dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::hidden {}
inherited

hide device

◆ hosted

the transport's settings belong to another process' device: a hosted device mirrors them through its chains, it keeps no store of them

◆ [struct]

Todo
migrate hw clock generation/distribution into a dedicated clock class

◆ icon

◆ id [1/2]

const ::io_service_t dx::device< ::io_service_t, dx::preference >::id
inherited

◆ id [2/2]

const std::string dx::device< std::string, dx::preference >::id
inherited

◆ iosize [1/2]

◆ iosize [2/2]

staging value for registration paths without their own iosize argument (macOS CF property bridge)

◆ iosize_server

◆ [struct]

struct { ... } dx::service::device< dx::preference >::kernel

◆ key

std::string dx::registry::key
inherited

◆ launched [1/2]

std::atomic<bool> dx::object::launched
inherited

◆ launched [2/2]

std::atomic<bool> dx::object::launched
inherited

◆ listen

std::deque<std::function<void()> > dx::registry::listen
inherited

◆ model

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
struct dx::stream::desc::name_id dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::model
inherited

◆ monitor

◆ mutex

◆ persistence

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
bool dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::persistence {}
inherited

device has capability to store persistent settings (i.e. sample rate; clock source; etc.)

◆ pipe [1/2]

◆ pipe [2/2]

◆ port

io::port dx::proxy::device< dx::preference >::port
protectedinherited

◆ preference [1/2]

dx::preference dx::device< ::io_service_t, dx::preference >::preference
inherited

◆ preference [2/2]

dx::preference dx::device< std::string, dx::preference >::preference
inherited

◆ process

::HANDLE dx::resource< invalid_t >::process
protectedinherited

◆ puid [1/2]

std::string dx::device< ::io_service_t, dx::preference >::puid
inherited

persistent UID - system unique - could change with location

◆ puid [2/2]

std::string dx::device< std::string, dx::preference >::puid
inherited

persistent UID - system unique - could change with location

◆ puuid [1/2]

std::string dx::device< ::io_service_t, dx::preference >::puuid
inherited

persistent universal UID - universally unique ID (i.e. serial number)

◆ puuid [2/2]

std::string dx::device< std::string, dx::preference >::puuid
inherited

persistent universal UID - universally unique ID (i.e. serial number)

◆ registrations

◆ safety_offset_server

per group: the kernel keeps the client margins of its streams

◆ samplerate

◆ schedule_erase

◆ sources

source selectors by stream target: a stream with sources gets its own on first use

◆ start_stop_order

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
direction::direction dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::start_stop_order {direction::any}
inherited

◆ stream

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
struct dx::stream::desc::stream dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::stream[max_streams]
inherited

◆ streams

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
uint32_t dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::streams {}
inherited

number of streams

◆ sync_reference

◆ this

◆ vendor

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
struct dx::stream::desc::name_id dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::vendor
inherited

◆ version


The documentation for this class was generated from the following file:

(c) copyright 2009 dynamic acoustics e.U. generated on

a closed source license may be obtained by requesting a written permission from dynamic acoustics e.U.
however - governmental use generally and military use especially is strictly prohibited though.