dxd - dynax driver framework 2.1.0d73
cross platform open source driver development framework
Loading...
Searching...
No Matches
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.
 
os_result abort ()
 WDK pipe abort.
 
os_result clear ()
 
os_result clear ()
 WDK pipe stall reset, toggle.
 
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.
 
 pipe (const ::DEVICE_OBJECT *wdm_target, const ::USBD_INTERFACE_INFORMATION *usbd_interface, unsigned char address)
 WDK pipe constructor.
 
os_result read (::IOMemoryDescriptor *memory, uint64_t &sequence, isoc_frame *frame, unsigned int frames) const
 IOKit: USB synchronous irq/bulk read request.
 
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.
 
os_result receive (::IOMemoryDescriptor *memory, uint64_t &sequence, isoc_frame *frame, unsigned int frames)
 IOKit: USB asynchronous isochronous read request.
 
os_result receive (::MDL *mdl)
 WDK: USB asynchronous irq/bulk receive request.
 
os_result receive (::MDL *mdl, uint64_t &sequence, isoc_frame *frame, unsigned int frames)
 
os_result state () const
 IOKit: IOUSBPipe* implicit cast.
 
os_result transmit (const ::MDL *mdl)
 WDK: USB asynchronous irq/bulk transmit request.
 
os_result transmit (const ::MDL *mdl, uint64_t &sequence, isoc_frame *frame, unsigned int frames)
 
os_result transmit (const::IOMemoryDescriptor *memory, uint64_t &sequence, isoc_frame *frame, unsigned int frames)
 IOKit: USB asynchronous isochronous write request.
 
type type () const
 
type type () 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
 
template<typename data_t >
os_result write (const data_t &data) const
 
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
 
os_result write (const void *data, size_t size) const
 
os_result write (const::IOMemoryDescriptor *memory) const
 IOKit: USB synchronous irq/bulk write request.
 
os_result write (const::MDL *mdl) const
 WDK: USB synchronous isochronous write request.
 
virtual ~pipe ()
 

Public Attributes

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

Protected Member Functions

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

Detailed Description

IOKit: USB pipe class.

Member Enumeration Documentation

◆ direction

Enumerator
in 
out 

◆ type [1/2]

Enumerator
isoc 
bulk 
interrupt 
control 
isoc 
bulk 
interrupt 

◆ type [2/2]

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

◆ pipe() [1/2]

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:

◆ pipe() [2/2]

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

◆ ~pipe()

virtual dxd::usb_device::pipe::~pipe ( )
inlinevirtual
+ Here is the call graph for this function:

Member Function Documentation

◆ abort() [1/2]

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:

◆ abort() [2/2]

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

WDK pipe abort.

◆ clear() [1/2]

os_result dxd::usb_device::pipe::clear ( )
inline
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clear() [2/2]

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

WDK pipe stall reset, toggle.

◆ direction() [1/2]

◆ direction() [2/2]

+ Here is the call graph for this function:

◆ max_frame_size() [1/2]

os_result dxd::usb_device::pipe::max_frame_size ( unsigned int frame_size)
inline
+ Here is the call graph for this function:

◆ max_frame_size() [2/2]

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

◆ operator::USBD_PIPE_HANDLE()

dxd::usb_device::pipe::operator::USBD_PIPE_HANDLE ( ) const
inline

◆ read() [1/2]

os_result dxd::usb_device::pipe::read ( ::IOMemoryDescriptor * memory,
uint64_t & 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:

◆ read() [2/2]

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
+ Here is the call graph for this function:

◆ receive() [1/4]

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:

◆ receive() [2/4]

os_result dxd::usb_device::pipe::receive ( ::IOMemoryDescriptor * memory,
uint64_t & 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:

◆ receive() [3/4]

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:

◆ receive() [4/4]

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:

◆ received() [1/2]

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

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

◆ received() [2/2]

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

◆ state()

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:

◆ transmit() [1/3]

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:

◆ transmit() [2/3]

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:

◆ transmit() [3/3]

os_result dxd::usb_device::pipe::transmit ( const::IOMemoryDescriptor * memory,
uint64_t & 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:

◆ transmitted()

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

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

◆ type() [1/2]

◆ type() [2/2]

◆ write() [1/8]

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:

◆ write() [2/8]

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:

◆ write() [3/8]

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:

◆ write() [4/8]

os_result dxd::usb_device::pipe::write ( const void * data,
size_t size ) const
inline
+ Here is the call graph for this function:

◆ write() [5/8]

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:

◆ write() [6/8]

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

◆ write() [7/8]

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:

◆ write() [8/8]

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

Member Data Documentation

◆ address

unsigned char dxd::usb_device::pipe::address

◆ frame_size

unsigned short dxd::usb_device::pipe::frame_size =1

◆ interval

unsigned char dxd::usb_device::pipe::interval =1

◆ status

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 files:

(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.