dxd - dynax driver framework  2675
cross platform open source driver development framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dxd::usb_device::pipe Class Reference

IOKit: USB pipe class. More...

#include <dxd_usb.h>

+ Inheritance diagram for dxd::usb_device::pipe:
+ Collaboration diagram for dxd::usb_device::pipe:

Classes

union  isoc_frame
 

Public Types

enum  direction { in =::kEndpointDescriptorDirectionIn, out =::kEndpointDescriptorDirectionOut }
 
enum  type {
  isoc =::kEndpointDescriptorTransferTypeIsochronous, bulk =::kEndpointDescriptorTransferTypeBulk, interrupt =::kEndpointDescriptorTransferTypeInterrupt, control =::UsbdPipeTypeControl,
  isoc =::kEndpointDescriptorTransferTypeIsochronous, bulk =::kEndpointDescriptorTransferTypeBulk, interrupt =::kEndpointDescriptorTransferTypeInterrupt
}
 
enum  type {
  isoc =::kEndpointDescriptorTransferTypeIsochronous, bulk =::kEndpointDescriptorTransferTypeBulk, interrupt =::kEndpointDescriptorTransferTypeInterrupt, control =::UsbdPipeTypeControl,
  isoc =::kEndpointDescriptorTransferTypeIsochronous, bulk =::kEndpointDescriptorTransferTypeBulk, interrupt =::kEndpointDescriptorTransferTypeInterrupt
}
 

Public Member Functions

os_result abort ()
 IOKit: abort all outstanding requests and waits until all requests have been finalized. More...
 
os_result abort ()
 WDK pipe abort. More...
 
os_result clear ()
 
os_result clear ()
 WDK pipe stall reset, toggle. More...
 
direction direction () const
 
direction direction () const
 
os_result max_frame_size (unsigned int frame_size)
 
os_result max_frame_size (unsigned int frame_size)
 
 operator::USBD_PIPE_HANDLE () const
 
 pipe (::IOUSBHostDevice *,::IOUSBHostInterface *iokit_usb_interface, unsigned char address)
 IOKit: USB pipe class constructor. More...
 
 pipe (const ::DEVICE_OBJECT *wdm_target, const ::USBD_INTERFACE_INFORMATION *usbd_interface, unsigned char address)
 WDK pipe constructor. More...
 
os_result read (::IOMemoryDescriptor *memory, uint64 &sequence, isoc_frame *frame, unsigned int frames) const
 IOKit: USB synchronous irq/bulk read request. More...
 
os_result read (::MDL *mdl, uint64_t &sequence, isoc_frame *frame, unsigned int frames)
 
os_result receive (::IOMemoryDescriptor *memory)
 IOKit: USB asynchronous irq/bulk receive request. More...
 
os_result receive (::IOMemoryDescriptor *memory, uint64 &sequence, isoc_frame *frame, unsigned int frames)
 IOKit: USB asynchronous isochronous read request. More...
 
os_result receive (::MDL *mdl)
 WDK: USB asynchronous irq/bulk receive request. More...
 
os_result receive (::MDL *mdl, uint64_t &sequence, isoc_frame *frame, unsigned int frames)
 
template<typename data_t >
os_result request (const dx::usb::control &control, data_t &data)
 IOKit: synchronously sends an USB control request to this pipe. More...
 
os_result request (const dx::usb::control &control, void *data, size_t &size)
 
os_result state () const
 IOKit: IOUSBPipe* implicit cast. More...
 
os_result transmit (const ::MDL *mdl)
 WDK: USB asynchronous irq/bulk transmit request. More...
 
os_result transmit (const ::IOMemoryDescriptor *memory, uint64 &sequence, isoc_frame *frame, unsigned int frames)
 IOKit: USB asynchronous isochronous write request. More...
 
os_result transmit (const ::MDL *mdl, uint64_t &sequence, isoc_frame *frame, unsigned int frames)
 
type type () const
 
type type () const
 
os_result write (const ::IOMemoryDescriptor *memory) const
 IOKit: USB synchronous irq/bulk write request. More...
 
os_result write (const void *data, size_t size) const
 
template<dx::scope scope_t>
os_result write (const void *data, size_t size) const
 
template<typename data_t >
os_result write (const data_t &data) const
 
template<dx::scope scope_t, typename data_t >
os_result write (const data_t &data) const
 
