dxd - dynax driver framework  2719
cross platform open source driver development framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dx::usb::stream::pin< desc_t, exception_t, device_t > Class Template Reference

#include <dx_usb_device.h>

+ Inheritance diagram for dx::usb::stream::pin< desc_t, exception_t, device_t >:
+ Collaboration diagram for dx::usb::stream::pin< desc_t, exception_t, device_t >:

Public Types

enum  type : unsigned char { control =::kUSBControl, isoc =::kUSBIsoc, bulk =::kUSBBulk, irq =::kUSBInterrupt }
 

Public Member Functions

void abort () throw (exception_t)
 
 catch (...)
 
template<int channels>
void channels (int **io[2], uint64_t channel_map[(channels+63)/64]) throw (exception_t)
 
void clear () throw (exception_t)
 
void flush () noexcept
 
uint64_t frame () throw (exception_t)
 
void free () noexcept
 
void initialize (unsigned int line_size, unsigned int cycles, unsigned int sample_rate) try throw (exception_t)
 creates circular backing store and frame buffers for isoc streaming More...
 
void max_frame_size (unsigned int frame_size) throw (exception_t)
 
 operator struct circular * () const noexcept
 
struct circularoperator-> () const noexcept
 
 pin (device_t &device, const dx::stream::open< dx::usb::bulk > &open, const typename desc_t::stream::pin_desc &desc={}) throw (exception_t)
 
 pin (device_t &device, const dx::stream::open< dx::usb::isoc > &open, const typename desc_t::stream::pin_desc &desc={}) throw (exception_t)
 
void receive (void *data, size_t size) throw (exception_t)
 asynchronous USB read request with wMaxPacketSize More...
 
void receive (void *data, uint64_t &sequence,::IOUSBIsocFrame *frame, int frames=1) throw (exception_t)
 
void start () throw (exception_t)
 
os_result status () throw (exception_t)
 
void stop (bool force=false) throw (exception_t)
 
void transmit (const void *data, size_t size) throw (exception_t)
 
void transmit (const void *data, uint64_t &sequence,::IOUSBIsocFrame *frame, int frames=1) throw (exception_t)
 
void write (const void *data, size_t size) throw (exception_t)
 
template<typename data_t >
void write (const data_t &data) throw (exception_t)
 
 ~pin () noexcept
 

Public Attributes

dx::stream::channel::controlcontrol =nullptr
 
enum dx::usb::pipe::type type
 

Member Enumeration Documentation

template<typename exception_t = os_result, typename device_t = device<exception_t>>
enum dx::usb::pipe::type : unsigned char
inherited
Enumerator
control 
isoc 
bulk 
irq 

Constructor & Destructor Documentation

template<typename desc_t , typename exception_t = os_result, typename device_t = device<desc_t,exception_t>>
dx::usb::stream::pin< desc_t, exception_t, device_t >::pin ( device_t &  device,
const dx::stream::open< dx::usb::bulk > &  open,
const typename desc_t::stream::pin_desc &  desc = {} 
)
throw (exception_t
)
inline
template<typename desc_t , typename exception_t = os_result, typename device_t = device<desc_t,exception_t>>
dx::usb::stream::pin< desc_t, exception_t, device_t >::pin ( device_t &  device,
const dx::stream::open< dx::usb::isoc > &  open,
const typename desc_t::stream::pin_desc &  desc = {} 
)
throw (exception_t
)
inline
Todo:
default sample rate from clock description
template<typename desc_t , typename exception_t = os_result, typename device_t = device<desc_t,exception_t>>
dx::usb::stream::pin< desc_t, exception_t, device_t >::~pin ( )
inlinenoexcept

+ Here is the call graph for this function:

Member Function Documentation

template<typename exception_t = os_result, typename device_t = device<exception_t>>
void dx::usb::pipe< exception_t, device_t >::abort ( )
throw (exception_t
)
inlineinherited
template<typename desc_t , typename exception_t = os_result, typename device_t = device<desc_t,exception_t>>
dx::usb::stream::pin< desc_t, exception_t, device_t >::catch (   ...)
inline
template<typename desc_t , typename exception_t = os_result, typename device_t = device<desc_t,exception_t>>
template<int channels>
void dx::usb::stream::pin< desc_t, exception_t, device_t >::channels ( int **  io[2],
uint64_t  channel_map[(channels+63)/64] 
)
throw (exception_t
)
inline
template<typename exception_t = os_result, typename device_t = device<exception_t>>
void dx::usb::pipe< exception_t, device_t >::clear ( )
throw (exception_t
)
inlineinherited
template<typename desc_t , typename exception_t = os_result, typename device_t = device<desc_t,exception_t>>
void dx::usb::stream::pin< desc_t, exception_t, device_t >::flush ( )
inlinenoexcept
template<typename exception_t = os_result, typename device_t = device<exception_t>>
uint64_t dx::usb::pipe< exception_t, device_t >::frame ( )
throw (exception_t
)
inlineinherited
template<typename desc_t , typename exception_t = os_result, typename device_t = device<desc_t,exception_t>>
void dx::usb::stream::pin< desc_t, exception_t, device_t >::free ( )
inlinenoexcept
template<typename desc_t , typename exception_t = os_result, typename device_t = device<desc_t,exception_t>>
void dx::usb::stream::pin< desc_t, exception_t, device_t >::initialize ( unsigned int  line_size,
unsigned int  cycles,
unsigned int  sample_rate 
)
throw (exception_t
)
inline

