dxd - dynax driver framework  2675
cross platform open source driver development framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dxd::fw Class Reference

WDK: FireWire device. More...

#include <dxd_fw.h>

+ Inheritance diagram for dxd::fw:
+ Collaboration diagram for dxd::fw:

Classes

class  address
 IOKit: FireWire address space. More...
 
class  phy
 IOKit: FireWire physical address space. More...
 

Public Types

enum  host_property_key { wwuid =::kConfigNodeUniqueIdKey, wwuid =::kConfigNodeUniqueIdKey }
 IOKit: IOFireWireUnit* implicit cast. More...
 
enum  host_property_key { wwuid =::kConfigNodeUniqueIdKey, wwuid =::kConfigNodeUniqueIdKey }
 

Public Member Functions

template<class client_t = ::IOService, typename return_t = os_result, typename exec_arg_t , typename exec_t >
return_t each_child (exec_arg_t exec_arg, exec_t exec)
 apply executor functor for each child More...
 
template<class client_t = ::IOUserClient, typename return_t = os_result, typename exec_arg_t , typename exec_t >
return_t each_client (exec_arg_t exec_arg, exec_t exec)
 apply executor functor for each user client More...
 
 fw (::WDFDEVICE_INIT *wdf_device_init, const ::GUID &guid)
 
template<typename value_t >
os_result host_property (host_property_key, value_t &value)
 
template<>
os_result host_property (host_property_key key, uint64_t &value)
 
template<typename value_t >
os_result host_property (host_property_key, value_t &value)
 
template<>
os_result host_property (host_property_key key, uint64_t &value)
 
virtual os_result ioctl (unsigned int ioctl, const void *in, size_t size_in, void *out, size_t size_out, size_t &size)
 device IOCTL handler More...
 
template<typename tx_t , typename rx_t >
os_result ioctl (unsigned int ioctl, const tx_t &tx, rx_t &rx)
 convenience ioctl accessor for direct inter-kext IOCTL More...
 
template<endian endian_t>
os_result lock_compare_swap (unsigned int src, unsigned int compare, uint64_t space, int64_t timeout=msec)
 submit a synchrous FW lock request More...
 
template<endian endian_t>
os_result lock_compare_swap (unsigned int src, unsigned int compare, uint64_t space, int64_t timeout=msec)
 WDK: submit a synchrous FW lock_compare_swap request. More...
 
os_result notify_clients ()
 
 operator::IOFireWireUnit * () const
 IOKit: IOFireWireUnit* implicit cast. More...
 
 OSDeclareDefaultStructors (fw)
 
template<typename type_t >
os_result property (const char *key, type_t &value) const
 provider property request More...
 
template<typename type_t >
os_result query (const char *key, type_t &value)
 device property request More...
 
template<>
os_result query (const char *key, unsigned int &value)
 (defined(doxygen)||defined(DXD_EXTERN)) More...
 
template<endian endian_t>
os_result read32 (unsigned int &dst, uint64_t space, int64_t timeout=msec)
 
template<dx::scope scope_t, endian endian_t>
os_result read32 (unsigned int *dst, size_t size32, uint64_t space, int64_t timeout=msec)
 
template<endian endian_t>
os_result read32 (unsigned int &dst, uint64_t space, int64_t timeout=msec)
 
template<dx::scope scope_t, endian endian_t>
os_result read32 (unsigned int *dst, size_t size32, uint64_t space, int64_t timeout=msec)
 
template<>
os_result read32 (unsigned int *dst, size_t size32, uint64_t space, int64_t timeout)
 WDK: synchronously submit an firewire async swapped data read request. More...
 
template<>
os_result read32 (unsigned int *dst, size_t size32, uint64_t space, int64_t timeout)
 WDK: synchronously submit an firewire async read request. More...
 
os_result set (const char *key, unsigned int value)
 
template<endian endian_t>
os_result write32 (unsigned int src, uint64_t space, int64_t timeout=msec)
 
template<dx::scope scope_t, endian endian_t>
os_result write32 (const unsigned int *src, size_t size32, uint64_t space, int64_t timeout=msec)
 
template<endian endian_t>
os_result write32 (unsigned int src, uint64_t space, int64_t timeout=msec)
 
template<dx::scope scope_t, endian endian_t>
os_result write32 (const unsigned int *src, size_t size32, uint64_t space, int64_t timeout=msec)
 
template<>
os_result write32 (const unsigned int *src, size_t size32, uint64_t space, int64_t timeout)
 WDK: synchronously submit an firewire async swapped data write request. More...
 