os_result write (const ::MDL *mdl) const
 WDK: USB synchronous isochronous write request. More...
 
os_result write (const void *data, size_t size) const
 
template<typename data_t >
os_result write (const data_t &data) const
 
virtual ~pipe ()
 

Public Attributes

unsigned char address
 
unsigned short frame_size =1
 
unsigned char interval =1
 
os_result status =not_initialized
 USB pipe status. More...
 

Protected Member Functions

virtual void received (const void *data, size_t size, int64 timestamp)
 IOKit: virtual callback indicating a read request has been completed. More...
 
virtual void received (const void *data, size_t size, int64 timestamp, isoc_frame *frame, unsigned int frames)
 
virtual void transmitted (void *data, size_t size, int64 timestamp, isoc_frame *frame, unsigned int frames)
 IOKit: virtual callback indicating a write request has been completed. More...
 

Detailed Description

IOKit: USB pipe class.

Member Enumeration Documentation

Enumerator
in 
out 
Enumerator
isoc 
bulk 
interrupt 
control 
isoc 
bulk 
interrupt 

bills "compiler" still does exercises - until it learnt a bit more c++ enums need to go here to be available during rest of class definition.

Enumerator
isoc 
bulk 
interrupt 
control 
isoc 
bulk 
interrupt 

Constructor & Destructor Documentation

dxd::usb_device::pipe::pipe ( ::IOUSBHostDevice ,
::IOUSBHostInterface iokit_usb_interface,
unsigned char  address 
)
inline

IOKit: USB pipe class constructor.

Todo:
evaluate to get isoc.line_size from generic USB descriptor

+ Here is the call graph for this function:

dxd::usb_device::pipe::pipe ( const ::DEVICE_OBJECT *  wdm_target,
const ::USBD_INTERFACE_INFORMATION *  usbd_interface,
unsigned char  address 
)
inline

WDK pipe constructor.

iterates thru all endpoints of the interface setting

+ Here is the call graph for this function:

virtual dxd::usb_device::pipe::~pipe ( )
inline

+ Here is the call graph for this function:

Member Function Documentation

os_result dxd::usb_device::pipe::abort ( )
inline

IOKit: abort all outstanding requests and waits until all requests have been finalized.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

os_result dxd::usb_device::pipe::abort ( )
inline

WDK pipe abort.

os_result dxd::usb_device::pipe::clear ( )
inline

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

os_result dxd::usb_device::pipe::clear ( )
inline

WDK pipe stall reset, toggle.

+ Here is the caller graph for this function:

+ Here is the call graph for this function:

os_result dxd::usb_device::pipe::max_frame_size ( unsigned int  frame_size)
inline

+ Here is the call graph for this function:

os_result dxd::usb_device::pipe::max_frame_size ( unsigned int  frame_size)
inline
Todo:
implement WDK USB max_frame_size() bandwidth adjustment
dxd::usb_device::pipe::operator::USBD_PIPE_HANDLE ( ) const
inline

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

os_result dxd::usb_device::pipe::read ( ::IOMemoryDescriptor *  memory,
uint64 &  sequence,
isoc_frame frame,
unsigned int  frames 
) const
inline

IOKit: USB synchronous irq/bulk read request.

IOKit: USB synchronous isochronous read request

Parameters
memorymemory descriptor of the data to be read

+ Here is the call graph for this function:

os_result dxd::usb_device::pipe::read ( ::MDL *  mdl,
uint64_t sequence,
isoc_frame frame,
unsigned int  frames 
)
inline
Parameters
mdlmemory descriptor of the data to be read
os_result dxd::usb_device::pipe::receive ( ::IOMemoryDescriptor *  memory)
inline

IOKit: USB asynchronous irq/bulk receive request.

Parameters
memorymemory descriptor of the data to be read

+ Here is the call graph for this function:

os_result dxd::usb_device::pipe::receive ( ::IOMemoryDescriptor *  memory,
uint64 &  sequence,
isoc_frame frame,
unsigned int  frames 
)
inline

IOKit: USB asynchronous isochronous read request.

Parameters
memorymemory descriptor of the data to be read

+ Here is the call graph for this function:

os_result dxd::usb_device::pipe::receive ( ::MDL *  mdl)
inline

WDK: USB asynchronous irq/bulk receive request.

+ Here is the call graph for this function:

