dxd - dynax driver framework 3.0.0d222
cross platform open source driver development framework
Loading...
Searching...
No Matches
dxd Namespace Reference

dynax driver framework DriverKit namespace More...

Namespaces

namespace  abstract
namespace  debug
 the names of a setup packet's fields, for the trace of a control transfer
namespace  dmus
 dmus namespace
namespace  doubly
 the semi lock free doubly linked list: an item knows its list and leaves it in its own destructor, which the singly linked one cannot - what a registration of unknown lifetime hangs in
namespace  ioctl
 kernel IOCTLs
namespace  kmdf
 KMDF bound device framework: the plain WDM counterparts of device/client/driver live in dxd itself.
namespace  linked
 the lock free singly linked list: a push and a pop with no lock at all, which makes it a stack - what is pushed last comes off first, so nothing that needs its order kept walks it (dxd/CLAUDE.md, the isoc completions)
namespace  multichannel
namespace  portcls
 portcls namespace
namespace  range
 range namespace
namespace  streaming
 generic streaming device layer, shared by every bus and both device frameworks
namespace  usb
 dynax driver framework kernel namespace
namespace  wavert
 WaveRT namespace.
namespace  wdm
 WDM++ - windows helper classes.

Classes

class  __atomic_pointer
 atomic pointer operations More...
class  __atomic_pointer< type_t * >
class  __atomic_scalar
class  __atomic_scalar< 4, type_t >
 32bit atomic operations More...
class  __atomic_scalar< 8, type_t >
 64bit atomic operations More...
class  adapter
 PortCls adapter driver. More...
struct  adjust
struct  adjust< host >
struct  adjust< swap >
class  array
 an array owned the same way, sized once and freed with the object More...
class  atomic
 atomic operations More...
class  atomic< type_t * >
 explicitely specify pointer template argument: More...
class  broadcast
 broadcast signalization of participating linked event items More...
class  buffer
 DriverKit memory buffer w/o alignment and boundary requirements. More...
class  bus
 WDM BUS class. More...
class  client
 user client: one per control open, created by device::client_create() More...
class  clock
 kernel-mode periodic software clock, mirroring dx::clock's tick()/run()/halt() shape More...
struct  decay
 no array/function decay - not needed here More...
class  device
 plain WDM device, one per FDO More...
class  event
 WDK event. More...
class  event< dx::kernel >
class  event< dx::user >
union  fourchar_string
 a four character code as a string on the stack: the kernel has no allocation free formatting, so the code is unpacked into this and printed as s More...
class  fw
 WDK: FireWire device. More...
class  guid
class  lock
class  map
 one mapping of a buffer, into the driver itself or into the client that asked for it - the scope says which address space the address belongs to More...
class  map< dx::kernel, vm_t >
 WDK: kernel space memory mapping. More...
class  map< dx::user, vm_t >
 WDK: user space memory mapping. More...
class  memory
 virtual DriverKit memory description More...
class  mutex
 mutex More...
class  open
class  pci
 PCI device. More...
class  port
 miniport creation helper More...
class  ppc
 PPC device. More...
class  process
 WDK process. More...
class  promoted
 kernel-mode promoted value, mirroring dx::promoted's server/commit/notify shape More...
class  reference
 reference holder for object based reference counter More...
class  referenced
 reference counting base class More...
struct  remove_reference
struct  remove_reference< type_t & >
struct  remove_reference< type_t && >
class  scoped
 an object owned for the scope, freed at its end and at every assignment - the kernel's own unique_ptr, with the conversions an OS call's out parameter needs More...
class  scoped<::URB >
class  spinlock
 WDK spinlock. More...
class  stream
 generic kernel stream More...
class  string
 a formatted string of a fixed length on the stack: the kernel has no std::string, and a driver's names and log lines need no allocation More...
class  wmi
 a WMI data block's instances, read as a consumer (IoWMIOpenBlock, IoWMIQueryAllData) at PASSIVE_LEVEL More...

