|
dxd - dynax driver framework 3.0.0d222
cross platform open source driver development framework
|
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 >::type > | make_promoted (const value_t &value, server_t &&server) |
| template<typename value_t, typename server_t> | |
| promoted< value_t, typename decay< server_t >::type > | make_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 ®istry) |
| ...\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. | |
dynax driver framework DriverKit namespace
dynax driver framework kernel namespace
dxd - dynax driver framework
| typedef::KEVENT * dxd::os_event |
| typedef::NTSTATUS dxd::os_result |
| using dxd::wstring = string<wchar_t, length> |
| anonymous enum |
| anonymous enum |
| enum dxd::direction |
the direction of a transfer or a pipe, both for what serves either
| Enumerator | |
|---|---|
| none | |
| in | |
| out | |
| both | |
| enum dxd::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
| enum dxd::scale : int64_t |
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 | |
|
strong |
| bool dxd::below32 | ( | ::MDL * | mdl | ) |
indicates whether memory is mapped above 4GB boundary
| ::NTSTATUS dxd::create | ( | ::DRIVER_OBJECT * | wdm_driver, |
| ::UNICODE_STRING * | registry, | ||
| const wchar_t * | name = L"", | ||
| dxd::guid | guid = 0 ) |
| wdm_driver | A pointer to a DRIVER_OBJECT structure that represents the driver's WDM driver object. |
| registry | A pointer to a UNICODE_STRING structure that specifies the path to the driver's Parameters key in the registry. |
| name | An internal unique name |
| guid | GUID identifying the kernel driver interface |
|
inline |
WDK: delay thread execution.
| void dxd::errorlog | ( | const char * | fmt... | ) |
|
constexprnoexcept |
|
constexprnoexcept |
| 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
| 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.
| 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.
| 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.
| void dxd::log | ( | const char * | fmt... | ) |
windows kernel logging
| promoted< value_t, typename decay< server_t >::type > dxd::make_promoted | ( | const value_t & | value, |
| server_t && | server ) |
| 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 {...})).
|
constexprnoexcept |
| 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
|
inline |
WDK: system time in 100ns seconds.
WDK: timestamp to Windows time converter.
|
inline |
WDK: high precision timestamp.
WDK: time span to timestamp span converter.
| void dxd::warnlog | ( | const char * | fmt... | ) |
| 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 |