creates circular backing store and frame buffers for isoc streaming

Todo:
initialize also RX isoc when no extralines are required

generates isoc cycle metrics from sample rate,

update max frame size

Todo:
reset max frame size when pipe is closed

initializes circular buffer

+ Here is the call graph for this function:

template<typename exception_t = os_result, typename device_t = device<exception_t>>
void dx::usb::pipe< exception_t, device_t >::max_frame_size ( unsigned int  frame_size)
throw (exception_t
)
inlineinherited
template<typename desc_t , typename exception_t = os_result, typename device_t = device<desc_t,exception_t>>
dx::usb::stream::pin< desc_t, exception_t, device_t >::operator struct circular * ( ) const
inlinenoexcept
template<typename desc_t , typename exception_t = os_result, typename device_t = device<desc_t,exception_t>>
struct circular* dx::usb::stream::pin< desc_t, exception_t, device_t >::operator-> ( ) const
inlinenoexcept
template<typename exception_t = os_result, typename device_t = device<exception_t>>
void dx::usb::pipe< exception_t, device_t >::receive ( void *  data,
size_t  size 
)
throw (exception_t
)
inlineinherited

asynchronous USB read request with wMaxPacketSize

template<typename exception_t = os_result, typename device_t = device<exception_t>>
void dx::usb::pipe< exception_t, device_t >::receive ( void *  data,
uint64_t sequence,
::IOUSBIsocFrame *  frame,
int  frames = 1 
)
throw (exception_t
)
inlineinherited
template<typename desc_t , typename exception_t = os_result, typename device_t = device<desc_t,exception_t>>
void dx::usb::stream::pin< desc_t, exception_t, device_t >::start ( )
throw (exception_t
)
inline

estimate upcoming timestamp

Todo:
compute timestamp in ticks (not nsec)!

scheduling all but one isoc requests at least 1 sequence ahead; aligned to whole cycles,

+ Here is the call graph for this function:

template<typename exception_t = os_result, typename device_t = device<exception_t>>
os_result dx::usb::pipe< exception_t, device_t >::status ( )
throw (exception_t
)
inlineinherited
template<typename desc_t , typename exception_t = os_result, typename device_t = device<desc_t,exception_t>>
void dx::usb::stream::pin< desc_t, exception_t, device_t >::stop ( bool  force = false)
throw (exception_t
)
inline
template<typename exception_t = os_result, typename device_t = device<exception_t>>
void dx::usb::pipe< exception_t, device_t >::transmit ( const void *  data,
size_t  size 
)
throw (exception_t
)
inlineinherited
template<typename exception_t = os_result, typename device_t = device<exception_t>>
void dx::usb::pipe< exception_t, device_t >::transmit ( const void *  data,
uint64_t sequence,
::IOUSBIsocFrame *  frame,
int  frames = 1 
)
throw (exception_t
)
inlineinherited
template<typename exception_t = os_result, typename device_t = device<exception_t>>
void dx::usb::pipe< exception_t, device_t >::write ( const void *  data,
size_t  size 
)
throw (exception_t
)
inlineinherited
template<typename exception_t = os_result, typename device_t = device<exception_t>>
template<typename data_t >
void dx::usb::pipe< exception_t, device_t >::write ( const data_t &  data)
throw (exception_t
)
inlineinherited

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

template<typename desc_t , typename exception_t = os_result, typename device_t = device<desc_t,exception_t>>
dx::stream::channel::control* dx::usb::stream::pin< desc_t, exception_t, device_t >::control =nullptr
template<typename exception_t = os_result, typename device_t = device<exception_t>>
enum dx::usb::pipe::type dx::usb::pipe< exception_t, device_t >::type
inherited

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

(c) copyright 2009 dynamic acoustics e.U. generated on Tue Apr 23 2019

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.