dxd - dynax driver framework 2.1.0d71
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::stream::pin< _desc_t, _circular_t, _device_t > Class Template Reference

generic streaming pin class More...

#include <dx_stream_device.h>

+ Inheritance diagram for dx::stream::pin< _desc_t, _circular_t, _device_t >:
+ Collaboration diagram for dx::stream::pin< _desc_t, _circular_t, _device_t >:

Public Types

typedef _circular_t circular_t
 
typedef _desc_t desc_t
 
typedef _device_t device_t
 

Public Member Functions

pinabort ()
 
template<unsigned int channels, typename channel_t >
void attach (channel_t **io[2], uint64_t channel_map[(channels+63)/64]) try
 kernel streaming channel creator
 
 catch (std::system_error &exception)
 
 catch (std::system_error &exception)
 
 catch (std::system_error &exception)
 
 catch (std::system_error &exception)
 
pinclear ()
 
 dx_catchall_rethrow () pin &wait()
 
 dx_catchall_rethrow () void flush() noexcept
 
 dx_catchall_rethrow () void launch()
 
virtual void launch ()
 
 operator circular_t * () const noexcept
 
 operator os_event () noexcept
 
circular_toperator-> () const noexcept
 
bool operator== (const device_t &test) const
 
 pin (device_t &device, const bus_t &bus, const typename desc_t::stream::pin::desc &desc={})
 generic pin constructor
 
eventreset (uint64_t count=0) try
 
uint32_t samplerate () const noexcept
 
void signal () try
 signal data available
 
eventsignal (uint64_t count=1) try
 
uint64_t signalled () const
 
virtual void start () try
 
virtual void stop (bool force=false) try
 
eventwait (bool reset=false) try
 
template<typename rep_t , typename period_t >
bool wait (const std::chrono::duration< rep_t, period_t > &timeout, bool reset=false) try
 
virtual ~pin () noexcept
 closes the pin
 

Public Attributes

channel::controlcontrol = nullptr
 
const struct desc_t::stream & stream
 

Protected Types

typedef decltype(_desc_t::stream::target) bus_t
 

Protected Attributes

std::atomic< int > started {}
 

Detailed Description

template<typename _desc_t, typename _circular_t = dx::circular, typename _device_t = dx::stream::device<_desc_t>>
class dx::stream::pin< _desc_t, _circular_t, _device_t >

generic streaming pin class

example:

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

Member Typedef Documentation

◆ bus_t

template<typename _desc_t , typename _circular_t = dx::circular, typename _device_t = dx::stream::device<_desc_t>>
typedef decltype(_desc_t::stream::target) dx::stream::pin< _desc_t, _circular_t, _device_t >::bus_t
protected

◆ circular_t

template<typename _desc_t , typename _circular_t = dx::circular, typename _device_t = dx::stream::device<_desc_t>>
typedef _circular_t dx::stream::pin< _desc_t, _circular_t, _device_t >::circular_t

◆ desc_t

template<typename _desc_t , typename _circular_t = dx::circular, typename _device_t = dx::stream::device<_desc_t>>
typedef _desc_t dx::stream::pin< _desc_t, _circular_t, _device_t >::desc_t

◆ device_t

template<typename _desc_t , typename _circular_t = dx::circular, typename _device_t = dx::stream::device<_desc_t>>
typedef _device_t dx::stream::pin< _desc_t, _circular_t, _device_t >::device_t

Constructor & Destructor Documentation

◆ pin()

template<typename _desc_t , typename _circular_t = dx::circular, typename _device_t = dx::stream::device<_desc_t>>
dx::stream::pin< _desc_t, _circular_t, _device_t >::pin ( device_t & device,
const bus_t & bus,
const typename desc_t::stream::pin< _desc_t, _circular_t, _device_t >::desc & desc = {} )
inline

generic pin constructor

Exceptions
n/a

◆ ~pin()

template<typename _desc_t , typename _circular_t = dx::circular, typename _device_t = dx::stream::device<_desc_t>>
virtual dx::stream::pin< _desc_t, _circular_t, _device_t >::~pin ( )
inlinevirtualnoexcept

closes the pin

+ Here is the call graph for this function:

Member Function Documentation

◆ abort()

template<typename _desc_t , typename _circular_t = dx::circular, typename _device_t = dx::stream::device<_desc_t>>
pin & dx::stream::pin< _desc_t, _circular_t, _device_t >::abort ( )
inline
+ Here is the call graph for this function:

◆ attach()

template<typename _desc_t , typename _circular_t = dx::circular, typename _device_t = dx::stream::device<_desc_t>>
template<unsigned int channels, typename channel_t >
void dx::stream::pin< _desc_t, _circular_t, _device_t >::attach ( channel_t ** io[2],
uint64_t channel_map[(channels+63)/64] )
inline

kernel streaming channel creator

+ Here is the call graph for this function:

◆ catch() [1/4]

dx::event< user >::catch ( std::system_error & exception)
inlineinherited

◆ catch() [2/4]

dx::event< user >::catch ( std::system_error & exception)
inlineinherited

