dxd - dynax driver framework 3.0.2
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::service::client::_device< desc_t, preference_t, stream_t, group_t >::mirror Struct Reference

the transport settings' mirror (dx::stream::settings, a hosted device's): the setting mapped to the service's IOCTL More...

#include <dx_service_client_device.h>

Inheritance diagram for dx::service::client::_device< desc_t, preference_t, stream_t, group_t >::mirror:
Collaboration diagram for dx::service::client::_device< desc_t, preference_t, stream_t, group_t >::mirror:

Public Types

typedef std::unique_lock<mutex_t> lock_t
typedef std::mutex mutex_t
typedef uint32_t value_t

Public Member Functions

void commit(lock_t&& lock, const uint32_t& value)
 the server's answer: the value stands, the transition ends and the listeners are told - outside the lock, so a listener may read the promoted back
template<typename device_t>
 mirror(device_t& device, dx::stream::setting setting, uint32_t= 0)
 operator const uint32_t&()
 operator const value_t&()
promoted& operator ++() noexcept
uint32_t operator ++(int) noexcept
promoted& operator +=(const uint32_t& value) noexcept
promoted& operator --() noexcept
uint32_t operator --(int) noexcept
promoted& operator -=(const uint32_t& value) noexcept
const uint32_t& operator ->()
bool operator ==(const value_t& value)
bool operator ==(const uint32_t& value)
bool operator ==(promoted& promoted) noexcept

Public Attributes

bool initialized
listen<std::function<void(const uint32_t &)>> listen
std::function<void(lock_t &&, const uint32_t &, const uint32_t &)> server
 \ indicate the value is in transition - does not have the new value yet
bool transient
 \ indicate the value has been initialized

Static Public Attributes

static constexpr uint32_t ioctls [] {dx::ioctl::service::sync_strategy, dx::ioctl::service::safety_offset_out, dx::ioctl::service::safety_offset_in}

Protected Attributes

uint32_t value

Detailed Description

template<typename desc_t, typename preference_t, typename stream_t, typename group_t>
struct dx::service::client::_device< desc_t, preference_t, stream_t, group_t >::mirror

the transport settings' mirror (dx::stream::settings, a hosted device's): the setting mapped to the service's IOCTL

Member Typedef Documentation

◆ lock_t

typedef std::unique_lock<mutex_t> dx::promoted<uint32_t>::lock_t
inherited

◆ mutex_t

typedef std::mutex dx::promoted<uint32_t>::mutex_t
inherited

◆ value_t

Constructor & Destructor Documentation

◆ mirror()

template<typename desc_t, typename preference_t, typename stream_t, typename group_t>
template<typename device_t>
dx::service::client::_device<desc_t, preference_t, stream_t, group_t>::mirror::mirror(device_t& device, dx::stream::setting setting, uint32_t= 0)
inline
Here is the call graph for this function:

Member Function Documentation

◆ commit()

void dx::promoted<uint32_t>::commit(lock_t&& lock, const uint32_t& value)
inlineinherited

the server's answer: the value stands, the transition ends and the listeners are told - outside the lock, so a listener may read the promoted back

◆ operator const uint32_t &()

dx::promoted<uint32_t>::operator const uint32_t&()
inlineinherited

◆ operator const value_t &()

dx::promoted<uint32_t>::operator const value_t&()
inlineinherited

◆ operator ++() [1/2]

promoted& dx::promoted<uint32_t>::operator ++()
inlinenoexceptinherited

◆ operator ++() [2/2]

uint32_t dx::promoted<uint32_t>::operator ++(int)
inlinenoexceptinherited

◆ operator +=()

promoted& dx::promoted<uint32_t>::operator +=(const uint32_t& value)
inlinenoexceptinherited

◆ operator --() [1/2]

promoted& dx::promoted<uint32_t>::operator --()
inlinenoexceptinherited

◆ operator --() [2/2]

uint32_t dx::promoted<uint32_t>::operator --(int)
inlinenoexceptinherited

◆ operator -=()

promoted& dx::promoted<uint32_t>::operator -=(const uint32_t& value)
inlinenoexceptinherited

◆ operator ->()

const uint32_t& dx::promoted<uint32_t>::operator ->()
inlineinherited

◆ operator ==() [1/3]

bool dx::promoted<uint32_t>::operator ==(const value_t& value)
inlineinherited

◆ operator ==() [2/3]

bool dx::promoted<uint32_t>::operator ==(const uint32_t& value)
inlineinherited

◆ operator ==() [3/3]

bool dx::promoted<uint32_t>::operator ==(promoted<service::connection, uint32_t>& promoted)
inlinenoexceptinherited

Member Data Documentation

◆ initialized

bool dx::promoted<uint32_t>::initialized
inherited

◆ ioctls

template<typename desc_t, typename preference_t, typename stream_t, typename group_t>
uint32_t dx::service::client::_device<desc_t, preference_t, stream_t, group_t>::mirror::ioctls[]{dx::ioctl::service::sync_strategy, dx::ioctl::service::safety_offset_out, dx::ioctl::service::safety_offset_in}
staticconstexpr

◆ listen

listen<std::function<void(const uint32_t&)>> dx::promoted<uint32_t>::listen
inherited

◆ server

std::function<void(lock_t&&, const uint32_t&, const uint32_t&)> dx::promoted<uint32_t>::server
inherited

\ indicate the value is in transition - does not have the new value yet

server: handle synchronous and asynchronous value updates and initialization lock: lock promoted value from access during update value: new value (if in transition) current: current value to allow discarding update and reverting to current value if update is not permitted

it needs to handle these case: not initialized and not in transition: initialze and commit the value not initialized and in transition: if dependent on external settings initialize a temporary and compare it with the new value and update the external setting if required make sure to commit the new value so listeners get notified either synchronously or asynchronously by external notification initialized and in transition: update external settings if any and make sure to commit the new value so listeners get notified either synchronously or asynchronousl by external notification

server will not be called with this state: initialized and not in transation

for synchronous operation: move lock to commit for asynchronous operation: store lock and at asynchronous response restore and move lock to commit

◆ transient

bool dx::promoted<uint32_t>::transient
inherited

\ indicate the value has been initialized

◆ value

uint32_t dx::promoted<uint32_t>::value
protectedinherited

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