dxd - dynax driver framework 3.0.2
cross platform open source driver development framework
Loading...
Searching...
No Matches
dxd::usb::stream::pipe< device_t > Class Template Reference

one endpoint's ring and request pipeline More...

#include <dxd_usb_stream.h>

Inheritance diagram for dxd::usb::stream::pipe< device_t >:
Collaboration diagram for dxd::usb::stream::pipe< device_t >:

Public Member Functions

os_result allocate(const struct desc_t::stream::config* active) override
 binds the pipe to the given stream configuration off its descriptors, the ring's memory kept: the endpoint, the packets and the slots over them, the sink's own feedback endpoint, the ring's size - the bus's alternate setting is the session's, its charge selects it. The binding stands complete ahead of replacing the pipe's, so a pipe a session runs, a stream off or a binding without memory keeps the one it has; the device's configuration is not asked, its server binds ahead of the commit
void free()
 what the binding to a stream configuration holds - the ring's memory stays
 pipe(device_t& device, unsigned int idx, size_t size)
 ~pipe() override

Protected Types

enum  type { control = ::UsbdPipeTypeControl , isoc = ::UsbdPipeTypeIsochronous , bulk = ::UsbdPipeTypeBulk , interrupt = ::UsbdPipeTypeInterrupt }

Protected Member Functions

os_result clear()
 WDK pipe stall reset, toggle.
direction direction() const
os_result max_frame_size(unsigned int frame_size)
os_result open(const ::USBD_INTERFACE_INFORMATION* usbd_interface)
 binds the pipe to the endpoint's pipe of the given interface setting: a re-selected alternate setting renews the handles
 operator ::USBD_PIPE_HANDLE() const
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 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)
type type() const
os_result write(const ::MDL* mdl) const
 WDK: USB synchronous isochronous write request.
template<typename data_t>
os_result write(const data_t& data) const
os_result write(const void* data, size_t size) const

Protected Attributes

unsigned char address
unsigned short frame_size{}
unsigned char interval{1}
os_result status{not_initialized}
 WDK pipe status.

Friends

class dx::usb::isoc::pipeline<pipe>
struct dx::usb::isoc::session<group<device_t>>
class group<device_t>

Detailed Description

template<typename device_t>
class dxd::usb::stream::pipe< device_t >

one endpoint's ring and request pipeline

The group's tick at bus frame frame submits this pipe's free slot a round ahead, resubmits every polled completion a round on and moves the data: an out slot due lead frames ahead is filled from the ring into its pending request, the in slot due lead frames behind is taken ahead of its completion - completions only count. A bulk pipe keeps one receive pending and sends what the ring holds.

Member Enumeration Documentation

◆ type

enum dxd::usb::pipe::type
inherited

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
control 
isoc 
bulk 
interrupt 

Constructor & Destructor Documentation

◆ pipe()

template<typename device_t>
dxd::usb::stream::pipe<device_t>::pipe(device_t& device, unsigned int idx, size_t size)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~pipe()

template<typename device_t>
dxd::usb::stream::pipe<device_t>::~pipe()
inlineoverridevirtual

Reimplemented from dxd::usb::pipe.

Here is the call graph for this function:

Member Function Documentation

◆ allocate()

template<typename device_t>
os_result dxd::usb::stream::pipe<device_t>::allocate(const struct desc_t::stream::config* active)
inlineoverride

binds the pipe to the given stream configuration off its descriptors, the ring's memory kept: the endpoint, the packets and the slots over them, the sink's own feedback endpoint, the ring's size - the bus's alternate setting is the session's, its charge selects it. The binding stands complete ahead of replacing the pipe's, so a pipe a session runs, a stream off or a binding without memory keeps the one it has; the device's configuration is not asked, its server binds ahead of the commit

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

◆ clear()

os_result dxd::usb::pipe::clear()
inlineinherited

WDK pipe stall reset, toggle.

◆ direction()

direction dxd::usb::pipe::direction() const
inlineinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ free()

template<typename device_t>
void dxd::usb::stream::pipe<device_t>::free()
inline

what the binding to a stream configuration holds - the ring's memory stays

Here is the caller graph for this function:

◆ max_frame_size()

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

◆ open()

os_result dxd::usb::pipe::open(const ::USBD_INTERFACE_INFORMATION* usbd_interface)
inlineinherited

binds the pipe to the endpoint's pipe of the given interface setting: a re-selected alternate setting renews the handles

◆ operator ::USBD_PIPE_HANDLE()

dxd::usb::pipe::operator ::USBD_PIPE_HANDLE() const
inlineinherited

◆ receive() [1/2]

os_result dxd::usb::pipe::receive(::MDL* mdl)
inlineinherited

WDK: USB asynchronous irq/bulk receive request.

Here is the call graph for this function:

◆ receive() [2/2]

os_result dxd::usb::pipe::receive(::MDL* mdl, uint64_t& sequence, isoc_frame* frame, unsigned int frames)
inlineinherited
Parameters
mdlmemory descriptor of the data to be read
Here is the call graph for this function:

◆ transmit() [1/2]

os_result dxd::usb::pipe::transmit(const ::MDL* mdl)
inlineinherited

WDK: USB asynchronous irq/bulk transmit request.

Here is the call graph for this function:

◆ transmit() [2/2]

os_result dxd::usb::pipe::transmit(const ::MDL* mdl, uint64_t& sequence, isoc_frame* frame, unsigned int frames)
inlineinherited
Parameters
mdlmemory descriptor of the data to be written
Here is the call graph for this function:

◆ type()

type dxd::usb::pipe::type() const
inlineinherited

◆ write() [1/3]

os_result dxd::usb::pipe::write(const ::MDL* mdl) const
inlineinherited

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() [2/3]

template<typename data_t>
os_result dxd::usb::pipe::write(const data_t& data) const
inlineinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write() [3/3]

os_result dxd::usb::pipe::write(const void* data, size_t size) const
inlineinherited

◆ dx::usb::isoc::pipeline<pipe>

template<typename device_t>
friend class dx::usb::isoc::pipeline<pipe>
friend

◆ dx::usb::isoc::session<group<device_t>>

template<typename device_t>
friend struct dx::usb::isoc::session<group<device_t>>
friend

◆ group<device_t>

template<typename device_t>
friend class group<device_t>
friend

Member Data Documentation

◆ address

unsigned char dxd::usb::pipe::address
inherited

◆ frame_size

unsigned short dxd::usb::pipe::frame_size{}
inherited

◆ interval

unsigned char dxd::usb::pipe::interval{1}
inherited

◆ status

os_result dxd::usb::pipe::status{not_initialized}
inherited

WDK pipe status.


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