|
dxd - dynax driver framework 3.0.0d222
cross platform open source driver development framework
|
a host's promoted mirrored, born with the pipe as its server (dx_value.h: no promoted is born empty): a wish (assignment) or a question (first access) goes to the host as data, the promoted commits the host's answer under its own lock; a message outside a request is the host's broadcast, committed on the pipe's thread under the promoted's lock More...
#include <dx_service_client_driver.h>
Public Types | |
| typedef std::unique_lock< mutex_t > | lock_t |
| typedef std::mutex | mutex_t |
| typedef value_t | value_t |
Public Member Functions | |
| void | commit (lock_t &&lock, const value_t &value) |
| operator const value_t & () | |
| promoted & | operator++ () noexcept |
| value_t | operator++ (int) noexcept |
| promoted & | operator+= (const value_t &value) noexcept |
| promoted & | operator-- () noexcept |
| value_t | operator-- (int) noexcept |
| promoted & | operator-= (const value_t &value) noexcept |
| const value_t & | operator-> () |
| bool | operator== (const value_t &value) |
| bool | operator== (promoted &promoted) noexcept |
| promoted (dx::pipe< request_t > &pipe, enum class request_t::id id) | |
Public Attributes | |
| bool | initialized |
| listen< std::function< void(const value_t &)> > | listen |
| std::function< void(lock_t &&, const value_t &, const value_t &)> | server |
| \ indicate the value is in transition - does not have the new value yet | |
| bool | transient |
| \ indicate the value has been initialized | |
Protected Attributes | |
| value_t | value |
a host's promoted mirrored, born with the pipe as its server (dx_value.h: no promoted is born empty): a wish (assignment) or a question (first access) goes to the host as data, the promoted commits the host's answer under its own lock; a message outside a request is the host's broadcast, committed on the pipe's thread under the promoted's lock
|
inherited |
|
inherited |
|
inherited |
|
inline |
|
inlineinherited |
|
inlineinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinenoexceptinherited |
|
inherited |
|
inherited |
|
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
|
inherited |
\ indicate the value has been initialized
|
protectedinherited |
| (c) copyright 2009 dynamic acoustics e.U. | generated on |