dxd - dynax driver framework  3211
cross platform open source driver development framework
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_t &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_t &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)
 
os_result state () const
 IOKit: IOUSBPipe* implicit cast. More...
 
os_result transmit (const ::IOMemoryDescriptor *memory, uint64_t &sequence, isoc_frame *frame, unsigned int frames)
 IOKit: USB asynchronous isochronous write request. More...
 
os_result transmit (const ::MDL *mdl)
 WDK: USB asynchronous irq/bulk transmit 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_t timestamp)
 IOKit: virtual callback indicating a read request has been completed. More...
 
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. More...
 

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

◆ 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

+ Here is the call graph for this function:

◆ ~pipe()

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

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.

◆ 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

◆ 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

◆ 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

◆ 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

◆ 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

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

+ Here is the caller graph for this function:

◆ 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()

◆ transmit() [1/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:

◆ transmit() [2/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() [3/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:

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

+ Here is the caller graph for this function:

◆ type() [1/2]

◆ type() [2/2]

◆ write() [1/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

◆ write() [2/8]

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

◆ write() [3/8]

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

◆ write() [4/8]

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

◆ write() [5/8]

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

◆ write() [6/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

◆ write() [7/8]

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

◆ write() [8/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:

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

(c) copyright 2009 dynamic acoustics e.U. generated on Sat Aug 22 2020

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.