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

a device the service hosts, served under <product id>/<puuid> as a kernel driver serves its device: a peer per client connection, its IOCTLs landing in ioctl() More...

#include <dx_service_device.h>

Inheritance diagram for dx::service::device< super_device_t >:
Collaboration diagram for dx::service::device< super_device_t >:

Classes

class  peer
 a client's connection to the device: what it asks the device answers, while the client stands the device stands More...

Public Member Functions

void conclude() noexcept override
void launch() override

Protected Member Functions

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 layer above makes its own

Protected Attributes

service::server server{std::string{this->driver.product_id}+ "/"+ this->puuid, [this](uint32_t pid){return peer_create(pid);}}

Detailed Description

template<typename super_device_t>
class dx::service::device< super_device_t >

a device the service hosts, served under <product id>/<puuid> as a kernel driver serves its device: a peer per client connection, its IOCTLs landing in ioctl()

A peer holds the device while its client stands; conclude() stops the server first, which destroys every peer before it returns - a caller holding the last other reference (map::driver::remove()) reaches the destructor within its own call, so a cleanup tied to the device's destruction (the registry preference's schedule_erase) completes there. The device answers its desc (dx::ioctl::service::desc); a layer above answers its own ahead.

Member Function Documentation

◆ conclude()

template<typename super_device_t>
void dx::service::device<super_device_t>::conclude()
inlineoverridenoexcept
Here is the caller graph for this function:

◆ ioctl()

template<typename super_device_t>
virtual size_t dx::service::device<super_device_t>::ioctl(peer& peer, uint32_t ioctl, const void* in, size_t size_in, void* out, size_t size_out)
inlineprotectedvirtual

Reimplemented in dx::service::stream::device< super_device_t >.

Here is the caller graph for this function:

◆ launch()

template<typename super_device_t>
void dx::service::device<super_device_t>::launch()
inlineoverride
Here is the caller graph for this function:

◆ peer_create()

template<typename super_device_t>
virtual std::shared_ptr<peer> dx::service::device<super_device_t>::peer_create(uint32_t pid)
inlineprotectedvirtual

the peer of a connection: a layer above makes its own

Reimplemented in dx::service::stream::device< super_device_t >.

Member Data Documentation

◆ server

template<typename super_device_t>
service::server dx::service::device<super_device_t>::server{std::string{this->driver.product_id}+ "/"+ this->puuid, [this](uint32_t pid){return peer_create(pid);}}
protected

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