dxd - dynax driver framework  2719
cross platform open source driver development framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dx::usb::device< exception_t > Class Template Reference

#include <dx_usb_device.h>

+ Inheritance diagram for dx::usb::device< exception_t >:
+ Collaboration diagram for dx::usb::device< exception_t >:

Classes

struct  request
 

Public Types

enum  speed : unsigned char {
  low =::kUSBDeviceSpeedLow, full =::kUSBDeviceSpeedFull, high =::kUSBDeviceSpeedHigh, super =::kUSBDeviceSpeedSuper,
  usb1 =full, usb2 =high, usb3 =super
}
 

Public Member Functions

void close () noexcept
 
virtual void conclude () noexcept
 conclude notification: device will be removed from tree More...
 
void configuration (unsigned char configuration) throw (exception_t)
 
unsigned char configuration () const throw (exception_t)
 
unsigned char configurations () const throw (exception_t)
 
 device (::io_service_t io_service) throw (exception_t)
 the device class constructor More...
 
virtual void exception (const exception_t &) noexcept try
 
uint64_t frame () const
 
void initialize (::IOCFPlugInInterface **cf_interface,::CFUUIDRef uuid) throw (exception_t)
 
void initialize (io_object_t io_object,::CFUUIDRef type,::CFUUIDRef uuid) throw (exception_t)
 
virtual void launch () throw (exception_t)
 launch notification: device mounted in tree and ready to use More...
 
void open () throw (exception_t)
 opens the USB device for exclusice access More...
 
 operator const ::io_service_t & () const
 auto converter into const object More...
 
::IOUSBDeviceInterface650 * operator-> () const
 
 operator::io_service_t & ()
 auto converter into object More...
 
 operator::io_service_t * ()
 auto converter into object pointer More...
 
 operator::IOUSBDeviceInterface650 ** () const
 
bool operator== (::io_service_t io_service) const noexcept
 
void reenumerate () throw (exception_t)
 
void reset () throw (exception_t)
 
template<size_t size = 0x100>
std::string string (unsigned char idx) const throw (exception_t)
 
template<typename data_t >
void submit (const request< data_t > &request) const throw (exception_t)
 
template<typename data_t >
data_t submit (const control &control) const throw (exception_t)
 

Public Attributes

typedef::io_service_t creator
 
std::deque< interface
< exception_t > > 
interface
 
enum dx::usb::device::speed speed
 

Friends

class driver< exception_t, device >
 

Member Enumeration Documentation

template<typename exception_t = os_result>
enum dx::usb::device::speed : unsigned char
Todo:
enum class
Enumerator
low 
full 
high 
super 
usb1 
usb2 
usb3 

Constructor & Destructor Documentation

template<typename exception_t = os_result>
dx::usb::device< exception_t >::device ( ::io_service_t  io_service)
throw (exception_t
)
inline

the device class constructor

Exceptions
kIOReturnNoMemory means that the system couldn't allocate the class defined in the drivers plist, or nub which ever its trying connecting to

obtain version info

assignes UID (a textual unique device path from the IORegistry plane),

fills out the USB device descriptor (there isn't a macOS retrieval function!)

statically gets the device speed

sets up request for device descriptor

iterate over all USB interfaces and create and insert in std::set

Parameters
io_servicethe IOService object to open the device connection for. This will be hold (but not retained) during device class lifetime

Member Function Documentation

template<typename exception_t = os_result>
void dx::usb::device< exception_t >::close ( )
inlinenoexcept
template<typename exception_t = os_result>
virtual void dx::usb::device< exception_t >::conclude ( )
inlinevirtualnoexcept

conclude notification: device will be removed from tree

template<typename exception_t = os_result>
void dx::usb::device< exception_t >::configuration ( unsigned char  configuration)
throw (exception_t
)
inline
Todo:
manage device open/(close) and interface re-initialization
template<typename exception_t = os_result>
unsigned char dx::usb::device< exception_t >::configuration ( ) const
throw (exception_t
)
inline

+ Here is the caller graph for this function:

template<typename exception_t = os_result>
unsigned char dx::usb::device< exception_t >::configurations ( ) const
throw (exception_t
)
inline
template<typename exception_t = os_result>
virtual void dx::usb::device< exception_t >::exception ( const exception_t &  )
inlinevirtualnoexcept
template<typename exception_t = os_result>
uint64_t dx::usb::device< exception_t >::frame ( ) const
inline

+ Here is the caller graph for this function:

void dx::cf::interface< ::IOUSBDeviceInterface650 , exception_t >::initialize ( ::IOCFPlugInInterface **  cf_interface,
::CFUUIDRef  uuid 
)
throw (exception_t
)
inlineinherited
void dx::cf::interface< ::IOUSBDeviceInterface650 , exception_t >::initialize ( io_object_t  io_object,
::CFUUIDRef  type,
::CFUUIDRef  uuid 
)
throw (exception_t
)
inlineinherited
template<typename exception_t = os_result>
virtual void dx::usb::device< exception_t >::launch ( )
throw (exception_t
)
inlinevirtual

launch notification: device mounted in tree and ready to use

template<typename exception_t = os_result>
void dx::usb::device< exception_t >::open ( )
throw (exception_t
)
inline

opens the USB device for exclusice access

dx::io::reference< ::io_service_t >::operator const ::io_service_t & ( ) const
inlineinherited

auto converter into const object

::IOUSBDeviceInterface650 * dx::cf::interface< ::IOUSBDeviceInterface650 , exception_t >::operator-> ( ) const
inlineinherited
dx::io::reference< ::io_service_t >::operator ::io_service_t & ( )
inlineinherited

auto converter into object

dx::io::reference< ::io_service_t >::operator ::io_service_t * ( )
inlineinherited

auto converter into object pointer

dx::cf::interface< ::IOUSBDeviceInterface650 , exception_t >::operator ::IOUSBDeviceInterface650 ** ( ) const
inlineinherited
template<typename exception_t = os_result>
bool dx::usb::device< exception_t >::operator== ( ::io_service_t  io_service) const
inlinenoexcept
template<typename exception_t = os_result>
void dx::usb::device< exception_t >::reenumerate ( )
throw (exception_t
)
inline
template<typename exception_t = os_result>
void dx::usb::device< exception_t >::reset ( )
throw (exception_t
)
inline
template<typename exception_t = os_result>
template<size_t size = 0x100>
std::string dx::usb::device< exception_t >::string ( unsigned char  idx) const
throw (exception_t
)
inline
template<typename exception_t = os_result>
template<typename data_t >
void dx::usb::device< exception_t >::submit ( const request< data_t > &  request) const
throw (exception_t
)
inline

+ Here is the caller graph for this function:

template<typename exception_t = os_result>
template<typename data_t >
data_t dx::usb::device< exception_t >::submit ( const control control) const
throw (exception_t
)
inline

Friends And Related Function Documentation

template<typename exception_t = os_result>
friend class driver< exception_t, device >
friend

Member Data Documentation

template<typename exception_t = os_result>
typedef::io_service_t dx::usb::device< exception_t >::creator
template<typename exception_t = os_result>
std::deque<interface<exception_t> > dx::usb::device< exception_t >::interface
template<typename exception_t = os_result>
enum dx::usb::device::speed dx::usb::device< exception_t >::speed

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

(c) copyright 2009 dynamic acoustics e.U. generated on Tue Apr 23 2019

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.