Typedefs

typedef ::IOLock * os_event
 platform abstract type os_event for IOKit driver
typedef ::IOReturn os_result
 defining platform abstract type os_result for IOKit driver
template<int length = 0x80>
using wstring = string<wchar_t, length>

Enumerations

enum  {
  ok = kIOReturnSuccess , not_implemented = kIOReturnUnsupported , invalid = kIOReturnBadArgument , device_error = kIOReturnDeviceError ,
  no_resources = kIOReturnNoResources , not_initialized = kIOReturnNotReady , timeout = kIOReturnTimeout , invalid_size = kIOReturnNoSpace ,
  aborted = kIOReturnAborted , exclusive = kIOReturnExclusiveAccess , device_removed = kIOReturnNotAttached , closed = kIOReturnNotOpen ,
  not_permitted = kIOReturnNotPermitted , internal_error = kIOReturnInternalError
}
enum  {
  ok = kIOReturnSuccess , not_implemented = kIOReturnUnsupported , invalid = kIOReturnBadArgument , device_error = kIOReturnDeviceError ,
  no_resources = kIOReturnNoResources , not_initialized = kIOReturnNotReady , already_running = STATUS_ALREADY_INITIALIZED , interrupt_level_mismatch = STATUS_INVALID_LEVEL ,
  timeout = kIOReturnTimeout , invalid_size = kIOReturnNoSpace , not_aligned = STATUS_DATATYPE_MISALIGNMENT_ERROR , aborted = kIOReturnAborted ,
  failed = STATUS_UNSUCCESSFUL , device_removed = kIOReturnNotAttached , not_permitted = kIOReturnNotPermitted , internal_error = kIOReturnInternalError
}
enum  direction { none , in , out , both }
 the direction of a transfer or a pipe, both for what serves either More...
enum  endian { little_endian , big_endian , host =little_endian , swap =big_endian }
 what the data on the wire is, not what the machine is: a swap happens where the two disagree, so the same driver source serves either host More...
enum  scale : int64_t { nsec = 100ll , usec = 10ll , msec = usec* 1000ll , sec = msec* 1000ll }
 the factors a kernel timestamp is scaled by - the system's unit is 100 ns, so nsec is no unit of its own here More...
enum class  synchrony { sync , async }
 whether a request is awaited by its caller or completes into a callback - the template argument every URB and IRP class is built with More...

Functions

bool below32 (::MDL *mdl)
 indicates whether memory is mapped above 4GB boundary
template<class driver_t>
::NTSTATUS create (::DRIVER_OBJECT *wdm_driver, ::UNICODE_STRING *registry, const wchar_t *name=L"", dxd::guid guid=0)
void delay (int64_t time)
 WDK: delay thread execution.
void errorlog (const char *fmt...)
template<typename type_t>
constexpr type_t && forward (typename remove_reference< type_t >::type &&value) noexcept
template<typename type_t>
constexpr type_t && forward (typename remove_reference< type_t >::type &value) noexcept
template<>
os_result fw::read32< dx::kernel, host > (unsigned int *dst, size_t size32, uint64_t space, int64_t timeout)
 WDK: synchronously submit an firewire async read request.
template<>
os_result fw::read32< dx::kernel, swap > (unsigned int *dst, size_t size32, uint64_t space, int64_t timeout)
 WDK: synchronously submit an firewire async swapped data read request.
template<>
os_result fw::write32< dx::kernel, host > (const unsigned int *src, size_t size32, uint64_t space, int64_t timeout)
 WDK: synchronously submit an firewire async write request.
template<>
os_result fw::write32< dx::kernel, swap > (const unsigned int *src, size_t size32, uint64_t space, int64_t timeout)
 WDK: synchronously submit an firewire async swapped data write request.
void log (const char *fmt...)
 windows kernel logging
