dxd - dynax driver framework 2.2.0d91
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::virtuel::stream::_device< desc_t, stream_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, stream_t >:
+ Collaboration diagram for dx::virtuel::stream::_device< desc_t, stream_t >:

Public Types

typedef desc_t desc
 

Public Member Functions

 _device (decltype(super::driver)&driver, decltype(super::id)&id)
 the virtual stream device class constructor
 
 _device (decltype(super::driver)&driver, decltype(super::id)&id, const desc_t &desc)
 
 catch (...)
 
 catch (const dx::exception &__dx_exception)
 
 catch (const std::exception &__std_exception)
 
virtual uint32_t clocksource ()
 
virtual uint32_t clocksource (uint32_t clocksource) try
 
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
 
void exception (const dx::exception &exception, bool filtered=false) const noexcept override
 notification exception handler
 
virtual uint64_t frame () const
 
void info (std::ostream &os) noexcept override
 log object class information
 
virtual int32_t iosize () const try
 
virtual int32_t iosize (uint32_t iosize) try
 
int32_t iosize (uint32_t, dx::event< user > &) override try
 
virtual void launch ()
 launch notification: object mounted and ready to use
 
virtual bool monitor () noexcept
 
monitor_t * monitor (bool force=false)
 
virtual devicereset ()
 
virtual uint32_t safety_offset (dx::stream::direction::direction direction) const try
 obtain persistent number of rx safety offset ticks - defaults to stream desc config setting
 
virtual uint32_t safety_offset (dx::stream::direction::direction direction, uint32_t safety_offset) try
 set persistent number of rx/tx safety offset ticks
 
template<typename observer_t = uint32_t>
observer_t * samplerate () const
 
virtual uint32_t samplerate (uint32_t samplerate) try
 
virtual bool start (uint64_t=0, unsigned int starting=1)
 
virtual unsigned int stop (bool force=false) noexcept
 
virtual uint32_t sync_cycle_ticks () const try
 obtain persistent number of ticks per sync cycle - defaults to sync_cycle.hw_min_ticks with an absolute minimum of 2 ticks
 
virtual int32_t sync_reference () const try
 
virtual int32_t sync_reference (uint32_t sync_reference) try
 
 ~_device () override
 

Public Attributes

dx::event< user > * clock
 
std::atomic< size_t > counter
 
dx::driver< decltype(id)> & driver
 
struct { 
 
   dx::event< user > *   clock 
 
   std::atomic< size_t >   counter 
 
   uint32_t   iosize 
 
hw 
 
const std::string id
 
uint32_t iosize
 
bool launched {}
 
std::deque< std::function< void(control &)> notify )
 
decltype(driver.preference) preference
 
std::string puid
 persistent UID (i.e. serial number)
 
std::string puuid
 persistent universal UID
 
shared::memory< dx::stream::clock::monitorshared_monitor
 
std::atomic< unsigned int > started
 
std::map< decltype(desc_t::stream::target.idx()), std::weak_ptr< stream_t > > streams
 
uint32_t version
 

Protected Member Functions

virtual void halt ()
 

Protected Attributes

std::recursive_mutex start_stop_in_progress
 start/stop operation in progress
 

Detailed Description

template<typename desc_t, typename stream_t>
class dx::virtuel::stream::_device< desc_t, stream_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

typedef desc_t dx::stream::device< dx::stream::control< dx::device< std::string > > , desc_t, stream_t >::desc
inherited

Constructor & Destructor Documentation

◆ _device() [1/2]

template<typename desc_t , typename stream_t >
dx::virtuel::stream::_device< desc_t, stream_t >::_device ( decltype(super::driver)& driver,
decltype(super::id)& id )
inline

the virtual stream device class constructor

◆ _device() [2/2]

template<typename desc_t , typename stream_t >
dx::virtuel::stream::_device< desc_t, stream_t >::_device ( decltype(super::driver)& driver,
decltype(super::id)& id,
const desc_t & desc )
inline

◆ ~_device()

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

Member Function Documentation

◆ catch() [1/3]

template<typename desc_t , typename stream_t >
dx::virtuel::stream::_device< desc_t, stream_t >::catch ( ...)
inline

◆ catch() [2/3]

template<typename desc_t , typename stream_t >
dx::virtuel::stream::_device< desc_t, stream_t >::catch ( const dx::exception & __dx_exception)
inline

◆ catch() [3/3]

template<typename desc_t , typename stream_t >
dx::virtuel::stream::_device< desc_t, stream_t >::catch ( const std::exception & __std_exception)
inline

◆ clocksource() [1/2]

virtual uint32_t dx::stream::device< dx::stream::control< dx::device< std::string > > , desc_t, stream_t >::clocksource ( )
inlinevirtualinherited

◆ clocksource() [2/2]

virtual uint32_t dx::stream::device< dx::stream::control< dx::device< std::string > > , desc_t, stream_t >::clocksource ( uint32_t clocksource)
inlinevirtualinherited

