dxd - dynax driver framework 2.1.0d71
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::stream::device< desc_t > Class Template Reference

#include <dx_stream_device.h>

+ Inheritance diagram for dx::stream::device< desc_t >:
+ Collaboration diagram for dx::stream::device< desc_t >:

Classes

struct  property
 

Public Types

typedef ::io_service_t creator
 
typedef desc_t desc
 

Public Member Functions

 catch (...)
 
 catch (...)
 
 catch (...)
 
 catch (...)
 
 catch (...)
 
 catch (dx::exception &exception)
 
 catch (dx::exception &exception)
 
 catch (dx::exception &exception)
 
 catch (dx::exception &exception)
 
virtual void conclude ()
 conclude notifacation: device will be removed from tree
 
virtual void conclude () noexcept
 conclude notification: device will be removed from tree
 
auto count () const noexcept
 
void ctl (uint32_t ioctl) const
 
void ctl (unsigned int ioctl) const
 
 device (generic::driver &driver, const typename super::creator &creator)
 
 dx_catchall (iosize_persistence_helper(iosize);) int32_t iosize() const try
 retrieve iosize; first try from kernel device/persistence store; fallback to user mode store
 
 dx_catchall_rethrow () int32_t iosize(uint32_t iosize
 set kernel mode HW clock event (also stores iosize persistently)
 
 dx_catchall_rethrow () virtual std
 
 dx_catchall_rethrow (, "name: %s, access rights: %x, sharing options:%x", name, access, share)
 
 dx_catchall_rethrow (iosize_persistence_helper(iosize);) int32_t iosize(uint32_t iosize) noexcept try
 persistently save iosize; first try to submit to kernel device/persistence store; fallback to user mode store
 
 dx_catchall_rethrow (preference[property::safety_offset[direction]]=safety_offset;) uint32_t safety_offset(direction direction) const try
 
registryerase (const char *key=nullptr)
 
::CFTypeRef get (::CFStringRef key) const
 
template<typename value_t , typename = cf::enable_if_convertible<value_t>>
value_t get (::CFStringRef key) const
 
::CFTypeRef get (::CFStringRef key, ::CFTypeRef dflt) const noexcept
 
template<typename value_t , typename = cf::enable_if_convertible<value_t>>
value_t get (::CFStringRef key, ::CFTypeRef dflt) const noexcept
 
template<typename value_t , typename = cf::enable_if_convertible<value_t>>
value_t get (::CFStringRef key, value_t dflt) const noexcept
 
template<typename key_t , typename = cf::enable_if_convertible<key_t>>
::CFTypeRef get (key_t key) const
 
template<typename key_t , typename value_t , typename = cf::enable_if_convertible<key_t>, typename = cf::enable_if_convertible<value_t>>
value_t get (key_t key) const
 
template<typename rx_t >
rx_t ictl (uint32_t ioctl) const
 member ioctl
 
template<typename rx_t >
size_t ictl (uint32_t ioctl, rx_t &rx) const
 
template<typename rx_t >
rx_t ictl (unsigned int ioctl) const
 Windows: member ioctl.
 
template<typename rx_t >
size_t ictl (unsigned int ioctl, rx_t &rx) const
 
void initialize (const char *name, ::DWORD access=GENERIC_READ|GENERIC_WRITE, ::DWORD share=FILE_SHARE_READ|FILE_SHARE_WRITE) try
 (re-)initialization the underlaying windows API is CreateFile(). for detailed information see http://msdn.microsoft.com/en-us/library/aa363858(VS.85).aspx
 
void initialize (const char *path, ::HKEY root, ::REGSAM rights=KEY_READ, const char *key=nullptr)
 
void initialize (const char *path, ::REGSAM rights=KEY_READ, ::HKEY root=HKEY_CURRENT_USER, const char *key=nullptr)
 
template<typename rx_t , typename tx_t >
rx_t ioctl (uint32_t ioctl, const tx_t &tx) const
 
template<typename rx_t , typename tx_t >
size_t ioctl (uint32_t ioctl, const tx_t &tx, rx_t &rx) const
 
size_t ioctl (uint32_t ioctl, const void *tx=nullptr, size_t tx_size=0, void *rx=nullptr, size_t rx_size=0) const
 
template<typename rx_t , typename tx_t >
rx_t ioctl (unsigned int ioctl, const tx_t &tx) const
 
template<typename tx_t , typename rx_t >
size_t ioctl (unsigned int ioctl, const tx_t &tx, rx_t &rx) const
 
virtual void launch ()
 launch notification: device mounted in tree and ready to use
 
virtual void launch ()
 launch notifacation: device mounted in tree and ready to use
 
bool monitor () const try
 
template<typename monitor_t = dx::stream::clock::monitor>
monitor_t * monitor () try
 
template<typename tx_t >
void octl (uint32_t ioctl, const tx_t &tx) const
 
template<typename tx_t >
void octl (unsigned int ioctl, const tx_t &tx) const
 
 operator const io_registry_entry_t & () const noexcept
 auto converter into const io_object
 
 operator io_registry_entry_t & () noexcept
 auto converter into io_object
 
 operator io_registry_entry_t * () noexcept
 auto converter into io_object pointer
 
 operator std::string () const
 
 operator uint64_t () const
 
template<typename value_t >
 operator value_t () const
 
template<typename value_t >
value_t operator() (value_t dflt) const
 
 operator::CFMutableDictionaryRef () const
 
 operator::CFStringRef () const
 
 operator::HKEY () const noexcept
 
bool operator== (io_registry_entry_t io_object) const noexcept
 
::CFTypeRef operator[] (::CFStringRef key) const
 
registry operator[] (const char *key) const
 
template<typename key_t , typename = cf::enable_if_convertible<key_t>>
::CFTypeRef operator[] (key_t key) const
 
devicereset ()
 
referenceretain ()
 
uint32_t safety_offset (direction direction, uint32_t safety_offset) try
 
registryset (::CFStringRef key, ::CFTypeRef value) noexcept
 
template<typename value_t , typename = cf::enable_if_convertible<value_t>>
registryset (::CFStringRef key, value_t value)
 
registryset (::CFTypeRef properties)
 Setting properties in a registry entry is not generally supported, it is more common to support setting of properties of the connection based property setting of dx::device.
 
template<typename key_t , typename = cf::enable_if_convertible<key_t>>
registryset (key_t key, ::CFTypeRef value)
 
template<typename key_t , typename value_t , typename = cf::enable_if_convertible<key_t>, typename = cf::enable_if_convertible<value_t>>
registryset (key_t key, value_t value)
 
void stop () try
 
uint32_t version () const try
 

Public Attributes

generic::driverdriver
 
bool launched = false
 
cf::preference preference
 
registry preference
 
os_event event try
 

Protected Attributes

struct { 
 
   cf::type< const char * >   bundle_id 
 
   cf::type< const char * >   class_name 
 
kernel 
 
io::port port
 

Member Typedef Documentation

◆ creator

typedef ::io_service_t dx::device::creator
inherited

◆ desc

template<typename desc_t >
typedef desc_t dx::stream::device< desc_t >::desc

Constructor & Destructor Documentation

◆ device()

template<typename desc_t >
dx::stream::device< desc_t >::device ( generic::driver & driver,
const typename super::creator & creator )
inline
+ Here is the call graph for this function:

Member Function Documentation

◆ catch() [1/9]

template<typename desc_t >
dx::stream::device< desc_t >::catch ( ...)
inline

◆ catch() [2/9]

template<typename desc_t >
dx::stream::device< desc_t >::catch ( ...)
inline

◆ catch() [3/9]

template<typename desc_t >
dx::stream::device< desc_t >::catch ( ...)
inline

◆ catch() [4/9]

template<typename desc_t >
dx::stream::device< desc_t >::catch ( ...)
inline

◆ catch() [5/9]

template<typename desc_t >
dx::stream::device< desc_t >::catch ( ...)
inline

◆ catch() [6/9]

template<typename desc_t >
dx::stream::device< desc_t >::catch ( dx::exception & exception)
inline

◆ catch() [7/9]

template<typename desc_t >
dx::stream::device< desc_t >::catch ( dx::exception & exception)
inline

◆ catch() [8/9]

template<typename desc_t >
dx::stream::device< desc_t >::catch ( dx::exception & exception)
inline

◆ catch() [9/9]

template<typename desc_t >
dx::stream::device< desc_t >::catch ( dx::exception & exception)
inline

◆ conclude() [1/2]

virtual void dx::device::conclude ( )
inlinevirtualinherited

conclude notifacation: device will be removed from tree

◆ conclude() [2/2]

virtual void dx::device::conclude ( )
inlinevirtualnoexceptinherited

conclude notification: device will be removed from tree

+ Here is the caller graph for this function:

◆ count()

auto dx::io::reference< io_registry_entry_t >::count ( ) const
inlinenoexceptinherited

◆ ctl() [1/2]

void dx::device::ctl ( uint32_t ioctl) const
inlineinherited

◆ ctl() [2/2]

void dx::device::ctl ( unsigned int ioctl) const
inlineinherited

◆ dx_catchall()

template<typename desc_t >
dx::stream::device< desc_t >::dx_catchall ( iosize_persistence_helper(iosize); ) const
inline

retrieve iosize; first try from kernel device/persistence store; fallback to user mode store

◆ dx_catchall_rethrow() [1/5]

template<typename desc_t >
dx::stream::device< desc_t >::dx_catchall_rethrow ( )

set kernel mode HW clock event (also stores iosize persistently)

◆ dx_catchall_rethrow() [2/5]

template<typename desc_t >
dx::stream::device< desc_t >::dx_catchall_rethrow ( )
inline

◆ dx_catchall_rethrow() [3/5]

dx::file::dx_catchall_rethrow ( "name: % s,
access rights:% x,
sharing options:%x" ,
name ,
access ,
share  )
inherited

◆ dx_catchall_rethrow() [4/5]

template<typename desc_t >
dx::stream::device< desc_t >::dx_catchall_rethrow ( iosize_persistence_helper(iosize); )
inlinenoexcept

persistently save iosize; first try to submit to kernel device/persistence store; fallback to user mode store

◆ dx_catchall_rethrow() [5/5]

template<typename desc_t >
dx::stream::device< desc_t >::dx_catchall_rethrow ( preference] [property::safety_offset[direction] = safety_offset;) const
inline

◆ erase()

registry & dx::registry::erase ( const char * key = nullptr)
inlineinherited
Todo
registry::erase(): investigate why it's not working

◆ get() [1/7]

::CFTypeRef dx::io::registry::get ( ::CFStringRef key) const
inlineinherited
+ Here is the caller graph for this function:

◆ get() [2/7]

template<typename value_t , typename = cf::enable_if_convertible<value_t>>
value_t dx::io::registry::get ( ::CFStringRef key) const
inlineinherited
+ Here is the call graph for this function:

◆ get() [3/7]

::CFTypeRef dx::io::registry::get ( ::CFStringRef key,
::CFTypeRef dflt ) const
inlinenoexceptinherited

◆ get() [4/7]

template<typename value_t , typename = cf::enable_if_convertible<value_t>>
value_t dx::io::registry::get ( ::CFStringRef key,
::CFTypeRef dflt ) const
inlinenoexceptinherited
+ Here is the call graph for this function:

◆ get() [5/7]

template<typename value_t , typename = cf::enable_if_convertible<value_t>>
value_t dx::io::registry::get ( ::CFStringRef key,
value_t dflt ) const
inlinenoexceptinherited
+ Here is the call graph for this function:

◆ get() [6/7]

template<typename key_t , typename = cf::enable_if_convertible<key_t>>
::CFTypeRef dx::io::registry::get ( key_t key) const
inlineinherited
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get() [7/7]

template<typename key_t , typename value_t , typename = cf::enable_if_convertible<key_t>, typename = cf::enable_if_convertible<value_t>>
value_t dx::io::registry::get ( key_t key) const
inlineinherited
+ Here is the call graph for this function:

◆ ictl() [1/4]

template<typename rx_t >
rx_t dx::device::ictl ( uint32_t ioctl) const
inlineinherited

member ioctl

this member retreives data from the device by providing an IOCTL code. the template argument defines the type of data to be retreived. this member is intended as a convinient way to retreive only small amounts of data since there is an intermediate stack copy involved in returning the data.

+ Here is the caller graph for this function:

◆ ictl() [2/4]

template<typename rx_t >
size_t dx::device::ictl ( uint32_t ioctl,
rx_t & rx ) const
inlineinherited

◆ ictl() [3/4]

template<typename rx_t >
rx_t dx::device::ictl ( unsigned int ioctl) const
inlineinherited

Windows: member ioctl.

this member retreives data from the device by providing an IOCTL code. the template argument defines the type of data to be retreived. this member is intended as a convinient way to retreive only small amounts of data since there is an intermediate stack copy involved in returning the data.

the underlaying windows API is DeviceIoControl(). for detailed information see http://msdn.microsoft.com/en-us/library/aa363216(VS.85).aspx

Exceptions
n/amicrosoft does not give information about what possible errors values are provided by its OS other than
ERROR_INSUFFICIENT_BUFFERif the output buffer is too small to receive any data

◆ ictl() [4/4]

template<typename rx_t >
size_t dx::device::ictl ( unsigned int ioctl,
rx_t & rx ) const
inlineinherited

◆ initialize() [1/3]

void dx::file::initialize ( const char * name,
::DWORD access = GENERIC_READ| GENERIC_WRITE,
::DWORD share = FILE_SHARE_READ| FILE_SHARE_WRITE )
inlineinherited

(re-)initialization the underlaying windows API is CreateFile(). for detailed information see http://msdn.microsoft.com/en-us/library/aa363858(VS.85).aspx

Exceptions
n/amicrosoft does not give information about what possible errors values are provided by its OS
+ Here is the caller graph for this function:

◆ initialize() [2/3]

void dx::registry::initialize ( const char * path,
::HKEY root,
::REGSAM rights = KEY_READ,
const char * key = nullptr )
inlineinherited
+ Here is the caller graph for this function:

◆ initialize() [3/3]

void dx::registry::initialize ( const char * path,
::REGSAM rights = KEY_READ,
::HKEY root = HKEY_CURRENT_USER,
const char * key = nullptr )
inlineinherited

◆ ioctl() [1/5]

template<typename rx_t , typename tx_t >
rx_t dx::device::ioctl ( uint32_t ioctl,
const tx_t & tx ) const
inlineinherited

◆ ioctl() [2/5]

template<typename rx_t , typename tx_t >
size_t dx::device::ioctl ( uint32_t ioctl,
const tx_t & tx,
rx_t & rx ) const
inlineinherited
+ Here is the caller graph for this function:

◆ ioctl() [3/5]

size_t dx::device::ioctl ( uint32_t ioctl,
const void * tx = nullptr,
size_t tx_size = 0,
void * rx = nullptr,
size_t rx_size = 0 ) const
inlineinherited

◆ ioctl() [4/5]

template<typename rx_t , typename tx_t >
rx_t dx::device::ioctl ( unsigned int ioctl,
const tx_t & tx ) const
inlineinherited

◆ ioctl() [5/5]

template<typename tx_t , typename rx_t >
size_t dx::device::ioctl ( unsigned int ioctl,
const tx_t & tx,
rx_t & rx ) const
inlineinherited

◆ launch() [1/2]

virtual void dx::device::launch ( )
inlinevirtualinherited

launch notification: device mounted in tree and ready to use

Reimplemented in dx::usb::stream::device< desc_t >.

◆ launch() [2/2]

virtual void dx::device::launch ( )
inlinevirtualinherited

launch notifacation: device mounted in tree and ready to use

Reimplemented in dx::usb::stream::device< desc_t >.

◆ monitor() [1/2]

template<typename desc_t >
bool dx::stream::device< desc_t >::monitor ( ) const
inline
+ Here is the caller graph for this function:

◆ monitor() [2/2]

template<typename desc_t >
template<typename monitor_t = dx::stream::clock::monitor>
monitor_t * dx::stream::device< desc_t >::monitor ( )
inline

◆ octl() [1/2]

template<typename tx_t >
void dx::device::octl ( uint32_t ioctl,
const tx_t & tx ) const
inlineinherited
+ Here is the caller graph for this function:

◆ octl() [2/2]

template<typename tx_t >
void dx::device::octl ( unsigned int ioctl,
const tx_t & tx ) const
inlineinherited

◆ operator const io_registry_entry_t &()

dx::io::reference< io_registry_entry_t >::operator const io_registry_entry_t & ( ) const
inlinenoexceptinherited

auto converter into const io_object

◆ operator io_registry_entry_t &()

dx::io::reference< io_registry_entry_t >::operator io_registry_entry_t & ( )
inlinenoexceptinherited

auto converter into io_object

◆ operator io_registry_entry_t *()

dx::io::reference< io_registry_entry_t >::operator io_registry_entry_t * ( )
inlinenoexceptinherited

auto converter into io_object pointer

◆ operator std::string()

dx::registry::operator std::string ( ) const
inlineinherited

◆ operator uint64_t()

dx::io::registry::operator uint64_t ( ) const
inlineexplicitinherited

◆ operator value_t()

template<typename value_t >
dx::registry::operator value_t ( ) const
inlineinherited

◆ operator()()

template<typename value_t >
value_t dx::registry::operator() ( value_t dflt) const
inlineinherited

◆ operator::CFMutableDictionaryRef()

dx::io::registry::operator::CFMutableDictionaryRef ( ) const
inlineexplicitinherited
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator::CFStringRef()

dx::io::registry::operator::CFStringRef ( ) const
inlineexplicitinherited

◆ operator::HKEY()

dx::registry::operator::HKEY ( ) const
inlinenoexceptinherited

◆ operator==()

bool dx::io::reference< io_registry_entry_t >::operator== ( io_registry_entry_t io_object) const
inlinenoexceptinherited

◆ operator[]() [1/3]

::CFTypeRef dx::io::registry::operator[] ( ::CFStringRef key) const
inlineinherited
+ Here is the call graph for this function:

◆ operator[]() [2/3]

registry dx::registry::operator[] ( const char * key) const
inlineinherited

◆ operator[]() [3/3]

template<typename key_t , typename = cf::enable_if_convertible<key_t>>
::CFTypeRef dx::io::registry::operator[] ( key_t key) const
inlineinherited
+ Here is the call graph for this function:

◆ reset()

template<typename desc_t >
device & dx::stream::device< desc_t >::reset ( )
inline

◆ retain()

reference & dx::io::reference< io_registry_entry_t >::retain ( )
inlineinherited

◆ safety_offset()

template<typename desc_t >
uint32_t dx::stream::device< desc_t >::safety_offset ( direction direction,
uint32_t safety_offset )
inline
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set() [1/5]

registry & dx::device::set ( ::CFStringRef key,
::CFTypeRef value )
inlinenoexceptinherited

◆ set() [2/5]

template<typename value_t , typename = cf::enable_if_convertible<value_t>>
registry & dx::device::set ( ::CFStringRef key,
value_t value )
inlineinherited

◆ set() [3/5]

registry & dx::device::set ( ::CFTypeRef properties)
inlineinherited

Setting properties in a registry entry is not generally supported, it is more common to support setting of properties of the connection based property setting of dx::device.

◆ set() [4/5]

template<typename key_t , typename = cf::enable_if_convertible<key_t>>
registry & dx::device::set ( key_t key,
::CFTypeRef value )
inlineinherited

◆ set() [5/5]

template<typename key_t , typename value_t , typename = cf::enable_if_convertible<key_t>, typename = cf::enable_if_convertible<value_t>>
registry & dx::device::set ( key_t key,
value_t value )
inlineinherited

◆ stop()

template<typename desc_t >
void dx::stream::device< desc_t >::stop ( )
inline
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ version()

template<typename desc_t >
uint32_t dx::stream::device< desc_t >::version ( ) const
inline
+ Here is the caller graph for this function:

Member Data Documentation

◆ bundle_id

cf::type<const char*> dx::device::bundle_id
inherited

◆ class_name

cf::type<const char*> dx::device::class_name
inherited

◆ driver

generic::driver & dx::device::driver
inherited

◆ [struct]

struct { ... } dx::device::kernel

◆ launched

bool dx::device::launched = false
inherited

◆ port

io::port dx::device::port
protectedinherited

◆ preference [1/2]

cf::preference dx::device::preference
inherited

◆ preference [2/2]

registry dx::device::preference
inherited

◆ try

template<typename desc_t >
os_event event dx::stream::device< desc_t >::try
Initial value:
{
return iosize_persistence_helper(
this->template ioctl<int32_t>(ioctl::stream::clock::iosize,
dx::stream::iosize {desc_t::stream[0].config[0].clock.domain, iosize, event}))
@ iosize
set/get clock event iosize
Definition macOS/dx_platform.h:139
uint32_t domain
clock domain bitfield
Definition dx_stream.h:616
Definition dx_stream.h:699
clock clock
Definition dx_stream.h:700

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

(c) copyright 2009 dynamic acoustics e.U. generated on Wed Oct 2 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.