template<typename value_t, typename server_t>
promoted< value_t, typename decay< server_t >::typemake_promoted (const value_t &value, server_t &&server)
template<typename value_t, typename server_t>
promoted< value_t, typename decay< server_t >::typemake_promoted (server_t &&server)
 construct a dxd::promoted<value_t> deducing server_t from the given callable
template<typename type_t>
constexpr remove_reference< type_t >::type && move (type_t &&value) noexcept
::NTSTATUS register_resource (const ::UNICODE_STRING &registry)
 ...\Services\<service> -> ...\Services\EventLog\System\<service>: EventMessageFile= SystemRoot%\system32\drivers\<service>.sys
int64_t time ()
 WDK: system time in 100ns seconds.
int64_t time (int64_t timestamp, scale scale=usec)
 WDK: timestamp to Windows time converter.
int64_t timestamp ()
 WDK: high precision timestamp.
int64_t timestamp_offset (int64_t time, scale scale=usec)
 WDK: time span to timestamp span converter.
void warnlog (const char *fmt...)

Variables

::DRIVER_OBJECT * wdm_driver = nullptr
 Main driver entry.

Detailed Description

dynax driver framework DriverKit namespace

dynax driver framework kernel namespace

dxd - dynax driver framework

Typedef Documentation

◆ os_event

typedef::KEVENT * dxd::os_event

platform abstract type os_event for IOKit driver

platform abstract type os_event for WDK driver

◆ os_result

typedef::NTSTATUS dxd::os_result

defining platform abstract type os_result for IOKit driver

platform abstract type os_result for WDK driver

◆ wstring

template<int length = 0x80>
using dxd::wstring = string<wchar_t, length>

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ok 
not_implemented 
invalid 
device_error 
no_resources 
not_initialized 
timeout 
invalid_size 
aborted 
exclusive 
device_removed 
closed 
not_permitted 
internal_error 

◆ anonymous enum

anonymous enum
Enumerator
ok 
not_implemented 
invalid 
device_error 
no_resources 
not_initialized 
already_running 
interrupt_level_mismatch 
timeout 
invalid_size 
not_aligned 
aborted 
failed 
device_removed 
not_permitted 
internal_error 

◆ direction

the direction of a transfer or a pipe, both for what serves either

Enumerator
none 
in 
out 
both 

◆ endian

what the data on the wire is, not what the machine is: a swap happens where the two disagree, so the same driver source serves either host

Enumerator
little_endian 

data is little endian and will only be swapped if either host or device is big endian

big_endian 

data is big endian and will only be swapped if either host or device is little endian

host 

data is in host endian format and will only be swapped if target device is in the opposit endian format

swap 

data is not in host endian format and will only be swapped if target device is in host endian format

◆ scale

the factors a kernel timestamp is scaled by - the system's unit is 100 ns, so nsec is no unit of its own here

Enumerator
nsec 

pseudo scale addressing Windows' odd 100ns precision

usec 
msec 
sec 

◆ synchrony

enum class dxd::synchrony
strong

whether a request is awaited by its caller or completes into a callback - the template argument every URB and IRP class is built with

Enumerator
sync 
async 

Function Documentation

◆ below32()

bool dxd::below32 ( ::MDL * mdl)

indicates whether memory is mapped above 4GB boundary

  • a serious OS should handle physical memory layout dependencies transparently. Bills buggy experiment on the other hand requires the awareness of where memory is physically mapped.
Here is the caller graph for this function:

◆ create()

template<class driver_t>
::NTSTATUS dxd::create ( ::DRIVER_OBJECT * wdm_driver,
::UNICODE_STRING * registry,
const wchar_t * name = L"",
dxd::guid guid = 0 )
Parameters
wdm_driverA pointer to a DRIVER_OBJECT structure that represents the driver's WDM driver object.
registryA pointer to a UNICODE_STRING structure that specifies the path to the driver's Parameters key in the registry.
nameAn internal unique name
guidGUID identifying the kernel driver interface
Here is the call graph for this function:

