dxd - dynax driver framework 3.0.0d222
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::pipe< rcv_t >::connection Class Reference

whether this pipe stands: an event to wait on and a promoted to follow - dx::pipe::status derives it from what the last operation answered More...

#include <dx_pipe.h>

Inheritance diagram for dx::pipe< rcv_t >::connection:
Collaboration diagram for dx::pipe< rcv_t >::connection:

Public Types

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

Public Member Functions

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
 connection ()
 < promoted value notifyng connection changes
virtual eventinitialize (bool signalled=false)
virtual eventinitialize (const std::string &, bool signalled=false)
 operator const value_t & ()
value_t operator++ (int) noexcept
promotedoperator+= (const value_t &value) noexcept
value_t operator-- (int) noexcept
promotedoperator-= (const value_t &value) noexcept
const value_toperator-> ()
bool operator== (const value_t &value)
eventreset (uint64_t count=0) override
supersignal (uint64_t count=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)

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

Static Public Attributes

static constexpr auto scope {user}

Protected Attributes

value_t value

Detailed Description

template<typename rcv_t>
class dx::pipe< rcv_t >::connection

whether this pipe stands: an event to wait on and a promoted to follow - dx::pipe::status derives it from what the last operation answered

Member Typedef Documentation

◆ lock_t

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

◆ mutex_t

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

◆ value_t

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

Constructor & Destructor Documentation

◆ connection()

template<typename rcv_t>
dx::pipe< rcv_t >::connection::connection ( )
inline

< promoted value notifyng connection changes

Here is the call graph for this function:

Member Function Documentation

◆ commit()

void dx::promoted< bool >::commit ( lock_t && lock,
const value_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

◆ initialize() [1/2]

virtual event & dx::abstract::event::initialize ( bool signalled = false)
inlinevirtualinherited

Reimplemented in dx::event< kernel >.

◆ initialize() [2/2]

virtual event & dx::abstract::event::initialize ( const std::string & ,
bool signalled = false )
inlinevirtualinherited

Reimplemented in dx::event< kernel >, and dx::shared::event.

◆ operator const value_t &()

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

◆ operator++()

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

◆ operator+=()

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

◆ operator--()

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

◆ operator-=()

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

◆ operator->()

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

◆ operator==()

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

◆ reset()

event & dx::event< user >::reset ( uint64_t count = 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< user >::signal ( uint64_t count = 1)
inlineoverridevirtualinherited

Implements dx::abstract::event.

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/2]

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

Implements dx::abstract::event.

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

◆ wait() [2/2]

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

◆ initialized

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

◆ listen

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

◆ scope

auto dx::event< user >::scope {user}
staticconstexprinherited

◆ server

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

\ indicate the value has been initialized

◆ value

value_t dx::promoted< bool >::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.