dxd - dynax driver framework 3.0.0d222
cross platform open source driver development framework
Loading...
Searching...
No Matches
dxd::usb::device< base_t > Class Template Reference

#include <dxd_usb_device.h>

Inheritance diagram for dxd::usb::device< base_t >:
Collaboration diagram for dxd::usb::device< base_t >:

Public Types

enum  speed {
  low = ::UsbLowSpeed , full = ::UsbFullSpeed , high = ::UsbHighSpeed , usb1 = full ,
  usb2 = high
}

Public Member Functions

void conclude () override
 deselects the configuration and lets the bus interface go while the bus below still answers: past the remove it is gone with the PDO
unsigned char configuration () const
 return available USB configurations
os_result configuration (unsigned char configuration)
 choose USB configuration
unsigned char configurations () const
 return current USB configuration
template<typename... args_t>
 device (args_t &&... args)
 WDK: USB device constructor.
const decltype(dx::usb::descriptor::endpoint) * endpoint (unsigned char interface, unsigned char setting, unsigned char address)
 the endpoint descriptor of an interface setting's endpoint, from the selected configuration
os_result frame (uint64_t &frame, int64_t *timestamp=nullptr) const
 the current bus frame; timestamp: dxd::timestamp() of the readout
const ::USBD_INTERFACE_INFORMATION * interface (unsigned char index, unsigned char setting=0)
virtual os_result ioctl (unsigned int ioctl, const void *, size_t size_in, void *out, size_t size_out, size_t &size)
 control I/O handler, reached through client::ioctl()
 operator::DEVICE_OBJECT * () const
template<typename data_t>
os_result request (const dx::usb::control &control, data_t &data)
os_result request (const dx::usb::control &control, void *data, size_t &size)
speed speed () const
os_result string (unsigned char idx, char *string, unsigned char &chars)
template<typename string_t>
os_result string (unsigned char idx, string_t &string)
 ~device () override

Public Attributes

os_result status = not_initialized

Protected Member Functions

virtual os_result boot ()
 a device loading its firmware after enumeration reports readiness here, ahead of the configuration: the descriptors it is configured from are the booted one's
virtual clientclient_create ()
 user client factory
os_result launch () override
 WDK: USB device initialization callback.

Protected Attributes

