dxd - dynax driver framework 3.0.0d222
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::virtuel::stream::_device< desc_t, preference_t, stream_t, group_t > Class Template Reference

virtual streaming device interface class More...

#include <dx_virtual_stream_device.h>

Inheritance diagram for dx::virtuel::stream::_device< desc_t, preference_t, stream_t, group_t >:
Collaboration diagram for dx::virtuel::stream::_device< desc_t, preference_t, stream_t, group_t >:

Public Types

typedef desc_t desc_t
typedef shared::event event
typedef event event_t
typedef std::conditional_t< std::is_void_v< group_t >, dx::stream::group< device >, group_tgroup_t
 bus devices driving their groups' tick pass their own group type
typedef promoted< uint32_t >::template preference< decltype(dx::device< std::string, preference_t >::preference)> source_t
typedef stream_t stream_t

Public Member Functions

DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN DX_PRAGMA_IGNORE_RETURN_VALUE_END _device (decltype(super::driver)&driver, decltype(super::id)&id, const desc_t &desc, const std::pair< std::string, std::string > &identity={})
 _device (decltype(super::driver)&driver, decltype(super::id)&id, const std::pair< std::string, std::string > &identity={})
 the virtual stream device class constructor
void attach (channel_t **io[dx::stream::direction::directions][2], const std::vector< bool >(&channel_map)[2])
DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN DX_PRAGMA_IGNORE_RETURN_VALUE_END void conclude () noexcept override
 ends every group's session before the device's resources go; the start counts stay with their holders
 dx_catchall_handler (this,) protected
 operator[](): a group just came into existence, a host wires its per-group transports here
void exception (const dx::exception &exception, bool filtered=false) const noexcept override
 notification exception handler
virtual uint64_t frame () const
virtual bool hw_clock () const noexcept
virtual void hw_clock (abstract::event *hw_clock, uint32_t iosize)
DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN DX_PRAGMA_IGNORE_RETURN_VALUE_END void info (std::ostream &os) noexcept override
 log object class information
virtual deviceoperator>> (std::ostream &) const
group_toperator[] (const typename desc_t::stream::desc &stream)
 the stream's group, created on first use
_devicereset ()
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
virtual std::string string (uint8_t) const
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

Public Attributes

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
promoted< uint32_t >::preference< decltype(super::preference)> clocksource
promoted< desc_t >::template preference< preference_t, typename desc_t::value_t > desc
dx::driver< decltype(id), preference_t > & driver
std::map< decltype(desc_t::stream::group), group_tgroup
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)
promoted< uint32_t >::preference< decltype(super::preference)> samplerate
std::map< decltype(desc_t::stream::target.idx()), source_tsources
promoted< structdesc_t::stream * >::template preference< decltype(super::preference), uint32_tsync_reference
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 Member Functions

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.

Detailed Description

template<typename desc_t, typename preference_t, typename stream_t, typename group_t>
class dx::virtuel::stream::_device< desc_t, preference_t, stream_t, group_t >

virtual streaming device interface class

Exceptions
Incase of an error returned by the underlaying API the device class throws a dx::exception.

Member Typedef Documentation

◆ desc_t

typedef desc_t dx::stream::device< dx::device< std::string, preference_t >, desc_t, stream_t, group_t >::desc_t
inherited

◆ event

template<typename desc_t, typename preference_t, typename stream_t, typename group_t>
typedef shared::event dx::virtuel::stream::_device< desc_t, preference_t, stream_t, group_t >::event

◆ event_t

typedef event dx::stream::device< dx::device< std::string, preference_t >, desc_t, stream_t, group_t >::event_t
inherited

◆ group_t

typedef std::conditional_t<std::is_void_v<group_t>, dx::stream::group<device>, group_t> dx::stream::device< dx::device< std::string, preference_t >, desc_t, stream_t, group_t >::group_t
inherited

bus devices driving their groups' tick pass their own group type

◆ source_t

typedef promoted<uint32_t>::template preference<decltype(dx::device< std::string, preference_t >::preference)> dx::stream::device< dx::device< std::string, preference_t >, desc_t, stream_t, group_t >::source_t
inherited

◆ stream_t

typedef stream_t dx::stream::device< dx::device< std::string, preference_t >, desc_t, stream_t, group_t >::stream_t
inherited