os_result dxd::usb_device::pipe::receive ( ::MDL *  mdl,
uint64_t sequence,
isoc_frame frame,
unsigned int  frames 
)
inline
Parameters
mdlmemory descriptor of the data to be read

+ Here is the call graph for this function:

virtual void dxd::usb_device::pipe::received ( const void *  data,
size_t  size,
int64  timestamp 
)
inlineprotectedvirtual

IOKit: virtual callback indicating a read request has been completed.

virtual void dxd::usb_device::pipe::received ( const void *  data,
size_t  size,
int64  timestamp,
isoc_frame frame,
unsigned int  frames 
)
inlineprotectedvirtual
template<typename data_t >
os_result dxd::usb_device::pipe::request ( const dx::usb::control control,
data_t &  data 
)
inline

IOKit: synchronously sends an USB control request to this pipe.

Todo:
USB pipe control request timeout
Parameters
controlthe USB request control defining the request type
datadata to transmit or receive
os_result dxd::usb_device::pipe::request ( const dx::usb::control control,
void *  data,
size_t &  size 
)
inline
Parameters
controlthe USB request control defining the request type
datadata to transmit or receive
sizesize of the actual transaction

+ Here is the call graph for this function:

os_result dxd::usb_device::pipe::state ( ) const
inline

IOKit: IOUSBPipe* implicit cast.

IOKit: IOUSBPipe* operator

for internal use only

Deprecated:
If you end-up using this operator in a consolidated driver source, you probably work around the dynax driver framework mechanics and should re-think your design.
Todo:
find out if isInactive() is equivalent to getState()

+ Here is the caller graph for this function:

os_result dxd::usb_device::pipe::transmit ( const ::MDL *  mdl)
inline

WDK: USB asynchronous irq/bulk transmit request.

+ Here is the call graph for this function:

os_result dxd::usb_device::pipe::transmit ( const ::IOMemoryDescriptor *  memory,
uint64 &  sequence,
isoc_frame frame,
unsigned int  frames 
)
inline

IOKit: USB asynchronous isochronous write request.

Parameters
memorymemory descriptor of the data to be written

+ Here is the call graph for this function:

os_result dxd::usb_device::pipe::transmit ( const ::MDL *  mdl,
uint64_t sequence,
isoc_frame frame,
unsigned int  frames 
)
inline
Parameters
mdlmemory descriptor of the data to be written

+ Here is the call graph for this function:

virtual void dxd::usb_device::pipe::transmitted ( void *  data,
size_t  size,
int64  timestamp,
isoc_frame frame,
unsigned int  frames 
)
inlineprotectedvirtual

IOKit: virtual callback indicating a write request has been completed.

+ Here is the caller graph for this function:

os_result dxd::usb_device::pipe::write ( const ::IOMemoryDescriptor *  memory) const
inline

IOKit: USB synchronous irq/bulk write request.

Parameters
memorymemory descriptor of the data to be written

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

os_result dxd::usb_device::pipe::write ( const void *  data,
size_t  size 
) const
inline

+ Here is the call graph for this function:

template<dx::scope scope_t>
os_result dxd::usb_device::pipe::write ( const void *  data,
size_t  size 
) const
inline

+ Here is the call graph for this function:

template<typename data_t >
os_result dxd::usb_device::pipe::write ( const data_t &  data) const
inline

+ Here is the call graph for this function:

template<dx::scope scope_t, typename data_t >
os_result dxd::usb_device::pipe::write ( const data_t &  data) const
inline

+ Here is the call graph for this function:

os_result dxd::usb_device::pipe::write ( const ::MDL *  mdl) const
inline

WDK: USB synchronous isochronous write request.

Todo:
return number of written bytes

WDK: USB synchronous irq/bulk write request

Todo:
return number of written bytes
os_result dxd::usb_device::pipe::write ( const void *  data,
size_t  size 
) const
inline
template<typename data_t >
os_result dxd::usb_device::pipe::write ( const data_t &  data) const
inline

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

unsigned char dxd::usb_device::pipe::address
unsigned short dxd::usb_device::pipe::frame_size =1
unsigned char dxd::usb_device::pipe::interval =1
os_result dxd::usb_device::pipe::status =not_initialized

USB pipe status.

WDK pipe status.


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

(c) copyright 2009 dynamic acoustics e.U. generated on Tue Dec 4 2018

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.