dxd - dynax driver framework 2.7.0d222
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::file Class Reference

#include <dx_proxy.h>

Inheritance diagram for dx::file:
Collaboration diagram for dx::file:

Public Member Functions

void ctl (unsigned int ioctl) const
 dx_catchall_rethrow (, "name: %s, access rights: %x, sharing options:%x", name, access, share)
 dx_catchall_rethrow () virtual void free() noexcept
 file (const char *name, ::DWORD access=GENERIC_READ|GENERIC_WRITE, ::DWORD share=FILE_SHARE_READ|FILE_SHARE_WRITE)
 the device class constructor
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
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
template<typename tx_t>
void octl (unsigned int ioctl, const tx_t &tx) const
 operator const os_event () const noexcept
 operator os_event () noexcept
 operator::HANDLE () const noexcept

Protected Attributes

::HANDLE handle = invalid_t
::HANDLE process = ::GetCurrentProcess()

Constructor & Destructor Documentation

◆ file()

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

the device class constructor

Here is the call graph for this function:

Member Function Documentation

◆ ctl()

void dx::file::ctl ( unsigned int ioctl) const
inline
Here is the call graph for this function:

◆ dx_catchall_rethrow() [1/2]

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

◆ dx_catchall_rethrow() [2/2]

template<::HANDLE invalid_t = INVALID_HANDLE_VALUE>
dx::resource< invalid_t >::dx_catchall_rethrow ( )
inlinenoexceptinherited

◆ ictl() [1/2]

template<typename rx_t>
rx_t dx::file::ictl ( unsigned int ioctl) const
inline

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
Template Parameters
rx_ttype of rx_t needs to be explicitly specified as it can't be deduced
Here is the call graph for this function:

◆ ictl() [2/2]

template<typename rx_t>
size_t dx::file::ictl ( unsigned int ioctl,
rx_t & rx ) const
inline
Here is the call graph for this function:

◆ initialize()

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

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

◆ ioctl() [1/2]

template<typename rx_t, typename tx_t>
rx_t dx::file::ioctl ( unsigned int ioctl,
const tx_t & tx ) const
inline
Here is the call graph for this function:

◆ ioctl() [2/2]

template<typename tx_t, typename rx_t>
size_t dx::file::ioctl ( unsigned int ioctl,
const tx_t & tx,
rx_t & rx ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ octl()

template<typename tx_t>
void dx::file::octl ( unsigned int ioctl,
const tx_t & tx ) const
inline
Here is the call graph for this function:

◆ operator const os_event()

template<::HANDLE invalid_t = INVALID_HANDLE_VALUE>
dx::resource< invalid_t >::operator const os_event ( ) const
inlinenoexceptinherited

◆ operator os_event()

template<::HANDLE invalid_t = INVALID_HANDLE_VALUE>
dx::resource< invalid_t >::operator os_event ( )
inlinenoexceptinherited

◆ operator::HANDLE()

template<::HANDLE invalid_t = INVALID_HANDLE_VALUE>
dx::resource< invalid_t >::operator::HANDLE ( ) const
inlinenoexceptinherited
Here is the caller graph for this function:

Member Data Documentation

◆ handle

template<::HANDLE invalid_t = INVALID_HANDLE_VALUE>
::HANDLE dx::resource< invalid_t >::handle = invalid_t
protectedinherited

◆ process

template<::HANDLE invalid_t = INVALID_HANDLE_VALUE>
::HANDLE dx::resource< invalid_t >::process = ::GetCurrentProcess()
protectedinherited

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

(c) copyright 2009 dynamic acoustics e.U. generated on

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.