◆ catch() [3/4]

dx::event< user >::catch ( std::system_error & exception)
inlineinherited

◆ catch() [4/4]

dx::event< user >::catch ( std::system_error & exception)
inlineinherited

◆ clear()

template<typename _desc_t , typename _circular_t = dx::circular, typename _device_t = dx::stream::device<_desc_t>>
pin & dx::stream::pin< _desc_t, _circular_t, _device_t >::clear ( )
inline
+ Here is the call graph for this function:

◆ dx_catchall_rethrow() [1/3]

template<typename _desc_t , typename _circular_t = dx::circular, typename _device_t = dx::stream::device<_desc_t>>
dx::stream::pin< _desc_t, _circular_t, _device_t >::dx_catchall_rethrow ( ) &
inline

◆ dx_catchall_rethrow() [2/3]

template<typename _desc_t , typename _circular_t = dx::circular, typename _device_t = dx::stream::device<_desc_t>>
dx::stream::pin< _desc_t, _circular_t, _device_t >::dx_catchall_rethrow ( )
inlinenoexcept

◆ dx_catchall_rethrow() [3/3]

template<typename _desc_t , typename _circular_t = dx::circular, typename _device_t = dx::stream::device<_desc_t>>
dx::stream::pin< _desc_t, _circular_t, _device_t >::dx_catchall_rethrow ( )
inline

◆ launch()

virtual void dx::event< kernel >::launch ( )
inlinevirtualinherited

The default implementation is based on event<user> which is signalled when triggered via launch() from kernel. This is to achieve compatibility with Windows events. Its probably more adequate to overwrite launch() and do the work here if feasible.

◆ operator circular_t *()

template<typename _desc_t , typename _circular_t = dx::circular, typename _device_t = dx::stream::device<_desc_t>>
dx::stream::pin< _desc_t, _circular_t, _device_t >::operator circular_t * ( ) const
inlinenoexcept

◆ operator os_event()

dx::event< kernel >::operator os_event ( )
inlinenoexceptinherited

◆ operator->()

template<typename _desc_t , typename _circular_t = dx::circular, typename _device_t = dx::stream::device<_desc_t>>
circular_t * dx::stream::pin< _desc_t, _circular_t, _device_t >::operator-> ( ) const
inlinenoexcept

◆ operator==()

template<typename _desc_t , typename _circular_t = dx::circular, typename _device_t = dx::stream::device<_desc_t>>
bool dx::stream::pin< _desc_t, _circular_t, _device_t >::operator== ( const device_t & test) const
inline

◆ reset()

event & dx::event< user >::reset ( uint64_t count = 0)
inlineinherited
+ Here is the caller graph for this function:

◆ samplerate()

template<typename _desc_t , typename _circular_t = dx::circular, typename _device_t = dx::stream::device<_desc_t>>
uint32_t dx::stream::pin< _desc_t, _circular_t, _device_t >::samplerate ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ signal() [1/2]

template<typename _desc_t , typename _circular_t = dx::circular, typename _device_t = dx::stream::device<_desc_t>>
void dx::stream::pin< _desc_t, _circular_t, _device_t >::signal ( )
inline

signal data available

+ Here is the call graph for this function:

◆ signal() [2/2]

event & dx::event< user >::signal ( uint64_t count = 1)
inlineinherited

◆ signalled()

uint64_t dx::event< user >::signalled ( ) const
inlineinherited

◆ start()

template<typename _desc_t , typename _circular_t = dx::circular, typename _device_t = dx::stream::device<_desc_t>>
virtual void dx::stream::pin< _desc_t, _circular_t, _device_t >::start ( )
inlinevirtual
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stop()

template<typename _desc_t , typename _circular_t = dx::circular, typename _device_t = dx::stream::device<_desc_t>>
virtual void dx::stream::pin< _desc_t, _circular_t, _device_t >::stop ( bool force = false)
inlinevirtual
Todo
connect flush
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ wait() [1/2]

event & dx::event< user >::wait ( bool reset = false)
inlineinherited

◆ wait() [2/2]

template<typename rep_t , typename period_t >
bool dx::event< user >::wait ( const std::chrono::duration< rep_t, period_t > & timeout,
bool reset = false )
inlineinherited

wait with duration timeout returns true: signalled false: timed out

Member Data Documentation

◆ control

template<typename _desc_t , typename _circular_t = dx::circular, typename _device_t = dx::stream::device<_desc_t>>
channel::control* dx::stream::pin< _desc_t, _circular_t, _device_t >::control = nullptr

◆ started

template<typename _desc_t , typename _circular_t = dx::circular, typename _device_t = dx::stream::device<_desc_t>>
std::atomic<int> dx::stream::pin< _desc_t, _circular_t, _device_t >::started {}
protected

◆ stream

template<typename _desc_t , typename _circular_t = dx::circular, typename _device_t = dx::stream::device<_desc_t>>
const struct desc_t::stream& dx::stream::pin< _desc_t, _circular_t, _device_t >::stream

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

(c) copyright 2009 dynamic acoustics e.U. generated on Wed Oct 2 2024

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.