Constructor & Destructor Documentation

◆ _device() [1/2]

template<typename desc_t, typename preference_t, typename stream_t, typename group_t>
dx::virtuel::stream::_device< desc_t, preference_t, stream_t, group_t >::_device ( decltype(super::driver)& driver,
decltype(super::id)& id,
const std::pair< std::string, std::string > & identity = {} )
inline

the virtual stream device class constructor

◆ _device() [2/2]

template<typename desc_t, typename preference_t, typename stream_t, typename group_t>
DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN DX_PRAGMA_IGNORE_RETURN_VALUE_END dx::virtuel::stream::_device< desc_t, preference_t, stream_t, group_t >::_device ( decltype(super::driver)& driver,
decltype(super::id)& id,
const desc_t & desc,
const std::pair< std::string, std::string > & identity = {} )
inline

◆ ~_device()

template<typename desc_t, typename preference_t, typename stream_t, typename group_t>
dx::virtuel::stream::_device< desc_t, preference_t, stream_t, group_t >::~_device ( )
inlineoverride

Member Function Documentation

◆ attach()

void dx::stream::device< dx::device< std::string, preference_t >, desc_t, stream_t, group_t >::attach ( channel_t ** io[dx::stream::direction::directions][2],
const std::vector< bool >(&) channel_map[2] )
inlineinherited

◆ conclude()

template<typename desc_t, typename preference_t, typename stream_t, typename group_t>
DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN DX_PRAGMA_IGNORE_RETURN_VALUE_END void dx::virtuel::stream::_device< desc_t, preference_t, stream_t, group_t >::conclude ( )
inlineoverridevirtualnoexcept

ends every group's session before the device's resources go; the start counts stay with their holders

Reimplemented from dx::stream::device< dx::device< std::string, preference_t >, desc_t, stream_t, group_t >.

Here is the caller graph for this function:

◆ dx_catchall_handler()

dx::stream::device< dx::device< std::string, preference_t >, desc_t, stream_t, group_t >::dx_catchall_handler ( this )
inlineinherited

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

◆ exception()

template<typename desc_t, typename preference_t, typename stream_t, typename group_t>
void dx::virtuel::stream::_device< desc_t, preference_t, stream_t, group_t >::exception ( const dx::exception & exception,
bool filtered = false ) const
inlineoverridevirtualnoexcept

notification exception handler

Reimplemented from dx::device< std::string, preference_t >.

◆ frame()

template<typename desc_t, typename preference_t, typename stream_t, typename group_t>
virtual uint64_t dx::virtuel::stream::_device< desc_t, preference_t, stream_t, group_t >::frame ( ) const
inlinevirtual

◆ hw_clock() [1/2]

virtual bool dx::stream::device< dx::device< std::string, preference_t >, desc_t, stream_t, group_t >::hw_clock ( ) const
inlinevirtualnoexceptinherited
Here is the caller graph for this function:

◆ hw_clock() [2/2]

◆ info()

template<typename desc_t, typename preference_t, typename stream_t, typename group_t>
DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN DX_PRAGMA_IGNORE_RETURN_VALUE_END void dx::virtuel::stream::_device< desc_t, preference_t, stream_t, group_t >::info ( std::ostream & os)
inlineoverridevirtualnoexcept

◆ launch()

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.

◆ operator>>()

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

◆ operator[]()

group_t & dx::stream::device< dx::device< std::string, preference_t >, desc_t, stream_t, group_t >::operator[] ( const typename desc_t::stream::desc & stream)
inlineinherited

the stream's group, created on first use

◆ reset()

template<typename desc_t, typename preference_t, typename stream_t, typename group_t>
_device & dx::virtuel::stream::_device< desc_t, preference_t, stream_t, group_t >::reset ( )
inline

◆ sleep()

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

notify system will sleep stub

◆ source()

