OpenDDS
Snapshot(2023/04/28-20:55)
|
#include <TimePoint_T.h>
Public Types | |
typedef AceClock | ClockType |
typedef ACE_Time_Value_T< AceClock > | ValueType |
![]() | |
typedef void(SafeBoolBase::* | BoolType) () const |
Public Member Functions | |
TimePoint_T () | |
bool | is_zero () const |
bool | boolean_test () const |
bool | is_max () const |
void | set_to_now () |
DDS::Time_t | to_dds_time () const |
MonotonicTime_t | to_monotonic_time () const |
TimePoint_T< AceClock > & | operator+= (const TimeDuration &td) |
TimePoint_T< AceClock > & | operator-= (const TimeDuration &td) |
TimePoint_T (const ACE_Time_Value &ace_time_value) | |
TimePoint_T (const ACE_Time_Value_T< AceClock > &ace_time_value) | |
TimePoint_T (const DDS::Time_t &dds_time) | |
const ACE_Time_Value_T< AceClock > & | value () const |
void | value (const ACE_Time_Value_T< AceClock > &ace_time_value) |
![]() | |
operator BoolType () const | |
![]() | |
void | this_type_does_not_support_comparisons () const |
Static Public Member Functions | |
static TimePoint_T< AceClock > | now () |
Static Public Attributes | |
static const TimePoint_T< AceClock > | zero_value |
static const TimePoint_T< AceClock > | max_value |
Protected Attributes | |
ValueType | value_ |
Static Protected Attributes | |
static ClockType | clock |
Additional Inherited Members | |
![]() | |
~SafeBool_T () | |
![]() | |
SafeBoolBase () | |
SafeBoolBase (const SafeBoolBase &) | |
SafeBoolBase & | operator= (const SafeBoolBase &) |
~SafeBoolBase () | |
Represents a specific time in reference to a ACE_Time_Policy and is based on C++11 std::chrono::time_point.
This wraps an ACE_Time_Value, but is designed to enforce the logic that this represents a specific point in time. For example, you can't directly add two TimePoints like you can add two ACE_Time_Values, because that wouldn't make sense. Following this theme, all the constructors are to be explicit to avoid careless implicit conversions.
See https://opendds.readthedocs.io/en/master/internal/dev_guidelines.html#time (or docs/internal/dev_guidelines.rst) for background and reasoning for this class.
Definition at line 35 of file TimePoint_T.h.
typedef AceClock OpenDDS::DCPS::TimePoint_T< AceClock >::ClockType |
Definition at line 37 of file TimePoint_T.h.
typedef ACE_Time_Value_T<AceClock> OpenDDS::DCPS::TimePoint_T< AceClock >::ValueType |
Definition at line 38 of file TimePoint_T.h.
ACE_INLINE OpenDDS::DCPS::TimePoint_T< AceClock >::TimePoint_T | ( | ) |
Set to zero_value, which is equal to the epoch (the starting point) of the AceClock.
Definition at line 12 of file TimePoint_T.inl.
|
explicit |
Assign the value directly to the inner value doing conversions as necessary.
Definition at line 19 of file TimePoint_T.inl.
|
explicit |
Assign the value directly to the inner value doing conversions as necessary.
Definition at line 26 of file TimePoint_T.inl.
|
explicit |
Assign the value directly to the inner value doing conversions as necessary.
Definition at line 33 of file TimePoint_T.inl.
|
inline |
Definition at line 83 of file TimePoint_T.h.
ACE_INLINE bool OpenDDS::DCPS::TimePoint_T< AceClock >::is_max | ( | ) | const |
Is the object equal to the maximum possible value, max_value?
Definition at line 73 of file TimePoint_T.inl.
Referenced by OpenDDS::DCPS::TimePoint_T< SystemClock >::boolean_test().
ACE_INLINE bool OpenDDS::DCPS::TimePoint_T< AceClock >::is_zero | ( | ) | const |
Is the object equal to zero_value?
Definition at line 65 of file TimePoint_T.inl.
Referenced by OpenDDS::DCPS::DataLink::handle_exception(), OpenDDS::DCPS::DataLink::handle_timeout(), OpenDDS::DCPS::DomainParticipantImpl::participant_liveliness_activity_after(), OpenDDS::DCPS::DataReaderImpl::process_deadline(), OpenDDS::DCPS::Service_Participant::repository_lost(), OpenDDS::DCPS::DataLink::schedule_stop(), OpenDDS::DCPS::MessageTracker::wait_messages_pending(), OpenDDS::DCPS::WriteDataContainer::wait_pending(), and OpenDDS::DCPS::ConditionVariable< ACE_Thread_Mutex >::wait_until().
|
static |
Get a TimePoint representing the current time of the AceClock.
Definition at line 41 of file TimePoint_T.inl.
ACE_INLINE TimePoint_T< AceClock > & OpenDDS::DCPS::TimePoint_T< AceClock >::operator+= | ( | const TimeDuration & | td | ) |
Definition at line 105 of file TimePoint_T.inl.
Referenced by OpenDDS::DCPS::TimePoint_T< SystemClock >::boolean_test().
ACE_INLINE TimePoint_T< AceClock > & OpenDDS::DCPS::TimePoint_T< AceClock >::operator-= | ( | const TimeDuration & | td | ) |
Definition at line 114 of file TimePoint_T.inl.
Referenced by OpenDDS::DCPS::TimePoint_T< SystemClock >::boolean_test().
ACE_INLINE void OpenDDS::DCPS::TimePoint_T< AceClock >::set_to_now | ( | ) |
Set the value to the current time of the AceClock Type.
Definition at line 81 of file TimePoint_T.inl.
Referenced by OpenDDS::DCPS::DataReaderImpl::accept_sample_processing(), OpenDDS::DCPS::DomainParticipantImpl::assert_liveliness(), OpenDDS::DCPS::TimePoint_T< SystemClock >::boolean_test(), OpenDDS::DCPS::DataReaderImpl_T< DynamicSample >::filter_delayed(), OpenDDS::ICE::Checklist::indication(), OpenDDS::ICE::Checklist::succeeded(), and OpenDDS::DCPS::DataWriterImpl::write().
ACE_INLINE DDS::Time_t OpenDDS::DCPS::TimePoint_T< AceClock >::to_dds_time | ( | ) | const |
Convert to DDS::Time_t. This is probably only desirable for the system time version of this template class, SystemTimePoint.
Definition at line 89 of file TimePoint_T.inl.
Referenced by OpenDDS::DCPS::TimePoint_T< SystemClock >::boolean_test(), OpenDDS::DCPS::InternalDataReader< T >::Instance::can_purge_instance(), OpenDDS::DCPS::InternalDataReader< T >::Instance::dispose(), OpenDDS::DCPS::DomainParticipantImpl::get_current_time(), OpenDDS::FaceTSS::populate_header_received(), OpenDDS::DCPS::InternalDataReader< T >::Instance::purge_samples(), OpenDDS::DCPS::ReceivedDataElement::ReceivedDataElement(), OpenDDS::DCPS::DataWriterImpl::send_request_ack(), OpenDDS::DCPS::DataReaderImpl_T< DynamicSample >::set_instance_state_i(), and OpenDDS::DCPS::InternalDataReader< T >::Instance::unregister_instance().
ACE_INLINE MonotonicTime_t OpenDDS::DCPS::TimePoint_T< AceClock >::to_monotonic_time | ( | ) | const |
Convert to OpenDDS::DCPS::MonotonicTime_t.
Definition at line 97 of file TimePoint_T.inl.
Referenced by OpenDDS::DCPS::TimePoint_T< SystemClock >::boolean_test().
ACE_INLINE const ACE_Time_Value_T< AceClock > & OpenDDS::DCPS::TimePoint_T< AceClock >::value | ( | void | ) | const |
Get and set the inner ACE_Time_Value based value. Use value() to pass this into ACE code that requires a point in time matching this ones clock type.
Definition at line 49 of file TimePoint_T.inl.
Referenced by OpenDDS::DCPS::operator!=(), OpenDDS::DCPS::operator+(), OpenDDS::DCPS::operator-(), OpenDDS::DCPS::operator<(), OpenDDS::DCPS::operator<=(), OpenDDS::DCPS::operator==(), OpenDDS::DCPS::operator>(), OpenDDS::DCPS::operator>=(), OpenDDS::DCPS::MessageTracker::wait_messages_pending(), OpenDDS::DCPS::WriteDataContainer::wait_pending(), and OpenDDS::DCPS::ConditionVariable< ACE_Thread_Mutex >::wait_until().
ACE_INLINE void OpenDDS::DCPS::TimePoint_T< AceClock >::value | ( | const ACE_Time_Value_T< AceClock > & | ace_time_value | ) |
Get and set the inner ACE_Time_Value based value. Use value() to pass this into ACE code that requires a point in time matching this ones clock type.
Definition at line 57 of file TimePoint_T.inl.
|
staticprotected |
Strangely, ACE_Time_Policy must be objects to get their time values, so keep a static object.
Definition at line 117 of file TimePoint_T.h.
|
static |
Definition at line 41 of file TimePoint_T.h.
|
protected |
Definition at line 119 of file TimePoint_T.h.
|
static |
Definition at line 40 of file TimePoint_T.h.
Referenced by OpenDDS::DCPS::TimePoint_T< SystemClock >::boolean_test().