dxd - dynax driver framework 2.6.0d160
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::asio::client::_device< desc_t, preference_t, stream_t > Class Template Reference

ASIO client streaming device interface class. More...

#include <dx_asio_client_device.h>

+ Inheritance diagram for dx::asio::client::_device< desc_t, preference_t, stream_t >:
+ Collaboration diagram for dx::asio::client::_device< desc_t, preference_t, stream_t >:

Public Types

typedef desc_t desc_t
 

Public Member Functions

template<typename driver_t >
 _device (driver_t &driver, decltype(super::id)&id)
 the virtual stream device class constructor
 
template<typename driver_t >
 _device (driver_t &driver, decltype(super::id)&id, const desc_t &desc)
 
virtual void conclude () noexcept
 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.
 
 dx_catchall_handler (this,) void conclude() noexcept override
 
 dx_catchall_rethrow () void conclude() noexcept override
 
void exception (const dx::exception &exception, bool filtered=false) noexcept override
 notification exception handler
 
virtual uint64_t frame () const
 
virtual bool hw_clock () const noexcept
 
void hw_clock (dx::event< user > &) override
 
void info (std::ostream &os) noexcept override
 log object class information
 
void launch () override try
 launch notification: object mounted and ready to use
 
_devicereset ()
 
virtual bool start (uint64_t=0, unsigned int starting=1)
 
virtual unsigned int stop (bool force=false) noexcept
 
 ~_device () override
 

Public Attributes

promoted< typename super::client_map > clients
 
dx::event< user > * clock
 
promoted< uint32_t >::preference< preference_t > clocksource
 
std::atomic< size_t > counter
 
promoted< desc_t >::template preference< preference_t, typename desc_t::value_t > desc {this->preference}
 
dx::driver< decltype(id)> & driver
 
struct { 
 
   dx::event< user > *   clock 
 
   std::atomic< size_t >   counter 
 
   uint32_t   iosize 
 
hw 
 
const dx::guid id
 
uint32_t iosize
 
promoted< uint32_t >::preference< preference_t > iosize
 
bool launched {}
 
dx::stream::device::monitor monitor
 
std::deque< std::function< void(control &)> notify )
 
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< preference_t > safety_offset [direction::directions]
 
promoted< uint32_t >::preference< preference_t > samplerate
 
std::atomic< unsigned int > started
 
std::map< decltype(_desc_t::stream::target.idx()), std::weak_ptr< stream_t > > streams
 
promoted< uint32_t >::preference< preference_t > sync_cycle_ticks
 
promoted< structdesc_t::stream * >::template preference< preference_t, uint32_tsync_reference
 
dx::stream::device::monitor version
 

Protected Member Functions

virtual void flush ()
 
virtual void halt ()
 

Protected Attributes

::AsioDriver * asio = nullptr
 
std::recursive_mutex start_stop_in_progress
 start/stop operation in progress
 

Detailed Description

template<typename desc_t, typename preference_t, typename stream_t>
class dx::asio::client::_device< desc_t, preference_t, stream_t >

ASIO client 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::stream::control< dx::device< dx::guid > > , desc_t , preference_t, stream_t >::desc_t
inherited

Constructor & Destructor Documentation

◆ _device() [1/2]

template<typename desc_t , typename preference_t , typename stream_t >
template<typename driver_t >
dx::asio::client::_device< desc_t, preference_t, stream_t >::_device ( driver_t & driver,
decltype(super::id)& id )
inline

the virtual stream device class constructor

◆ _device() [2/2]

template<typename desc_t , typename preference_t , typename stream_t >
template<typename driver_t >
dx::asio::client::_device< desc_t, preference_t, stream_t >::_device ( driver_t & driver,
decltype(super::id)& id,
const desc_t & desc )
inline

◆ ~_device()

template<typename desc_t , typename preference_t , typename stream_t >
dx::asio::client::_device< desc_t, preference_t, stream_t >::~_device ( )
inlineoverride
+ Here is the call graph for this function:

Member Function Documentation

◆ conclude()

virtual void dx::object::conclude ( )
inlinevirtualnoexceptinherited

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.