◆ delay()

void dxd::delay ( int64_t time)
inline

WDK: delay thread execution.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ errorlog()

void dxd::errorlog ( const char * fmt...)
Here is the caller graph for this function:

◆ forward() [1/2]

template<typename type_t>
type_t && dxd::forward ( typename remove_reference< type_t >::type && value)
constexprnoexcept

◆ forward() [2/2]

template<typename type_t>
type_t && dxd::forward ( typename remove_reference< type_t >::type & value)
constexprnoexcept
Here is the caller graph for this function:

◆ fw::read32< dx::kernel, host >()

template<>
os_result dxd::fw::read32< dx::kernel, host > ( 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

Here is the call graph for this function:

◆ fw::read32< dx::kernel, swap >()

template<>
os_result dxd::fw::read32< dx::kernel, swap > ( 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.

Here is the call graph for this function:

◆ fw::write32< dx::kernel, host >()

template<>
os_result dxd::fw::write32< dx::kernel, host > ( 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.

Here is the call graph for this function:

◆ fw::write32< dx::kernel, swap >()

template<>
os_result dxd::fw::write32< dx::kernel, swap > ( 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.

Here is the call graph for this function:

◆ log()

void dxd::log ( const char * fmt...)

windows kernel logging

Here is the caller graph for this function:

◆ make_promoted() [1/2]

template<typename value_t, typename server_t>
promoted< value_t, typename decay< server_t >::type > dxd::make_promoted ( const value_t & value,
server_t && server )
Here is the call graph for this function:

◆ make_promoted() [2/2]

template<typename value_t, typename server_t>
promoted< value_t, typename decay< server_t >::type > dxd::make_promoted ( server_t && server)

construct a dxd::promoted<value_t> deducing server_t from the given callable

dxd::promoted<value_t, server_t> requires spelling out the lambda's own compiler-generated type; this factory lets a declaration read the same as dx::promoted's constructor call(dxd::make_promoted<value_t>(this {...})).

Here is the call graph for this function:

◆ move()

template<typename type_t>
remove_reference< type_t >::type && dxd::move ( type_t && value)
constexprnoexcept
Here is the caller graph for this function:

◆ register_resource()

NTSTATUS dxd::register_resource ( const ::UNICODE_STRING & registry)

...\Services\<service> -> ...\Services\EventLog\System\<service>: EventMessageFile= SystemRoot%\system32\drivers\<service>.sys

the driver's image as the System log's message resource under its service name

Here is the call graph for this function:
Here is the caller graph for this function:

◆ time() [1/2]

int64_t dxd::time ( )
inline

WDK: system time in 100ns seconds.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ time() [2/2]

int64_t dxd::time ( int64_t timestamp,
scale scale = usec )
inline

WDK: timestamp to Windows time converter.

Here is the call graph for this function:

◆ timestamp()

int64_t dxd::timestamp ( )
inline

WDK: high precision timestamp.

Here is the caller graph for this function:

◆ timestamp_offset()

int64_t dxd::timestamp_offset ( int64_t time,
scale scale = usec )
inline

WDK: time span to timestamp span converter.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ warnlog()

void dxd::warnlog ( const char * fmt...)
Here is the caller graph for this function:

Variable Documentation

◆ wdm_driver

extern::DRIVER_OBJECT * dxd::wdm_driver = nullptr

Main driver entry.

DriverEntry is the first driver-supplied routine that is called after a driver is loaded. It is responsible for initializing the driver.

This is the main WDF managed driver entry; the first call to the driver will end up here. from here it is the responisibilty of the driver to register at least a callback for the case the I/O manager matches a device to this driver and adds the FDO to the driver stack.

The WDF framework is called with an initialized WDF_DRIVER_CONFIG containing the EvtDeviceAdd callback.

for further reference see: http://msdn.microsoft.com/en-us/library/aa491316.aspx


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