virtual std::pair< source_t &, bool > dx::stream::device< dx::device< std::string, preference_t >, desc_t, stream_t, group_t >::source ( const struct desc_t::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()

template<typename desc_t, typename preference_t, typename stream_t, typename group_t>
virtual std::string dx::virtuel::stream::_device< desc_t, preference_t, stream_t, group_t >::string ( uint8_t ) const
inlinevirtual

◆ try_conclude()

bool dx::object::try_conclude ( )
inlinenoexceptinherited

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

◆ try_launch()

bool dx::object::try_launch ( )
inlineinherited

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

◆ wake()

void dx::stream::device< dx::device< std::string, preference_t >, desc_t, stream_t, group_t >::wake ( )
inlineoverridevirtualinherited

Member Data Documentation

◆ clients

template<typename desc_t, typename preference_t, typename stream_t, typename group_t>
promoted<typename super::client_map> dx::virtuel::stream::_device< desc_t, preference_t, stream_t, group_t >::clients
Initial value:
{
[this](dx::promoted<typename super::client_map>::lock_t&& lock, const typename super::client_map& value, const typename super::client_map&){
dx::promoted<uint32_t>::lock_t tmp{std::move(lock)};
if(clients.transient)
clients.commit(std::move(tmp), value);
}}
Definition dx_device.h:57
std::unique_lock< mutex_t > lock_t
Definition dx_value.h:75
promoted< typename super::client_map > clients
Definition dx_virtual_stream_device.h:61

◆ clock

dx::shared::guard<std::map<abstract::event*, dx::stream::clock::consumer> > dx::stream::device< dx::device< std::string, preference_t >, desc_t, stream_t, group_t >::clock
inherited

event -> its own iosize and sample counter

◆ clocksource

promoted<uint32_t>::preference<decltype(super::preference)> dx::stream::device< dx::device< std::string, preference_t >, desc_t, stream_t, group_t >::clocksource
inherited

◆ desc

template<typename desc_t, typename preference_t, typename stream_t, typename group_t>
promoted<desc_t>::template preference<preference_t, typename desc_t::value_t> dx::virtuel::stream::_device< desc_t, preference_t, stream_t, group_t >::desc
Initial value:
{
this->preference,
{[this](const typename desc_t::value_t& desc){static_cast<desc_t&>(*this)= desc;}}}
preference_t preference
Definition dx_device.h:55
promoted< desc_t >::template preference< preference_t, typename desc_t::value_t > desc
Definition dx_virtual_stream_device.h:58

◆ driver

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

◆ group

std::map<decltype(desc_t::stream::group), group_t> dx::stream::device< dx::device< std::string, preference_t >, desc_t, stream_t, group_t >::group
inherited

streaming groups by desc::stream::group id: every stream of this device is registered with its group

◆ hosted

bool dx::stream::device< dx::device< std::string, preference_t >, desc_t, stream_t, group_t >::hosted
staticconstexprinherited

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

◆ [struct]

struct { ... } dx::stream::device< dx::device< std::string, preference_t >, desc_t, stream_t, group_t >::hw
Todo
migrate hw clock generation/distribution into a dedicated clock class

◆ icon

promoted<std::string>::preference<decltype(super::preference)> dx::stream::device< dx::device< std::string, preference_t >, desc_t, stream_t, group_t >::icon
inherited

◆ id

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

◆ iosize [1/2]

promoted<uint32_t>::preference<decltype(super::preference)> dx::stream::device< dx::device< std::string, preference_t >, desc_t, stream_t, group_t >::iosize
inherited

◆ iosize [2/2]

uint32_t dx::stream::device< dx::device< std::string, preference_t >, desc_t, stream_t, group_t >::iosize
inherited

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

◆ launched

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

◆ monitor

dx::stream::device::monitor dx::stream::device< dx::device< std::string, preference_t >, desc_t, stream_t, group_t >::monitor
inherited

◆ preference

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

◆ puid

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

persistent UID - system unique - could change with location

◆ puuid

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

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

◆ samplerate

promoted<uint32_t>::preference<decltype(super::preference)> dx::stream::device< dx::device< std::string, preference_t >, desc_t, stream_t, group_t >::samplerate
inherited

◆ sources

std::map<decltype(desc_t::stream::target.idx()), source_t> dx::stream::device< dx::device< std::string, preference_t >, desc_t, stream_t, group_t >::sources
inherited

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

◆ sync_reference

promoted<structdesc_t::stream*>::template preference<decltype(super::preference), uint32_t> dx::stream::device< dx::device< std::string, preference_t >, desc_t, stream_t, group_t >::sync_reference
inherited

◆ version

dx::stream::device::monitor dx::stream::device< dx::device< std::string, preference_t >, desc_t, stream_t, group_t >::version
inherited

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.