template<>
os_result write32 (const unsigned int *src, size_t size32, uint64_t space, int64_t timeout)
 WDK: synchronously submit an firewire async write request. More...
 

Protected Member Functions

virtual os_result busreset ()
 WDK: virtual bus reset indication. More...
 
os_result launch () override
 IOKit: Main driver entry. More...
 
virtual os_result launch ()
 WDK: Main driver entry. More...
 
virtual os_result sleep ()
 WDK: firewire device deinitialization virtual method. More...
 
virtual os_result wake ()
 WDK: firewire device PNP wake virtual method. More...
 

Detailed Description

WDK: FireWire device.

IOKit: FireWire device.

Member Enumeration Documentation

IOKit: IOFireWireUnit* implicit cast.

Enumerator
wwuid 
wwuid 
Enumerator
wwuid 
wwuid 

Constructor & Destructor Documentation

dxd::fw::fw ( ::WDFDEVICE_INIT *  wdf_device_init,
const ::GUID &  guid 
)
inline

Registers PNP capabilities

+ Here is the caller graph for this function:

Member Function Documentation

virtual os_result dxd::fw::busreset ( )
inlineprotectedvirtual

WDK: virtual bus reset indication.

template<class client_t = ::IOService, typename return_t = os_result, typename exec_arg_t , typename exec_t >
return_t dxd::device::each_child ( exec_arg_t  exec_arg,
exec_t  exec 
)
inlineinherited

apply executor functor for each child

template<class client_t = ::IOUserClient, typename return_t = os_result, typename exec_arg_t , typename exec_t >
return_t dxd::device::each_client ( exec_arg_t  exec_arg,
exec_t  exec 
)
inlineinherited

apply executor functor for each user client

template<typename value_t >
os_result dxd::fw::host_property ( host_property_key  ,
value_t &  value 
)
template<>
os_result dxd::fw::host_property ( host_property_key  key,
uint64_t value 
)

Checks for valid fw unit object,

template<typename value_t >
os_result dxd::fw::host_property ( host_property_key  ,
value_t &  value 
)
template<>
os_result dxd::fw::host_property ( host_property_key  key,
uint64_t value 
)
inline
virtual os_result dxd::device::ioctl ( unsigned int  ioctl,
const void *  in,
size_t  size_in,
void *  out,
size_t  size_out,
size_t &  size 
)
inlinevirtualinherited

device IOCTL handler

virtual ioctl() gets called by the dynax driver framework for device IOCTL handling.

remark: this is rarely done. usually IOCTLs are handled in the user client derivate.

Parameters
ioctlIOCTL
inbuffer pointer containing data from user mode
size_insize of the buffer containing data from user mode
outbuffer pointer accepting data to be returned to user mode
size_outsize of the buffer accepting data to be returned to user mode
sizeactual size of data to be returned to user mode

Reimplemented in dxd::usb_stream.

+ Here is the caller graph for this function:

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

convenience ioctl accessor for direct inter-kext IOCTL

+ Here is the call graph for this function:

os_result dxd::fw::launch ( )
inlineoverrideprotectedvirtual

IOKit: Main driver entry.

launch() is one of the dynax driver frameword-supplied routines that is called after this driver is loaded. It is responsible for initializing the driver.

creates a bus reset timer event source and

attaches the timer event to workloop.

Reimplemented from dxd::device.

virtual os_result dxd::fw::launch ( )
inlineprotectedvirtual

WDK: Main driver entry.

Creates the underlaying WDK IO target and

obtains the current generation count (workaround for device access during launch)

Reimplemented from dxd::device.

template<endian endian_t>
os_result dxd::fw::lock_compare_swap ( unsigned int  src,
unsigned int  compare,
uint64_t  space,
int64_t  timeout = msec 
)
inline

submit a synchrous FW lock request

Checks for valid fw unit object,

+ Here is the call graph for this function:

template<endian endian_t>
os_result dxd::fw::lock_compare_swap ( unsigned int  src,
unsigned int  compare,
uint64_t  space,
int64_t  timeout = msec 
)
inline

WDK: submit a synchrous FW lock_compare_swap request.

constructs the appropriate irb and submits it to the lower device

Todo:
swap template
os_result dxd::device::notify_clients ( )
inlineinherited
dxd::fw::operator::IOFireWireUnit * ( ) const
inline

IOKit: IOFireWireUnit* implicit cast.