scoped<::USB_CONFIGURATION_DESCRIPTOR > config
struct { 
   ::DEVICE_OBJECT *   bus 
 the device object below More...
   ::DEVICE_OBJECT *   device 
 this device's own FDO More...
   ::DEVICE_OBJECT *   pdo 
 the devnode's PDO More...
wdm

Member Enumeration Documentation

◆ speed

template<typename base_t = dxd::device>
enum dxd::usb::device::speed
Enumerator
low 
full 
high 
usb1 
usb2 

Constructor & Destructor Documentation

◆ device()

template<typename base_t = dxd::device>
template<typename... args_t>
dxd::usb::device< base_t >::device ( args_t &&... args)
inline

WDK: USB device constructor.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~device()

template<typename base_t = dxd::device>
dxd::usb::device< base_t >::~device ( )
inlineoverridevirtual

Reimplemented from dxd::device.

Member Function Documentation

◆ boot()

template<typename base_t = dxd::device>
virtual os_result dxd::usb::device< base_t >::boot ( )
inlineprotectedvirtual

a device loading its firmware after enumeration reports readiness here, ahead of the configuration: the descriptors it is configured from are the booted one's

Here is the caller graph for this function:

◆ client_create()

virtual client * dxd::device::client_create ( )
inlineprotectedvirtualinherited

user client factory

◆ conclude()

template<typename base_t = dxd::device>
void dxd::usb::device< base_t >::conclude ( )
inlineoverridevirtual

deselects the configuration and lets the bus interface go while the bus below still answers: past the remove it is gone with the PDO

Reimplemented from dxd::device.

Here is the call graph for this function:

◆ configuration() [1/2]

template<typename base_t = dxd::device>
unsigned char dxd::usb::device< base_t >::configuration ( ) const
inline

return available USB configurations

Here is the caller graph for this function:

◆ configuration() [2/2]

template<typename base_t = dxd::device>
os_result dxd::usb::device< base_t >::configuration ( unsigned char configuration)
inline

choose USB configuration

removes interface cache

deselects current configuration on request #0

obtains the configuration descriptor,

obtains all descriptors,

enumerates interfaces in the configuration,

allocates and builds an URB for the select-configuration request,

creates interface cache

enumerates the pipes in the interface information array, which is now filled with pipe information.

Here is the call graph for this function:

◆ configurations()

template<typename base_t = dxd::device>
unsigned char dxd::usb::device< base_t >::configurations ( ) const
inline

return current USB configuration

◆ endpoint()

template<typename base_t = dxd::device>
const decltype(dx::usb::descriptor::endpoint) * dxd::usb::device< base_t >::endpoint ( unsigned char interface,
unsigned char setting,
unsigned char address )
inline

the endpoint descriptor of an interface setting's endpoint, from the selected configuration

Here is the call graph for this function:

◆ frame()

template<typename base_t = dxd::device>
os_result dxd::usb::device< base_t >::frame ( uint64_t & frame,
int64_t * timestamp = nullptr ) const
inline

the current bus frame; timestamp: dxd::timestamp() of the readout

Here is the call graph for this function:
Here is the caller graph for this function:

◆ interface()

template<typename base_t = dxd::device>
const ::USBD_INTERFACE_INFORMATION * dxd::usb::device< base_t >::interface ( unsigned char index,
unsigned char setting = 0 )
inline

requests settings change,

disposes and creates new interface cache on size change,

and fills interface cache,

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ioctl()

virtual os_result dxd::device::ioctl ( unsigned int ioctl,
const void * ,
size_t size_in,
void * out,
size_t size_out,
size_t & size )
inlinevirtualinherited

control I/O handler, reached through client::ioctl()

Reimplemented in dxd::adapter::device.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ launch()

template<typename base_t = dxd::device>
os_result dxd::usb::device< base_t >::launch ( )
inlineoverrideprotectedvirtual

WDK: USB device initialization callback.

obtains the device descriptor,

and select USB configuration #1.

Reimplemented from dxd::device.

Here is the call graph for this function:

◆ operator::DEVICE_OBJECT *()

template<typename base_t = dxd::device>
dxd::usb::device< base_t >::operator::DEVICE_OBJECT * ( ) const
inline

◆ request() [1/2]

template<typename base_t = dxd::device>
template<typename data_t>
os_result dxd::usb::device< base_t >::request ( const dx::usb::control & control,
data_t & data )
inline
Parameters
controlthe USB request control defining the request type
datadata to transmit or receive
Here is the call graph for this function:
Here is the caller graph for this function:

◆ request() [2/2]

template<typename base_t = dxd::device>
os_result dxd::usb::device< base_t >::request ( const dx::usb::control & control,
void * data,
size_t & size )
inline

◆ speed()

template<typename base_t = dxd::device>
speed dxd::usb::device< base_t >::speed ( ) const
inline
Todo
implement WDK low/super speed check for dxd::usb::device::speed() the device's own operating speed: a full speed device behind a high speed hub is full speed

◆ string() [1/2]

template<typename base_t = dxd::device>
os_result dxd::usb::device< base_t >::string ( unsigned char idx,
char * string,
unsigned char & chars )
inline
Here is the caller graph for this function:

◆ string() [2/2]

template<typename base_t = dxd::device>
template<typename string_t>
os_result dxd::usb::device< base_t >::string ( unsigned char idx,
string_t & string )
inline
Here is the call graph for this function:

Member Data Documentation

◆ bus

::DEVICE_OBJECT* dxd::device::bus
inherited

the device object below

◆ config

template<typename base_t = dxd::device>
scoped<::USB_CONFIGURATION_DESCRIPTOR> dxd::usb::device< base_t >::config
protected

the selected configuration's descriptors: endpoint attributes live here, a class compliant device is configured from them

◆ pdo

::DEVICE_OBJECT* dxd::device::pdo
inherited

the devnode's PDO

◆ status

os_result dxd::device::status = not_initialized
inherited

◆ [struct]

struct { ... } dxd::device::wdm

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

(c) copyright 2009 dynamic acoustics e.U. generated on

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.