dxd - dynax driver framework  2675
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 Member Functions

 catchall () virtual ~device() noexcept
 the device class destructor More...
 
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
 
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...
 
 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 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
 

Friends

class driver< exception_t, device >
 

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

create and attach runloop source of asynchronous operation

obtain version info

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

opens the USB device

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

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>
dx::usb::device< exception_t >::catchall ( )
inlinenoexcept

the device class destructor

the underlaying IOUSB API is USBDeviceClose().

remark: The io_service reference itself is managed by inherited io::reference

for detailed information see

+ Here is the caller graph for this function:

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

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

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.