dxd - dynax driver framework 2.6.0d201
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::service::client::driver< device_t > Class Template Referenceabstract

#include <dx_service_client_driver.h>

+ Inheritance diagram for dx::service::client::driver< device_t >:
+ Collaboration diagram for dx::service::client::driver< device_t >:

Public Member Functions

virtual DX_PRAGMA_IGNORE_RETURN_VALUE_END bool boot () try
 
 catch (...)
 
DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN catch (const dx::exception &__dx_exception)
 
 catch (const std::exception &__std_exception)
 
DX_PRAGMA_IGNORE_RETURN_VALUE_END bool contains (const std::string &id) noexcept
 
virtual drivercreate (const std::string &id, const typename super::device_t::desc_t &desc)
 
DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN virtual DX_PRAGMA_IGNORE_RETURN_VALUE_END driverdestroy (const std::string &id)
 
 dx_catchall_rethrow (, "%s: handle: %p, access:%x service: %p", id.c_str(), handle, access, service) manager(const std
 
 dx_catchall_rethrow (, "%s: handle: %p, service: %p", id.c_str(), handle, service) void install(const std
 
DX_PRAGMA_IGNORE_RETURN_VALUE_END void exception (const class exception &exception, bool filtered=false) const noexcept override try
 notification exception handler
 
virtual void exception (const exception &exception, bool filtered=false) const noexcept=0
 notification exception handler
 
void initialize (const std::string &id="", const ::DWORD(&access)[2]={SC_MANAGER_ALL_ACCESS, SERVICE_ALL_ACCESS}, const std::string desc="", const std::string &path="") try
 
std::shared_ptr< typename super::device_toperator[] (const std::string &id) try
 
virtual bool shutdown () try
 client driver::shutdown/boot(): override to shutdown/boot host driver
 
dx::service::manager::status promoted this (::DWORD value)
 
dx::service::manager::enumerate promoted this (::DWORD value)
 
std::shared_ptr< typename super::device_twait (const std::string &id) noexcept
 

Public Attributes

elements
 STL member.
 
keys
 STL member.
 
bool launched {}
 
log log
 
decltype(_device_t::preference) preference
 
const char * product_id
 
dx::service::manager::statusthis
 
dx::service::manager::enumeratethis
 
uint32_t version
 

Protected Types

typedef decltype(device_t::id) device_id_t
 
typedef device_t device_t
 
typedef service::request< service::stream::data< typename device_t::desc_t > > request
 

Protected Member Functions

virtual void add (const decltype(_device_t::id) &)=0
 adds a new device to the device list
 
void add (const device_id_t &device_id) override try
 adds a new device to the device list
 
void arrived () override try
 notify device arrivals completed stub
 
void arrived (super::device_t &device) override try
 
 catch (...)
 
DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN catch (const dx::exception &__dx_exception)
 
 catch (const std::exception &__std_exception)
 
DX_PRAGMA_IGNORE_RETURN_VALUE_END void clear () noexcept try
 replaces std::map::clear to call virtual notification methods
 
DX_PRAGMA_IGNORE_RETURN_VALUE_END void conclude () noexcept override try
 conclude notification: object will be removed. If you overwrite conclude() you also need to overwrite destructor and check if its needed to be called from there.
 
supercreate (const std::string &id, const typename device_t::desc_t &desc) override try
 
 driver (const match &matching_ids, const char *id, dx::log log={})
 the service client driver interface class constructor
 
 dx_catchall_handler (this,) virtual driver &operator<<(std
 restores device settings
 
 dx_catchall_rethrow ()
 
 dx_catchall_rethrow () void conclude() noexcept override
 
void info (std::ostream &os) noexcept override
 log object class information
 
void launch () override try
 launch notification: object mounted and ready to use
 
virtual operator bool () const noexcept
 
virtual driveroperator<< (const char *file)
 
virtual driveroperator>> (const char *file) const
 
virtual driveroperator>> (std::ostream &ostream) const
 saves device tree
 
virtual void remove (const decltype(_device_t::id) &)=0
 finds and removes a device from the device list
 
DX_PRAGMA_IGNORE_RETURN_VALUE_END void remove (const device_id_t &device_id) override try
 finds and removes a device from the device list
 
virtual void removed () noexcept
 notify device removals completed stub
 
virtual void removed (device_t &) noexcept
 notify specific device removal stub
 
void sleep () override
 < notify system will sleep
 
void wake () override
 

Protected Attributes

::DWORD access {}
 
dx::promoted< uint32_tconnection_id
 
std::string desc
 
event< userevent
 
::SC_HANDLE handle {}
 
std::string id
 
dx_catchall_rethrow() super &destroy(const std typedef decltype(matching_idsmatch
 
std::vector< dx::guidmatching_ids
 
std::string path
 
pipe< requestpipe
 
::SC_HANDLE service {}
 

Member Typedef Documentation

◆ device_id_t

typedef decltype(device_t::id) dx::map::driver< device_t >::device_id_t
protectedinherited

◆ device_t

typedef device_t dx::map::driver< device_t >::device_t
protectedinherited

◆ request

template<class device_t >
typedef service::request<service::stream::data<typename device_t::desc_t> > dx::service::client::driver< device_t >::request
protected

Constructor & Destructor Documentation

◆ driver()

template<class device_t >
dx::service::client::driver< device_t >::driver ( const match & matching_ids,
const char * id,
dx::log log = {} )
inlineprotected

the service client driver interface class constructor

Parameters
matching_idsthe matching ASIO client driver IDs identifying the driver interface
idASIO client driver ID
loglog settings

Member Function Documentation

◆ add() [1/2]

virtual void dx::driver< decltype(_device_t::id) , decltype(_device_t::preference) >::add ( const decltype(_device_t::id) & )
protectedpure virtualinherited

adds a new device to the device list

Exceptions
dx::exception

◆ add() [2/2]

void dx::map::driver< device_t >::add ( const device_id_t & device_id)
inlineoverrideprotectedinherited

adds a new device to the device list

Exceptions
dx::exception

◆ arrived() [1/2]

template<class device_t >
void dx::service::client::driver< device_t >::arrived ( )
inlineoverrideprotectedvirtual

notify device arrivals completed stub

Reimplemented from dx::map::driver< device_t >.

◆ arrived() [2/2]

void dx::stream::driver< map::driver< device_t > >::arrived ( super::device_t & )
inlineoverrideprotectedvirtualinherited

Reimplemented from dx::map::driver< device_t >.

◆ boot()

virtual DX_PRAGMA_IGNORE_RETURN_VALUE_END bool dx::driver< decltype(_device_t::id) , decltype(_device_t::preference) >::boot ( )
inlinevirtualinherited

◆ catch() [1/6]

dx::stream::driver< map::driver< device_t > >::catch ( ...)
inlineprotectedinherited

◆ catch() [2/6]

dx::stream::driver< map::driver< device_t > >::catch ( ...)
inlineinherited

◆ catch() [3/6]

DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN dx::stream::driver< map::driver< device_t > >::catch ( const dx::exception & __dx_exception)
inlineprotectedinherited

◆ catch() [4/6]

DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN dx::stream::driver< map::driver< device_t > >::catch ( const dx::exception & __dx_exception)
inlineinherited

◆ catch() [5/6]

dx::stream::driver< map::driver< device_t > >::catch ( const std::exception & __std_exception)
inlineprotectedinherited

◆ catch() [6/6]

dx::stream::driver< map::driver< device_t > >::catch ( const std::exception & __std_exception)
inlineinherited

◆ clear()

DX_PRAGMA_IGNORE_RETURN_VALUE_END void dx::map::driver< device_t >::clear ( )
inlineprotectednoexceptinherited

replaces std::map::clear to call virtual notification methods

◆ conclude()

DX_PRAGMA_IGNORE_RETURN_VALUE_END void dx::map::driver< device_t >::conclude ( )
inlineoverrideprotectedvirtualnoexceptinherited

conclude notification: object will be removed. If you overwrite conclude() you also need to overwrite destructor and check if its needed to be called from there.

Reimplemented from dx::object.

Reimplemented in dx::stream::engine< dx::test::device< super_device_t >, audio_pin_t, dx::virtuel::driver< dx::test::device< super_device_t > >, int32_t >.

◆ contains()

DX_PRAGMA_IGNORE_RETURN_VALUE_END bool dx::stream::driver< map::driver< device_t > >::contains ( const std::string & id)
inlinenoexceptinherited

◆ create() [1/2]

template<class device_t >
super & dx::service::client::driver< device_t >::create ( const std::string & id,
const typename device_t::desc_t & desc )
inlineoverrideprotected

◆ create() [2/2]

virtual driver & dx::stream::driver< map::driver< device_t > >::create ( const std::string & id,
const typename super::device_t::desc_t & desc )
inlinevirtualinherited

◆ destroy()

DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN virtual DX_PRAGMA_IGNORE_RETURN_VALUE_END driver & dx::stream::driver< map::driver< device_t > >::destroy ( const std::string & id)
inlinevirtualinherited

◆ dx_catchall_handler()

dx::map::driver< device_t >::dx_catchall_handler ( this ) &
inlineprotectedinherited

restores device settings

◆ dx_catchall_rethrow() [1/4]

template<class device_t >
dx::service::client::driver< device_t >::dx_catchall_rethrow ( )
protected

◆ dx_catchall_rethrow() [2/4]

template<class device_t >
dx::service::client::driver< device_t >::dx_catchall_rethrow ( )
inlineoverrideprotectednoexcept

◆ dx_catchall_rethrow() [3/4]

dx::service::manager::dx_catchall_rethrow ( "%s: handle: % p,
access:%x service:%p" ,
id. c_str(),
handle ,
access ,
service  ) const
inlineinherited

◆ dx_catchall_rethrow() [4/4]

dx::service::manager::dx_catchall_rethrow ( "%s: handle: % p,
service:%p" ,
id. c_str(),
handle ,
service  ) const
inlineinherited

◆ exception() [1/2]

DX_PRAGMA_IGNORE_RETURN_VALUE_END void dx::driver< decltype(_device_t::id) , decltype(_device_t::preference) >::exception ( const class exception & exception,
bool filtered = false ) const
inlineoverridenoexceptinherited

notification exception handler

◆ exception() [2/2]

◆ info()

template<class device_t >
void dx::service::client::driver< device_t >::info ( std::ostream & os)
inlineoverrideprotectedvirtualnoexcept

log object class information

Reimplemented from dx::stream::driver< map::driver< device_t > >.

◆ initialize()

void dx::service::manager::initialize ( const std::string & id = "",
const ::DWORD(&) access[2] = {SC_MANAGER_ALL_ACCESS, SERVICE_ALL_ACCESS},
const std::string desc = "",
const std::string & path = "" )
inlineinherited

◆ launch()

template<class device_t >
void dx::service::client::driver< device_t >::launch ( )
inlineoverrideprotectedvirtual

launch notification: object mounted and ready to use

Reimplemented from dx::map::driver< device_t >.

+ Here is the call graph for this function:

◆ operator bool()

template<class device_t >
virtual dx::service::client::driver< device_t >::operator bool ( ) const
inlineprotectedvirtualnoexcept

◆ operator<<()

virtual driver & dx::map::driver< device_t >::operator<< ( const char * file)
inlineprotectedvirtualinherited

◆ operator>>() [1/2]

virtual driver & dx::map::driver< device_t >::operator>> ( const char * file) const
inlineprotectedvirtualinherited

◆ operator>>() [2/2]

virtual driver & dx::map::driver< device_t >::operator>> ( std::ostream & ostream) const
inlineprotectedvirtualinherited

saves device tree

Reimplemented in dx::coreaudio::driver< device_t >.

◆ operator[]()

std::shared_ptr< typename super::device_t > dx::stream::driver< map::driver< device_t > >::operator[] ( const std::string & id)
inlineinherited

◆ remove() [1/2]

virtual void dx::driver< decltype(_device_t::id) , decltype(_device_t::preference) >::remove ( const decltype(_device_t::id) & )
protectedpure virtualinherited

finds and removes a device from the device list

◆ remove() [2/2]

DX_PRAGMA_IGNORE_RETURN_VALUE_END void dx::map::driver< device_t >::remove ( const device_id_t & device_id)
inlineoverrideprotectedinherited

finds and removes a device from the device list

Exceptions
dx::exception

◆ removed() [1/2]

virtual void dx::driver< device_id_t, preference_t >::removed ( )
inlineprotectedvirtualnoexceptinherited

notify device removals completed stub

Reimplemented from dx::driver< decltype(_device_t::id), decltype(_device_t::preference)>.

◆ removed() [2/2]

virtual void dx::map::driver< device_t >::removed ( device_t & )
inlineprotectedvirtualnoexceptinherited

notify specific device removal stub

◆ shutdown()

virtual bool dx::driver< decltype(_device_t::id) , decltype(_device_t::preference) >::shutdown ( )
inlinevirtualinherited

client driver::shutdown/boot(): override to shutdown/boot host driver

Reimplemented in dx::coreaudio::driver< device_t >.

◆ sleep()

void dx::map::driver< device_t >::sleep ( )
inlineoverrideprotectedinherited

< notify system will sleep

notify system wake completed stub

◆ this() [1/2]

dx::service::manager::status promoted dx::service::manager::this ( ::DWORD value)
inlineinherited

◆ this() [2/2]

dx::service::manager::enumerate promoted dx::service::manager::this ( ::DWORD value)
inlineinherited

◆ wait()

std::shared_ptr< typename super::device_t > dx::stream::driver< map::driver< device_t > >::wait ( const std::string & id)
inlinenoexceptinherited

◆ wake()

void dx::map::driver< device_t >::wake ( )
inlineoverrideprotectedinherited

Member Data Documentation

◆ access

::DWORD dx::service::manager::access {}
protectedinherited

◆ connection_id

template<class device_t >
dx::promoted<uint32_t> dx::service::client::driver< device_t >::connection_id
protected

◆ desc

std::string dx::service::manager::desc
protectedinherited

◆ elements

T std::map< K, T >::elements
inherited

STL member.

◆ event

template<class device_t >
event<user> dx::service::client::driver< device_t >::event
protected

◆ handle

::SC_HANDLE dx::service::manager::handle {}
protectedinherited

◆ id

std::string dx::service::manager::id
protectedinherited

◆ keys

K std::map< K, T >::keys
inherited

STL member.

◆ launched

bool dx::object::launched {}
inherited

◆ log

log dx::driver< decltype(_device_t::id) , decltype(_device_t::preference) >::log
inherited

◆ match

template<class device_t >
dx_catchall_rethrow () super & destroy( const std typedef decltype(matching_ids) dx::service::client::driver< device_t >::match
protected

◆ matching_ids

template<class device_t >
std::vector<dx::guid> dx::service::client::driver< device_t >::matching_ids
protected

◆ path

std::string dx::service::manager::path
protectedinherited

◆ pipe

Initial value:
{id, [this](const request& request){
std::clog<< class_name<< "::pipe::listen: "<< request<< std::endl;
switch(request.id){
switch(request.size){
case sizeof(service::stream::data<typename device_t::desc_t>::data::string):
this->add(super::device_id_t(request.data.string));
break;
case 0:
this->arrived();
break;
default:
}
break;
break;
default:
dx_pass(not_implemented, "%s: id:%s size:%d", id.c_str(), fourchar::to::string(static_cast<uint32_t>(request.id)).c_str(), request.size);
break;
}
}}
virtual void remove(const decltype(_device_t::id) &)=0
finds and removes a device from the device list
decltype(device_t::id) device_id_t
Definition dx_driver.h:263
void add(const device_id_t &device_id) override try
adds a new device to the device list
Definition dx_driver.h:294
void arrived() override try
notify device arrivals completed stub
Definition dx_service_client_driver.h:139
service::request< service::stream::data< typename device_t::desc_t > > request
Definition dx_service_client_driver.h:74
dx::service::manager::status * this
std::string id
Definition dx_service.h:142
#define dx_pass(test,...)
Definition dx_exception.h:54
promoted super
Definition dx_service.h:213
std::string string(uint32_t fourchar)
Definition dx_common.h:539
@ invalid_data
Definition macOS/dx_platform.h:182
@ not_implemented
Definition macOS/dx_platform.h:177
Definition dx_service_stream.h:49
size_t size
Definition dx_service_stream.h:71
id
Definition dx_service_stream.h:50
data_t data
Definition dx_service_stream.h:72
unsigned int uint32_t
Definition wdk/dxd_platform.h:111

◆ preference

decltype(_device_t::preference) dx::driver< decltype(_device_t::id) , decltype(_device_t::preference) >::preference
inherited

◆ product_id

const char* dx::driver< decltype(_device_t::id) , decltype(_device_t::preference) >::product_id
inherited

◆ service

::SC_HANDLE dx::service::manager::service {}
protectedinherited

◆ this [1/2]

dx::service::manager::status* dx::service::manager::this
inherited

◆ this [2/2]

dx::service::manager::enumerate* dx::service::manager::this
inherited

◆ version

uint32_t dx::driver< decltype(_device_t::id) , decltype(_device_t::preference) >::version
inherited

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

(c) copyright 2009 dynamic acoustics e.U. generated on Fri Mar 13 2026

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.