|
| void | commit(lock_t&& lock, const value_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
|
| void | free() noexcept |
| super& | initialize(bool signalled= false) override |
| super& | initialize(const std::string& name, bool signalled= false) override |
| void | initialize(::SC_HANDLE handle) |
| void | initialize(::SC_HANDLE handle, ::DWORD mask) |
| | operator const os_event() const noexcept |
| | operator const value_t&() |
| | operator os_event() noexcept |
| 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 ->() |
| | operator ::HANDLE() const noexcept |
| bool | operator ==(const value_t& value) |
| bool | operator ==(promoted& promoted) noexcept |
| super& | reset(uint64_t= 0) override |
| super& | signal(uint64_t= 1) override |
| uint64_t | signalled() const |
| super& | wait(bool reset= false) override |
| template<typename rep_t, typename period_t> |
| bool | wait(const std::chrono::duration<rep_t, period_t>& timeout, bool reset= false) |
| | waits the duration at most, as event<user>: true signalled, false timed out
|
the machine's services, re-read whenever one of them changes state
\ 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