dxd - dynax driver framework 2.6.0d212
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::clock< event_t, clock_t > Class Template Referenceabstract

#include <dx_clock.h>

Inheritance diagram for dx::clock< event_t, clock_t >:
Collaboration diagram for dx::clock< event_t, clock_t >:

Public Member Functions

 clock ()=default
 clock (const typename clock_t::duration &duration) noexcept
 dx_catchall_rethrow () virtual ~clock()
virtual void halt () noexcept
 stop and remove clock thread
void initialize (const typename clock_t::duration &duration)
 operator event_t & () noexcept
 operator event_t * () noexcept
virtual void run ()
 create and start clock thread
virtual clockwait (bool reset=false) try

Protected Member Functions

realtimeinitialize (const std::chrono::high_resolution_clock::duration &resolution)
virtual void notify () noexcept
 notify change from device requiring streaming reset
virtual void sync (const typename clock_t::time_point &now)
virtual void tick ()=0

Protected Attributes

clock_t::duration duration = clock_t::duration::zero()
event_t event
std::mutex mutex
clock_t::time_point objective
std::atomic< bool > running
os_result status = not_initialized

Constructor & Destructor Documentation

◆ clock() [1/2]

template<typename event_t = event<user>, typename clock_t = std::chrono::high_resolution_clock>
dx::clock< event_t, clock_t >::clock ( )
default

◆ clock() [2/2]

template<typename event_t = event<user>, typename clock_t = std::chrono::high_resolution_clock>
dx::clock< event_t, clock_t >::clock ( const typename clock_t::duration & duration)
inlinenoexcept

Member Function Documentation

◆ dx_catchall_rethrow()

template<typename event_t = event<user>, typename clock_t = std::chrono::high_resolution_clock>
dx::clock< event_t, clock_t >::dx_catchall_rethrow ( )
inline

◆ halt()

template<typename event_t = event<user>, typename clock_t = std::chrono::high_resolution_clock>
virtual void dx::clock< event_t, clock_t >::halt ( )
inlinevirtualnoexcept

stop and remove clock thread

◆ initialize() [1/2]

template<typename event_t = event<user>, typename clock_t = std::chrono::high_resolution_clock>
void dx::clock< event_t, clock_t >::initialize ( const typename clock_t::duration & duration)
inline
Here is the caller graph for this function:

◆ initialize() [2/2]

realtime & dx::thread::prio::realtime::initialize ( const std::chrono::high_resolution_clock::duration & resolution)
inlineinherited
Todo
dx::thread::prio: replace experimental hardcoded preemption limit with real limit obtained from machine
Here is the call graph for this function:

◆ notify()

template<typename event_t = event<user>, typename clock_t = std::chrono::high_resolution_clock>
virtual void dx::clock< event_t, clock_t >::notify ( )
inlineprotectedvirtualnoexcept

◆ operator event_t &()

template<typename event_t = event<user>, typename clock_t = std::chrono::high_resolution_clock>
dx::clock< event_t, clock_t >::operator event_t & ( )
inlinenoexcept

◆ operator event_t *()

template<typename event_t = event<user>, typename clock_t = std::chrono::high_resolution_clock>
dx::clock< event_t, clock_t >::operator event_t * ( )
inlinenoexcept

◆ run()

template<typename event_t = event<user>, typename clock_t = std::chrono::high_resolution_clock>
virtual void dx::clock< event_t, clock_t >::run ( )
inlinevirtual

◆ sync()

template<typename event_t = event<user>, typename clock_t = std::chrono::high_resolution_clock>
virtual void dx::clock< event_t, clock_t >::sync ( const typename clock_t::time_point & now)
inlineprotectedvirtual
Here is the caller graph for this function:

◆ tick()

template<typename event_t = event<user>, typename clock_t = std::chrono::high_resolution_clock>
virtual void dx::clock< event_t, clock_t >::tick ( )
protectedpure virtual

◆ wait()

template<typename event_t = event<user>, typename clock_t = std::chrono::high_resolution_clock>
virtual clock & dx::clock< event_t, clock_t >::wait ( bool reset = false)
inlinevirtual

Member Data Documentation

◆ duration

template<typename event_t = event<user>, typename clock_t = std::chrono::high_resolution_clock>
clock_t::duration dx::clock< event_t, clock_t >::duration = clock_t::duration::zero()
protected
Todo
evaluate clock::status replacement (exception?)

◆ event

template<typename event_t = event<user>, typename clock_t = std::chrono::high_resolution_clock>
event_t dx::clock< event_t, clock_t >::event
protected

◆ mutex

template<typename event_t = event<user>, typename clock_t = std::chrono::high_resolution_clock>
std::mutex dx::clock< event_t, clock_t >::mutex
protected

◆ objective

template<typename event_t = event<user>, typename clock_t = std::chrono::high_resolution_clock>
clock_t::time_point dx::clock< event_t, clock_t >::objective
protected

◆ running

template<typename event_t = event<user>, typename clock_t = std::chrono::high_resolution_clock>
std::atomic<bool> dx::clock< event_t, clock_t >::running
protected

◆ status

template<typename event_t = event<user>, typename clock_t = std::chrono::high_resolution_clock>
os_result dx::clock< event_t, clock_t >::status = not_initialized
protected

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.