Reimplemented in dx::proxy::stream::_device< desc_t, preference_t, stream_t >, dx::usb::pipe< device_t >, dx::usb::pipe< device_t >, dx::virtuel::stream::_device< desc_t, preference_t, stream_t >, dx::coreaudio::stream::device< desc_t, preference_t, stream_t >, dx::proxy::device, dx::map::driver< device >, and dx::map::driver< device_t >.

+ Here is the caller graph for this function:

◆ dx_catchall_handler()

dx::stream::control< dx::device< dx::guid > >::dx_catchall_handler ( this )
inlineoverridenoexceptinherited

◆ dx_catchall_rethrow()

template<typename desc_t , typename preference_t , typename stream_t >
dx::asio::client::_device< desc_t, preference_t, stream_t >::dx_catchall_rethrow ( )
inlineoverridenoexcept

◆ exception()

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

notification exception handler

Reimplemented from dx::device< dx::guid >.

+ Here is the call graph for this function:

◆ flush()

virtual void dx::stream::control< dx::device< dx::guid > >::flush ( )
inlineprotectedvirtualinherited

◆ frame()

template<typename desc_t , typename preference_t , typename stream_t >
virtual uint64_t dx::asio::client::_device< desc_t, preference_t, stream_t >::frame ( ) const
inlinevirtual
+ Here is the call graph for this function:

◆ halt()

virtual void dx::stream::control< dx::device< dx::guid > >::halt ( )
inlineprotectedvirtualinherited

◆ hw_clock() [1/2]

virtual bool dx::stream::device< dx::stream::control< dx::device< dx::guid > > , desc_t , preference_t, stream_t >::hw_clock ( ) const
inlinevirtualnoexceptinherited

◆ hw_clock() [2/2]

template<typename desc_t , typename preference_t , typename stream_t >
void dx::asio::client::_device< desc_t, preference_t, stream_t >::hw_clock ( dx::event< user > & )
inlineoverridevirtual

◆ info()

template<typename desc_t , typename preference_t , typename stream_t >
void dx::asio::client::_device< desc_t, preference_t, stream_t >::info ( std::ostream & os)
inlineoverridevirtualnoexcept

log object class information

Reimplemented from dx::stream::device< dx::stream::control< dx::device< dx::guid > >, desc_t, preference_t, stream_t >.

+ Here is the call graph for this function:

◆ launch()

template<typename desc_t , typename preference_t , typename stream_t >
void dx::asio::client::_device< desc_t, preference_t, stream_t >::launch ( )
inlineoverridevirtual

launch notification: object mounted and ready to use

Reimplemented from dx::object.

+ Here is the call graph for this function:

◆ reset()

template<typename desc_t , typename preference_t , typename stream_t >
_device & dx::asio::client::_device< desc_t, preference_t, stream_t >::reset ( )
inline

◆ start()

virtual bool dx::stream::control< dx::device< dx::guid > >::start ( uint64_t = 0,
unsigned int starting = 1 )
inlinevirtualinherited

result indicates if start changed the state.

◆ stop()

virtual unsigned int dx::stream::control< dx::device< dx::guid > >::stop ( bool force = false)
inlinevirtualnoexceptinherited

result indicates the amount of stopped start references

Member Data Documentation

◆ asio

template<typename desc_t , typename preference_t , typename stream_t >
::AsioDriver* dx::asio::client::_device< desc_t, preference_t, stream_t >::asio = nullptr
protected

◆ clients

template<typename desc_t , typename preference_t , typename stream_t >
promoted<typename super::client_map> dx::asio::client::_device< desc_t, preference_t, stream_t >::clients
Initial value:
{
[this](dx::promoted<typename super::client_map>::lock_t&& lock, const typename super::client_map& value){
dx::promoted<uint32_t>::lock_t tmp(std::move(lock));
clients.commit(std::move(tmp), value);
}}
promoted< typename super::client_map > clients
Definition dx_asio_client_device.h:218
void commit(lock_t &&lock, const value_t &value) try
Definition dx_value.h:161
bool transient
\ indicate the value has been initialized
Definition dx_value.h:71
std::unique_lock< mutex_t > lock_t
Definition dx_value.h:68