dxd::fw::OSDeclareDefaultStructors ( fw  )
template<typename type_t >
os_result dxd::device::property ( const char *  key,
type_t &  value 
) const
inlineinherited

provider property request

try if property is an OSString

or, try to get it as OSData

+ Here is the caller graph for this function:

template<typename type_t >
os_result dxd::device::query ( const char *  key,
type_t &  value 
)
inherited

device property request

device string property request

Todo:
move into property class

try if property is an OSString

get it as OSData

+ Here is the call graph for this function:

template<>
os_result dxd::device::query ( const char *  key,
unsigned int &  value 
)
inherited

(defined(doxygen)||defined(DXD_EXTERN))

device integer property request

template<endian endian_t>
os_result dxd::fw::read32 ( unsigned int &  dst,
uint64_t  space,
int64_t  timeout = msec 
)
inline

Checks for valid fw unit object,

+ Here is the call graph for this function:

template<dx::scope scope_t, endian endian_t>
os_result dxd::fw::read32 ( unsigned int *  dst,
size_t  size32,
uint64_t  space,
int64_t  timeout = msec 
)
template<endian endian_t>
os_result dxd::fw::read32 ( unsigned int &  dst,
uint64_t  space,
int64_t  timeout = msec 
)
inline

creates a memory object from kernel stack,

checks the kernel buffer memory object,

constructs the appropriate irb and submits it to the lower device

and swaps the returned data.

+ Here is the call graph for this function:

template<dx::scope scope_t, endian endian_t>
os_result dxd::fw::read32 ( unsigned int *  dst,
size_t  size32,
uint64_t  space,
int64_t  timeout = msec 
)
template<>
os_result dxd::fw::read32 ( unsigned int *  dst,
size_t  size32,
uint64_t  space,
int64_t  timeout 
)

WDK: synchronously submit an firewire async swapped data read request.

Create a memory object from kernel originated pointer:size

checks the kernel memory object,

constructs the appropriate irb and submits it to the lower device,

swaps the received data.

template<>
os_result dxd::fw::read32 ( unsigned int *  dst,
size_t  size32,
uint64_t  space,
int64_t  timeout 
)

WDK: synchronously submit an firewire async read request.

Create a memory object from kernel originated pointer:size

checks the kernel memory object,

constructs the appropriate irb and submits it to the lower device

os_result dxd::device::set ( const char *  key,
unsigned int  value 
)
inlineinherited
virtual os_result dxd::fw::sleep ( )
inlineprotectedvirtual

WDK: firewire device deinitialization virtual method.

Deregisters the bus reset notification handler.

Reimplemented from dxd::device.

virtual os_result dxd::fw::wake ( )
inlineprotectedvirtual

WDK: firewire device PNP wake virtual method.

Obtains the current generation count and

registers the bus reset notification handler.

Reimplemented from dxd::device.

template<endian endian_t>
os_result dxd::fw::write32 ( unsigned int  src,
uint64_t  space,
int64_t  timeout = msec 
)
inline

Checks for valid fw unit object,

+ Here is the call graph for this function:

template<dx::scope scope_t, endian endian_t>
os_result dxd::fw::write32 ( const unsigned int *  src,
size_t  size32,
uint64_t  space,
int64_t  timeout = msec 
)
template<endian endian_t>
os_result dxd::fw::write32 ( unsigned int  src,
uint64_t  space,
int64_t  timeout = msec 
)
inline

create a memory object from kernel stack location

check kernel buffer memory object

swap value

constructs the appropriate irb and submits it to the lower device

+ Here is the call graph for this function:

template<dx::scope scope_t, endian endian_t>
os_result dxd::fw::write32 ( const unsigned int *  src,
size_t  size32,
uint64_t  space,
int64_t  timeout = msec 
)
template<>
os_result dxd::fw::write32 ( const unsigned int *  src,
size_t  size32,
uint64_t  space,
int64_t  timeout 
)

WDK: synchronously submit an firewire async swapped data write request.

Creates an intermediate swap buffer memory object,

checks the buffer creation status,

swaps the data into the newly constructed buffer,

constructs the appropriate irb and submits it to the lower device.

template<>
os_result dxd::fw::write32 ( const unsigned int *  src,
size_t  size32,
uint64_t  space,
int64_t  timeout 
)

WDK: synchronously submit an firewire async write request.

Create a memory object from kernel originated pointer:size

checks the kernel memory object,

constructs the appropriate irb and submits it to the lower device.


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.