dxd - dynax driver framework  2979
cross platform open source driver development framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dx::clock< clock_t > Class Template Referenceabstract

#include <dx_clock.h>

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

Public Member Functions

 catch (std::system_error &exception)
 
 catchall_rethrow () virtual ~clock() noexcept
 
 clock ()=default
 
 clock (const typename clock_t::duration &duration) noexcept
 
virtual void halt () noexcept
 
void initialize (const typename clock_t::duration &duration)
 
virtual void launch ()
 
 operator os_event () noexcept
 
eventreset () try
 
virtual void run ()
 
eventsignal () try
 
void wait () try
 

Protected Member Functions

virtual void notify () noexcept
 notify change from device requiring streaming reset More...
 
virtual void sync (const typename clock_t::time_point &now)
 
virtual void tick () noexcept=0
 

Protected Attributes

clock_t::duration duration = clock_t::duration::zero()
 
std::mutex mutex
 
clock_t::time_point objective
 
volatile bool running = false
 
os_result status = not_initialized
 

Constructor & Destructor Documentation

template<typename clock_t = std::chrono::high_resolution_clock>
dx::clock< clock_t >::clock ( )
default
template<typename clock_t = std::chrono::high_resolution_clock>
dx::clock< clock_t >::clock ( const typename clock_t::duration &  duration)
inlinenoexcept

Member Function Documentation

dx::event< user >::catch ( std::system_error &  exception)
inlineinherited
template<typename clock_t = std::chrono::high_resolution_clock>
dx::clock< clock_t >::catchall_rethrow ( )
inlinenoexcept
template<typename clock_t = std::chrono::high_resolution_clock>
virtual void dx::clock< clock_t >::halt ( )
inlinevirtualnoexcept
template<typename clock_t = std::chrono::high_resolution_clock>
void dx::clock< clock_t >::initialize ( const typename clock_t::duration &  duration)
inline

+ Here is the caller graph for this function:

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

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

Reimplemented in dx::coremidi::stream< io_t, bus_t, stream_desc_t, device_t >.

template<typename clock_t = std::chrono::high_resolution_clock>
virtual void dx::clock< clock_t >::notify ( )
inlineprotectedvirtualnoexcept
dx::event< kernel >::operator os_event ( )
inlinenoexceptinherited
event& dx::event< user >::reset ( )
inlineinherited

+ Here is the caller graph for this function:

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

+ Here is the caller graph for this function:

template<typename clock_t = std::chrono::high_resolution_clock>
virtual void dx::clock< clock_t >::sync ( const typename clock_t::time_point &  now)
inlineprotectedvirtual
template<typename clock_t = std::chrono::high_resolution_clock>
virtual void dx::clock< clock_t >::tick ( )
protectedpure virtualnoexcept
template<typename clock_t = std::chrono::high_resolution_clock>
void dx::clock< clock_t >::wait ( )
inline

Member Data Documentation

template<typename clock_t = std::chrono::high_resolution_clock>
clock_t::duration dx::clock< clock_t >::duration = clock_t::duration::zero()
protected
Todo:
evaluate clock::status replacement (exception?)
template<typename clock_t = std::chrono::high_resolution_clock>
std::mutex dx::clock< clock_t >::mutex
protected
template<typename clock_t = std::chrono::high_resolution_clock>
clock_t::time_point dx::clock< clock_t >::objective
protected
template<typename clock_t = std::chrono::high_resolution_clock>
volatile bool dx::clock< clock_t >::running = false
protected
template<typename clock_t = std::chrono::high_resolution_clock>
os_result dx::clock< 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 Fri Nov 8 2019

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.