dxd - dynax driver framework 2.1.0d73
cross platform open source driver development framework
Loading...
Searching...
No Matches
dxd::usb_stream_client Class Reference

generic USB user client class More...

#include <dxd_usb_stream.h>

+ Inheritance diagram for dxd::usb_stream_client:
+ Collaboration diagram for dxd::usb_stream_client:

Protected Types

typedef stream::umap< usb_stream_device::streamumap
 

Protected Member Functions

void conclude () override
 generic USB user client finalization & cleanup
 
os_result ioctl (unsigned int ioctl, const void *in, size_t size_in, void *out, size_t size_out, size_t &size) override
 user client IOCTL handler
 

Protected Attributes

struct { 
 
   dxd::map< dx::user, unsigned int >   map 
 sample rate shared user space mapping More...
 
   dxd::map< dx::user, dx::stream::clock::monitor >   monitor 
 clock monitor shared user space mapping More...
 
clock 
 
usb_stream_devicedevice
 pointer to the device to talk to
 
umapio [0x20] {}
 

Detailed Description

generic USB user client class

This class is derrived from the frameworks dxd::client class. All application interaction is handled via this class. The framework creates an instance of this class when an application opens the driver and releases the instances when the application closes the driver.
This class overwrites the default handler for IOCTL handling.

Exceptions
os_resultan error returned by the underlaying KPIs is reflected by the methods return value. The object status can be retrieved by the usb_stream_client::status member.

Member Typedef Documentation

◆ umap

Member Function Documentation

◆ conclude()

void dxd::usb_stream_client::conclude ( )
inlineoverrideprotected

generic USB user client finalization & cleanup

clean-up: remove all backing store references:

+ Here is the call graph for this function:

◆ ioctl()

os_result dxd::usb_stream_client::ioctl ( unsigned int ioctl,
const void * in,
size_t size_in,
void * out,
size_t size_out,
size_t & size )
inlineoverrideprotected

user client IOCTL handler

ioctl() gets called by the framework for I/O control handling.
The framwork provides lightwight memory objects for input an output. These objects can directly be forwarded for device access. Curently implemented are handlers for

Exceptions
os_resultan error returned by the underlaying KPIs is reflected by the methods return value. This member does not change the object status.

handle ioctls

checks endpoint address,

obtains stream index from endpoint address

checks if stream is opened;

signals streams

stream administration handled by device

get stream

checks endpoint address,

obtains stream index from endpoint address

  • user space address of shared buffer,

checks endpoint address,

checks stream user mode mapping,

checks endpoint address,

checks stream user mode mapping,

checks endpoint address,

checks stream user mode mapping,

    - <i>dx::ioctl::stream::clock::samplerate</i>
        - in: clock domain ID (ignored since the supported devices only
            have one clock domain so far)
            + optional (unsigned int) samplerate,
        - out:
            optional (unsigned int) samplerate, or
            optional dx::iobridge<unsigned int> samplerate map

/

Todo
clean way of switching SR of device or endpoint, /when streams are opened or closed

  • dx::ioctl::stream::clock::monitor
    • out: (bool): determines if clock monitor was started, or alternatively (dx::iobridge<dx::stream::clock::monitor>): returns mapped user space pointer to monitor struct

Parameters
ioctlIOCTL
inbuffer pointer containing data from user mode
size_insize of the buffer containing data from user mode
outbuffer pointer accepting data to be returned to user mode
size_outsize of the buffer accepting data to be returned to user mode
sizeactual size of data to be returned to user mode
+ Here is the call graph for this function:

Member Data Documentation

◆ [struct]

struct { ... } dxd::usb_stream_client::clock

◆ device

usb_stream_device* dxd::usb_stream_client::device
protected

pointer to the device to talk to

◆ io

umap* dxd::usb_stream_client::io[0x20] {}
protected

◆ map

dxd::map<dx::user,unsigned int> dxd::usb_stream_client::map

sample rate shared user space mapping

Todo
make readonly: MdlMappingNoWrite

◆ monitor

dxd::map<dx::user,dx::stream::clock::monitor> dxd::usb_stream_client::monitor

clock monitor shared user space mapping


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

(c) copyright 2009 dynamic acoustics e.U. generated on Fri Nov 15 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.