◆ clock

dx::event<user>* dx::stream::device< dx::stream::control< dx::device< dx::guid > > , desc_t , preference_t, stream_t >::clock
inherited

◆ clocksource

promoted<uint32_t>::preference<preference_t> dx::stream::device< dx::stream::control< dx::device< dx::guid > > , desc_t , preference_t, stream_t >::clocksource
inherited

◆ counter

std::atomic<size_t> dx::stream::device< dx::stream::control< dx::device< dx::guid > > , desc_t , preference_t, stream_t >::counter
inherited

◆ desc

template<typename desc_t , typename preference_t , typename stream_t >
promoted<desc_t>::template preference<preference_t, typename desc_t::value_t> dx::asio::client::_device< desc_t, preference_t, stream_t >::desc {this->preference}

◆ driver

dx::driver<decltype(id)>& dx::device< dx::guid >::driver
inherited

◆ [struct]

struct { ... } dx::stream::device< dx::stream::control< dx::device< dx::guid > > , desc_t , preference_t, stream_t >::hw

◆ id

const dx::guid dx::device< dx::guid >::id
inherited

◆ iosize [1/2]

uint32_t dx::stream::device< dx::stream::control< dx::device< dx::guid > > , desc_t , preference_t, stream_t >::iosize
inherited

◆ iosize [2/2]

promoted<uint32_t>::preference<preference_t> dx::stream::device< dx::stream::control< dx::device< dx::guid > > , desc_t , preference_t, stream_t >::iosize
inherited

◆ launched

bool dx::object::launched {}
inherited

◆ monitor

dx::stream::device::monitor dx::stream::device< dx::stream::control< dx::device< dx::guid > > , desc_t , preference_t, stream_t >::monitor
inherited

◆ notify

std::deque<std::function<void(control&)> dx::stream::control< dx::device< dx::guid > >::notify)
inherited

◆ preference

preference_t dx::stream::device< dx::stream::control< dx::device< dx::guid > > , desc_t , preference_t, stream_t >::preference
inherited

◆ puid

std::string dx::device< dx::guid >::puid
inherited

persistent UID - system unique - could change with location

◆ puuid

std::string dx::device< dx::guid >::puuid
inherited

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

◆ safety_offset

promoted<uint32_t>::preference<preference_t> dx::stream::device< dx::stream::control< dx::device< dx::guid > > , desc_t , preference_t, stream_t >::safety_offset[direction::directions]
inherited

◆ samplerate

promoted<uint32_t>::preference<preference_t> dx::stream::device< dx::stream::control< dx::device< dx::guid > > , desc_t , preference_t, stream_t >::samplerate
inherited

◆ start_stop_in_progress

std::recursive_mutex dx::stream::control< dx::device< dx::guid > >::start_stop_in_progress
protectedinherited

start/stop operation in progress

◆ started

std::atomic<unsigned int> dx::stream::control< dx::device< dx::guid > >::started
inherited

◆ streams

std::map<decltype(_desc_t::stream::target.idx()), std::weak_ptr<stream_t> > dx::stream::device< dx::stream::control< dx::device< dx::guid > > , desc_t , preference_t, stream_t >::streams
inherited

◆ sync_cycle_ticks

promoted<uint32_t>::preference<preference_t> dx::stream::device< dx::stream::control< dx::device< dx::guid > > , desc_t , preference_t, stream_t >::sync_cycle_ticks
inherited

◆ sync_reference

promoted<structdesc_t::stream*>::template preference<preference_t, uint32_t> dx::stream::device< dx::stream::control< dx::device< dx::guid > > , desc_t , preference_t, stream_t >::sync_reference
inherited

◆ version

dx::stream::device::monitor dx::stream::device< dx::stream::control< dx::device< dx::guid > > , desc_t , preference_t, stream_t >::version
inherited

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

(c) copyright 2009 dynamic acoustics e.U. generated on Mon Sep 8 2025

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.