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

#include <dx_clock.h>

+ Inheritance diagram for dx::clock< scope_t, clock_t >:
+ Collaboration diagram for dx::clock< scope_t, clock_t >:

Public Member Functions

 catch (...)
 
 catch (const dx::exception &__dx_exception)
 
 catch (const std::exception &__std_exception)
 
 clock ()=default
 
 clock (const typename clock_t::duration &duration) noexcept
 
virtual void halt () noexcept
 stop and remove clock thread
 
void initialize (const typename clock_t::duration &duration)
 
virtual void run ()
 create and start clock thread
 
void wait () try
 
virtual ~clock () noexcept
 

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()
 
std::mutex mutex
 
clock_t::time_point objective
 
std::atomic< bool > running
 
os_result status = not_initialized
 

Constructor & Destructor Documentation

◆ clock() [1/2]

template<enum scope scope_t = user, typename clock_t = std::chrono::high_resolution_clock>
dx::clock< scope_t, clock_t >::clock ( )
default
+ Here is the caller graph for this function:

◆ clock() [2/2]

template<enum scope scope_t = user, typename clock_t = std::chrono::high_resolution_clock>
dx::clock< scope_t, clock_t >::clock ( const typename clock_t::duration & duration)
inlinenoexcept
+ Here is the call graph for this function:

◆ ~clock()

template<enum scope scope_t = user, typename clock_t = std::chrono::high_resolution_clock>
virtual dx::clock< scope_t, clock_t >::~clock ( )
inlinevirtualnoexcept
+ Here is the call graph for this function:

Member Function Documentation

◆ catch() [1/3]

template<enum scope scope_t = user, typename clock_t = std::chrono::high_resolution_clock>
dx::clock< scope_t, clock_t >::catch ( ...)
inline

◆ catch() [2/3]

template<enum scope scope_t = user, typename clock_t = std::chrono::high_resolution_clock>
dx::clock< scope_t, clock_t >::catch ( const dx::exception & __dx_exception)
inline

◆ catch() [3/3]

template<enum scope scope_t = user, typename clock_t = std::chrono::high_resolution_clock>
dx::clock< scope_t, clock_t >::catch ( const std::exception & __std_exception)
inline

◆ halt()

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

stop and remove clock thread

Reimplemented in dx::stream::engine< device_t, pin_t, io_t, circular_t >, and dx::stream::engine< device< typename audio_pin_t::circular_t, super_device_t, typename midi_pin_t::circular_t >, audio_pin_t, int32_t >.

+ Here is the caller graph for this function:

◆ initialize() [1/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 caller graph for this function:

◆ initialize() [2/2]

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

◆ notify()

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

◆ run()

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

create and start clock thread

Reimplemented in dx::stream::engine< device_t, pin_t, io_t, circular_t >, and dx::stream::engine< device< typename audio_pin_t::circular_t, super_device_t, typename midi_pin_t::circular_t >, audio_pin_t, int32_t >.

+ Here is the caller graph for this function:

◆ sync()

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

◆ tick()

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

◆ wait()

template<enum scope scope_t = user, typename clock_t = std::chrono::high_resolution_clock>
void dx::clock< scope_t, clock_t >::wait ( )
inline

Member Data Documentation

◆ duration

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

◆ mutex

template<enum scope scope_t = user, typename clock_t = std::chrono::high_resolution_clock>
std::mutex dx::clock< scope_t, clock_t >::mutex
protected

◆ objective

template<enum scope scope_t = user, typename clock_t = std::chrono::high_resolution_clock>
clock_t::time_point dx::clock< scope_t, clock_t >::objective
protected

◆ running

template<enum scope scope_t = user, typename clock_t = std::chrono::high_resolution_clock>
std::atomic<bool> dx::clock< scope_t, clock_t >::running
protected

◆ status

template<enum scope scope_t = user, typename clock_t = std::chrono::high_resolution_clock>
os_result dx::clock< scope_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 Thu Jun 6 2024

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.