dxd - dynax driver framework 2.1.0d73
cross platform open source driver development framework
Loading...
Searching...
No Matches
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
 
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
 
 fw (::WDFDEVICE_INIT *wdf_device_init, const::GUID &guid)
 
template<>
os_result host_property (host_property_key key, uint64_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<typename value_t >
os_result host_property (host_property_key, value_t &value)
 
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
 
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
 
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
 
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.
 
os_result notify_clients ()
 
 operator::IOFireWireUnit * () const
 IOKit: IOFireWireUnit* implicit cast.
 
 OSDeclareDefaultStructors (fw)
 
template<typename type_t >
os_result property (const char *key, type_t &value) const
 provider property request
 
template<typename type_t >
os_result query (const char *key, type_t &value)
 device property request
 
template<>
os_result query (const char *key, unsigned int &value)
 (defined(doxygen)||defined(DXD_EXTERN))
 
template<endian endian_t>
os_result read32 (unsigned int &dst, 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<dx::scope scope_t, endian endian_t>
os_result read32 (unsigned int *dst, size_t size32, uint64_t space, int64_t timeout=msec)
 
os_result set (const char *key, unsigned int value)
 
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<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<endian endian_t>
os_result write32 (unsigned int src, uint64_t space, int64_t timeout=msec)
 

Protected Member Functions

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

Detailed Description

WDK: FireWire device.

IOKit: FireWire device.

Member Enumeration Documentation

◆ host_property_key [1/2]

IOKit: IOFireWireUnit* implicit cast.

Enumerator
wwuid 
wwuid 

◆ host_property_key [2/2]

Enumerator
wwuid 
wwuid 

Constructor & Destructor Documentation

◆ fw()

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

Registers PNP capabilities

Member Function Documentation

◆ busreset()

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

WDK: virtual bus reset indication.

◆ each_child()

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

◆ each_client()

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

◆ host_property() [1/4]

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

Checks for valid fw unit object,

◆ host_property() [2/4]

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

◆ host_property() [3/4]

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

◆ host_property() [4/4]

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

◆ ioctl() [1/2]

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

◆ ioctl() [2/2]

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

+ Here is the caller graph for this function:

◆ launch() [1/2]

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.

◆ launch() [2/2]

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.

◆ lock_compare_swap() [1/2]

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:

◆ lock_compare_swap() [2/2]

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

◆ notify_clients()

os_result dxd::device::notify_clients ( )
inlineinherited

◆ operator::IOFireWireUnit *()

dxd::fw::operator::IOFireWireUnit * ( ) const
inline

IOKit: IOFireWireUnit* implicit cast.

◆ OSDeclareDefaultStructors()

dxd::fw::OSDeclareDefaultStructors ( fw )

◆ property()

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:

◆ query() [1/2]

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

◆ query() [2/2]

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

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

device integer property request

◆ read32() [1/4]

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:

◆ read32() [2/4]

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:

◆ read32() [3/4]

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 )

◆ read32() [4/4]

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 )

◆ set()

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

◆ sleep()

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

WDK: firewire device deinitialization virtual method.

Deregisters the bus reset notification handler.

Reimplemented from dxd::device.

◆ wake()

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.

◆ write32() [1/4]

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 )

◆ write32() [2/4]

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 )

◆ write32() [3/4]

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:

◆ write32() [4/4]

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:

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

(c) copyright 2009 dynamic acoustics e.U. generated on Fri Nov 15 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.