dxd - dynax driver framework 3.0.2
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::service::driver< driver_t > Class Template Reference

a device tree hosted by the service: the driver served under its product id as a kernel driver serves its client - a client's IOCTL lands in ioctl(), every arrival and removal is the broadcast More...

#include <dx_service_driver.h>

Inheritance diagram for dx::service::driver< driver_t >:
Collaboration diagram for dx::service::driver< driver_t >:

Classes

class  app
 the service's own entry point: it launches the driver, so a device arriving on the machine is served whether a client is connected or not More...
class  peer
 a client's connection to the driver: what it asks the driver answers More...
struct  property
 this bus's name in the device tree and the preference store More...

Public Member Functions

void conclude() noexcept override
 driver(const typename super::match& matching_ids, const char* product_id, dx::log log= {})
void launch() override

Public Attributes

dx::service::driver::app* this

Protected Member Functions

void arrived(typename super::device_t& device) override
virtual size_t ioctl(peer& peer, uint32_t ioctl, const void* in, size_t size_in, void* out, size_t size_out)
virtual std::shared_ptr<peer> peer_create(uint32_t pid)
 the peer of a connection: a product's driver makes its own
void removed(typename super::device_t& device) noexcept override

Protected Attributes

service::server server{this->product_id, [this](uint32_t pid){return peer_create(pid);}}

Detailed Description

template<class driver_t>
class dx::service::driver< driver_t >

a device tree hosted by the service: the driver served under its product id as a kernel driver serves its client - a client's IOCTL lands in ioctl(), every arrival and removal is the broadcast

The driver answers its log, its devices (their puuids, dx::ioctl::service::devices), a device created or destroyed where its bus makes devices, and an echo; a product's driver answers its own IOCTLs ahead of these. Every client is untrusted: a request is its checked bytes alone.

Constructor & Destructor Documentation

◆ driver()

template<class driver_t>
dx::service::driver<driver_t>::driver(const typename super::match& matching_ids, const char* product_id, dx::log log= {})
inline

Member Function Documentation

◆ arrived()

template<class driver_t>
void dx::service::driver<driver_t>::arrived(typename super::device_t& device)
inlineoverrideprotected
Here is the call graph for this function:

◆ conclude()

template<class driver_t>
void dx::service::driver<driver_t>::conclude()
inlineoverridenoexcept
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ioctl()

template<class driver_t>
virtual size_t dx::service::driver<driver_t>::ioctl(peer& peer, uint32_t ioctl, const void* in, size_t size_in, void* out, size_t size_out)
inlineprotectedvirtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ launch()

template<class driver_t>
void dx::service::driver<driver_t>::launch()
inlineoverride

◆ peer_create()

template<class driver_t>
virtual std::shared_ptr<peer> dx::service::driver<driver_t>::peer_create(uint32_t pid)
inlineprotectedvirtual

the peer of a connection: a product's driver makes its own

◆ removed()

template<class driver_t>
void dx::service::driver<driver_t>::removed(typename super::device_t& device)
inlineoverrideprotectednoexcept
Here is the call graph for this function:

Member Data Documentation

◆ server

template<class driver_t>
service::server dx::service::driver<driver_t>::server{this->product_id, [this](uint32_t pid){return peer_create(pid);}}
protected

◆ this

template<class driver_t>
dx::service::driver::app* dx::service::driver<driver_t>::this

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