dxd - dynax driver framework 3.0.0d222
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::service::manager::status Class Reference

#include <dx_service.h>

Inheritance diagram for dx::service::manager::status:
Collaboration diagram for dx::service::manager::status:

Public Types

typedef std::unique_lock< mutex_tlock_t
typedef std::mutex mutex_t
typedef ::DWORD value_t

Public Member Functions

virtual void callback ()
void commit (lock_t &&lock, const value_t &value)
void free () noexcept
superinitialize (bool signalled=false) override
superinitialize (const std::string &name, bool signalled=false) override
void initialize (::SC_HANDLE handle, ::DWORD mask)
 operator const os_event () const noexcept
 operator const value_t & ()
 operator os_event () noexcept
promotedoperator++ () noexcept
value_t operator++ (int) noexcept
promotedoperator+= (const value_t &value) noexcept
promotedoperator-- () noexcept
value_t operator-- (int) noexcept
promotedoperator-= (const value_t &value) noexcept
const value_toperator-> ()
 operator::HANDLE () const noexcept
bool operator== (const value_t &value)
bool operator== (promoted &promoted) noexcept
superreset (uint64_t=0) override
supersignal (uint64_t=1) override
uint64_t signalled () const
superwait (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)

Static Public Member Functions

static void wait (::HANDLE handle, int64_t timeout=0)

Public Attributes

bool initialized
listen< std::function< void(const value_t &)> > listen
bool listening {}
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

Static Public Attributes

static constexpr auto scope = kernel

Protected Member Functions

void notify () override

Protected Attributes

::HANDLE handle {invalid_t}
manager & manager
::HANDLE process {::GetCurrentProcess()}
value_t value

Member Typedef Documentation

◆ lock_t

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

◆ mutex_t

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

◆ value_t

typedef ::DWORD dx::promoted< ::DWORD >::value_t
inherited

Member Function Documentation

◆ callback()

virtual void dx::event< kernel >::callback ( )
inlinevirtualinherited

The default implementation is based on event<user> which is signalled when triggered via callback() from kernel. This is to achieve compatibility with Windows events. Its probably more adequate to overwrite callback() and do the work here if feasible.

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

◆ commit()

void dx::promoted< ::DWORD >::commit ( lock_t && lock,
const value_t & value )
inlineinherited
Here is the caller graph for this function:

◆ free()

void dx::service::manager::promoted::free ( )
inlinevirtualnoexceptinherited

Reimplemented from dx::resource< invalid_t >.

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

◆ initialize() [1/3]

super & dx::event< kernel >::initialize ( bool signalled = false)
inlineoverridevirtualinherited

Reimplemented from dx::abstract::event.

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

◆ initialize() [2/3]

super & dx::event< kernel >::initialize ( const std::string & name,
bool signalled = false )
inlineoverridevirtualinherited

Reimplemented from dx::abstract::event.

Here is the call graph for this function:

◆ initialize() [3/3]

void dx::service::manager::promoted::initialize ( ::SC_HANDLE handle,
::DWORD mask )
inlineinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ notify()

void dx::service::manager::status::notify ( )
inlineoverrideprotectedvirtual

Implements dx::service::manager::promoted.

Here is the call 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 const value_t &()

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

◆ operator os_event()

dx::event< kernel >::operator os_event ( )
inlinenoexceptinherited

◆ operator++() [1/2]

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

◆ operator++() [2/2]

value_t dx::promoted< ::DWORD >::operator++ ( int )
inlinenoexceptinherited

◆ operator+=()

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

◆ operator--() [1/2]

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

◆ operator--() [2/2]

value_t dx::promoted< ::DWORD >::operator-- ( int )
inlinenoexceptinherited

◆ operator-=()

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

◆ operator->()

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

◆ 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:

◆ operator==() [1/2]

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

◆ operator==() [2/2]

bool dx::promoted< ::DWORD >::operator== ( promoted<::DWORD > & promoted)
inlinenoexceptinherited

◆ reset()

super & dx::event< kernel >::reset ( uint64_t = 0)
inlineoverridevirtualinherited

Implements dx::abstract::event.

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

◆ signal()

super & dx::event< kernel >::signal ( uint64_t = 1)
inlineoverridevirtualinherited

Implements dx::abstract::event.

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

◆ signalled()

uint64_t dx::event< user >::signalled ( ) const
inlineinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wait() [1/3]

void dx::event< kernel >::wait ( ::HANDLE handle,
int64_t timeout = 0 )
inlinestaticinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wait() [2/3]

super & dx::event< kernel >::wait ( bool reset = false)
inlineoverridevirtualinherited

Implements dx::abstract::event.

Here is the call graph for this function:

◆ wait() [3/3]

template<typename rep_t, typename period_t>
bool dx::event< user >::wait ( const std::chrono::duration< rep_t, period_t > & timeout,
bool reset = false )
inlineinherited

wait with duration timeout returns true: signalled false: timed out

Here is the call graph for this function:

Member Data Documentation

◆ handle

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

◆ initialized

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

◆ listen

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

◆ listening

bool dx::service::manager::promoted::listening {}
inherited

◆ manager

manager& dx::service::manager::promoted::manager
protectedinherited

◆ process

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

◆ scope

constexpr auto dx::event< kernel >::scope = kernel
staticconstexprinherited

◆ server

std::function<void(lock_t&&, const value_t&, const value_t&)> dx::promoted< ::DWORD >::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< ::DWORD >::transient
inherited

\ indicate the value has been initialized

◆ value

value_t dx::promoted< ::DWORD >::value
protectedinherited

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

(c) copyright 2009 dynamic acoustics e.U. generated on

a closed source license may be obtained by requesting a written permission from dynamic acoustics e.U.
however - governmental use generally and military use especially is strictly prohibited though.