◆ 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, stream_t >, dx::usb::pipe< device_t >, dx::usb::pipe< device_t >, dx::proxy::device, 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< std::string > >::dx_catchall_handler ( this )
inlineoverridenoexceptinherited

◆ exception()

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

notification exception handler

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

+ Here is the call graph for this function:

◆ frame()

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

◆ halt()

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

◆ info()

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

log object class information

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

+ Here is the call graph for this function:

◆ iosize() [1/3]

virtual int32_t dx::stream::device< dx::stream::control< dx::device< std::string > > , desc_t, stream_t >::iosize ( ) const
inlinevirtualinherited

<

Todo
stream::device calculate default iosize from desc

◆ iosize() [2/3]

virtual int32_t dx::stream::device< dx::stream::control< dx::device< std::string > > , desc_t, stream_t >::iosize ( uint32_t iosize)
inlinevirtualinherited

◆ iosize() [3/3]

template<typename desc_t , typename stream_t >
int32_t dx::virtuel::stream::_device< desc_t, stream_t >::iosize ( uint32_t ,
dx::event< user > &  )
inlineoverridevirtual

◆ launch()

◆ monitor() [1/2]

virtual bool dx::stream::device< dx::stream::control< dx::device< std::string > > , desc_t, stream_t >::monitor ( )
inlinevirtualnoexceptinherited

◆ monitor() [2/2]

monitor_t * dx::stream::device< dx::stream::control< dx::device< std::string > > , desc_t, stream_t >::monitor ( bool force = false)
inlineinherited

◆ reset()

virtual device & dx::stream::device< dx::stream::control< dx::device< std::string > > , desc_t, stream_t >::reset ( )
inlinevirtualinherited

◆ safety_offset() [1/2]

virtual uint32_t dx::stream::device< dx::stream::control< dx::device< std::string > > , desc_t, stream_t >::safety_offset ( dx::stream::direction::direction direction) const
inlinevirtualinherited

obtain persistent number of rx safety offset ticks - defaults to stream desc config setting

◆ safety_offset() [2/2]

virtual uint32_t dx::stream::device< dx::stream::control< dx::device< std::string > > , desc_t, stream_t >::safety_offset ( dx::stream::direction::direction direction,
uint32_t safety_offset )
inlinevirtualinherited

set persistent number of rx/tx safety offset ticks

◆ samplerate() [1/2]

template<typename desc_t , typename stream_t >
template<typename observer_t = uint32_t>
observer_t * dx::virtuel::stream::_device< desc_t, stream_t >::samplerate ( ) const
inlinevirtual

◆ samplerate() [2/2]

virtual uint32_t dx::stream::device< dx::stream::control< dx::device< std::string > > , desc_t, stream_t >::samplerate ( uint32_t samplerate)
inlinevirtualinherited

◆ start()

virtual bool dx::stream::control< dx::device< std::string > >::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< std::string > >::stop ( bool force = false)
inlinevirtualnoexceptinherited

result indicates the amount of stopped start references

◆ sync_cycle_ticks()

virtual uint32_t dx::stream::device< dx::stream::control< dx::device< std::string > > , desc_t, stream_t >::sync_cycle_ticks ( ) const
inlinevirtualinherited

obtain persistent number of ticks per sync cycle - defaults to sync_cycle.hw_min_ticks with an absolute minimum of 2 ticks

◆ sync_reference() [1/2]

virtual int32_t dx::stream::device< dx::stream::control< dx::device< std::string > > , desc_t, stream_t >::sync_reference ( ) const
inlinevirtualinherited

◆ sync_reference() [2/2]

virtual int32_t dx::stream::device< dx::stream::control< dx::device< std::string > > , desc_t, stream_t >::sync_reference ( uint32_t sync_reference)
inlinevirtualinherited

Member Data Documentation

◆ clock

dx::event<user>* dx::stream::device< dx::stream::control< dx::device< std::string > > , desc_t, stream_t >::clock
inherited

◆ counter

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

◆ driver

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

◆ [struct]

struct { ... } dx::stream::device< dx::stream::control< dx::device< std::string > > , desc_t, stream_t >::hw

◆ id

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

◆ iosize

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

◆ launched

bool dx::object::launched {}
inherited

◆ notify

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

◆ preference

decltype(driver.preference) dx::device< std::string >::preference
inherited

◆ puid

std::string dx::stream::device< dx::stream::control< dx::device< std::string > > , desc_t, stream_t >::puid
inherited

persistent UID (i.e. serial number)

◆ puuid

std::string dx::stream::device< dx::stream::control< dx::device< std::string > > , desc_t, stream_t >::puuid
inherited

persistent universal UID

◆ shared_monitor

shared::memory<dx::stream::clock::monitor> dx::stream::device< dx::stream::control< dx::device< std::string > > , desc_t, stream_t >::shared_monitor
inherited

◆ start_stop_in_progress

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

start/stop operation in progress

◆ started

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

◆ streams

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

◆ version

uint32_t dx::device< std::string >::version
inherited

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

(c) copyright 2009 dynamic acoustics e.U. generated on Tue Mar 11 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.