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

a client's connection to a service: its IOCTLs in the forms a kernel driver's client takes them, so a mirror of a kernel's value (dx::proxy::promoted) mirrors the service's alike - asked on its first access, told a wish and read back on every broadcast More...

#include <dx_service_connection.h>

Inheritance diagram for dx::service::connection:
Collaboration diagram for dx::service::connection:

Public Member Functions

void ctl(uint32_t ioctl)
void free() noexcept override
template<typename rx_t>
rx_t ictl(uint32_t ioctl)
template<typename rx_t>
size_t ictl(uint32_t ioctl, rx_t& rx)
template<typename rx_t, typename tx_t>
rx_t ioctl(uint32_t ioctl, const tx_t& tx)
template<typename rx_t, typename tx_t>
size_t ioctl(uint32_t ioctl, const tx_t& tx, rx_t& rx)
size_t ioctl(uint32_t ioctl, const void* tx, size_t tx_size, void* rx, size_t rx_size)
 one round trip: the request's data out, the reply's in - its size answered, its result thrown
template<typename tx_t>
connection& octl(uint32_t ioctl, const tx_t& tx)
 operator const os_event() const noexcept
 operator os_event() noexcept
 operator ::HANDLE() const noexcept
void run()
 the service's first answer: the status follows
void run()
 the read thread started, its first connection tried: a round trip goes where it succeeded
void send(const std::vector<uint8_t>& message)

Public Attributes

listen<std::function<void()>> broadcast
 the service's signal: whatever of it is mirrored reads itself back
promoted<os_result> status{driver_not_connected}
 ok while the service answers

Protected Member Functions

const message* receive(std::stop_token& stop_token) noexcept
 the next message whole, its sizes checked - none where the pipe ended, stops or carried no message
std::optional<::DWORD> wait(::OVERLAPPED& overlapped, std::stop_token& stop_token) noexcept
 an overlapped operation's end, waited for against the stop token: its size, or none where it failed or stops

Static Protected Member Functions

static std::string name(const std::string& id)

Protected Attributes

::HANDLE handle{invalid_t}
::HANDLE process{::GetCurrentProcess()}

Detailed Description

a client's connection to a service: its IOCTLs in the forms a kernel driver's client takes them, so a mirror of a kernel's value (dx::proxy::promoted) mirrors the service's alike - asked on its first access, told a wish and read back on every broadcast

Member Function Documentation

◆ ctl()

void dx::service::connection::ctl(uint32_t ioctl)
inline
Here is the call graph for this function:

◆ free()

void dx::service::platform::connection::free()
inlineoverridevirtualnoexceptinherited

Reimplemented from dx::resource< invalid_t >.

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

◆ ictl() [1/2]

template<typename rx_t>
rx_t dx::service::connection::ictl(uint32_t ioctl)
inline
Here is the call graph for this function:

◆ ictl() [2/2]

template<typename rx_t>
size_t dx::service::connection::ictl(uint32_t ioctl, rx_t& rx)
inline
Here is the call graph for this function:

◆ ioctl() [1/3]

template<typename rx_t, typename tx_t>
rx_t dx::service::connection::ioctl(uint32_t ioctl, const tx_t& tx)
inline
Here is the call graph for this function:

◆ ioctl() [2/3]

template<typename rx_t, typename tx_t>
size_t dx::service::connection::ioctl(uint32_t ioctl, const tx_t& tx, rx_t& rx)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ioctl() [3/3]

size_t dx::service::platform::connection::ioctl(uint32_t ioctl, const void* tx, size_t tx_size, void* rx, size_t rx_size)
inline

one round trip: the request's data out, the reply's in - its size answered, its result thrown

◆ name()

std::string dx::service::platform::pipe::name(const std::string& id)
inlinestaticprotectedinherited
Here is the call graph for this function:

◆ octl()

template<typename tx_t>
connection& dx::service::connection::octl(uint32_t ioctl, const tx_t& tx)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator const os_event()

template<::HANDLE invalid_t= INVALID_HANDLE_VALUE>
dx::resource<invalid_t>::operator const os_event() const
inlinenoexceptinherited

◆ operator os_event()

template<::HANDLE invalid_t= INVALID_HANDLE_VALUE>
dx::resource<invalid_t>::operator os_event()
inlinenoexceptinherited

◆ operator ::HANDLE()

template<::HANDLE invalid_t= INVALID_HANDLE_VALUE>
dx::resource<invalid_t>::operator ::HANDLE() const
inlinenoexceptinherited
Here is the caller graph for this function:

◆ receive()

const message* dx::service::platform::pipe::receive(std::stop_token& stop_token)
inlineprotectednoexceptinherited

the next message whole, its sizes checked - none where the pipe ended, stops or carried no message

Here is the call graph for this function:

◆ run() [1/2]

void dx::service::platform::connection::run()
inlineinherited

the service's first answer: the status follows

Here is the caller graph for this function:

◆ run() [2/2]

void dx::service::platform::connection::run()
inlineinherited

the read thread started, its first connection tried: a round trip goes where it succeeded

Here is the call graph for this function:

◆ send()

void dx::service::platform::pipe::send(const std::vector<uint8_t>& message)
inlineinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wait()

std::optional<::DWORD> dx::service::platform::pipe::wait(::OVERLAPPED& overlapped, std::stop_token& stop_token)
inlineprotectednoexceptinherited

an overlapped operation's end, waited for against the stop token: its size, or none where it failed or stops

Here is the caller graph for this function:

Member Data Documentation

◆ broadcast

listen<std::function<void()>> dx::service::platform::connection::broadcast
inherited

the service's signal: whatever of it is mirrored reads itself back

◆ handle

template<::HANDLE invalid_t= INVALID_HANDLE_VALUE>
::HANDLE dx::resource<invalid_t>::handle{invalid_t}
protectedinherited

◆ process

template<::HANDLE invalid_t= INVALID_HANDLE_VALUE>
::HANDLE dx::resource<invalid_t>::process{::GetCurrentProcess()}
protectedinherited

◆ status

promoted<os_result> dx::service::platform::connection::status{driver_not_connected}
inherited

ok while the service answers


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