#include <TAO_Time_Service_Server.h>
Public Member Functions | |
TAO_Time_Service_Server (void) | |
Constructor. | |
~TAO_Time_Service_Server (void) | |
Destructor. | |
virtual CosTime::UTO_ptr | universal_time (void) |
virtual CosTime::UTO_ptr | secure_universal_time (void) |
virtual CosTime::UTO_ptr | new_universal_time (TimeBase::TimeT time, TimeBase::InaccuracyT inaccuracy, TimeBase::TdfT tdf) |
This creates a new UTO based on the given parameters. | |
virtual CosTime::UTO_ptr | uto_from_utc (const TimeBase::UtcT &utc) |
This creates a new UTO given a time in the UtcT form. | |
virtual CosTime::TIO_ptr | new_interval (TimeBase::TimeT lower, TimeBase::TimeT upper) |
This creates a new TIO with the given parameters. |
The Object implementation implements methods to retrieve current time as well as secure current time. The times are retrieved as UTOs. The object also allows creation of a TIO for a given time interval. In general, the TimeService manages the UTOs and the TIOs. The notion of time returned here is the local time of the system.
Definition at line 38 of file TAO_Time_Service_Server.h.
TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Time_Service_Server::TAO_Time_Service_Server | ( | void | ) |
TAO_Time_Service_Server::~TAO_Time_Service_Server | ( | void | ) |
CosTime::TIO_ptr TAO_Time_Service_Server::new_interval | ( | TimeBase::TimeT | lower, | |
TimeBase::TimeT | upper | |||
) | [virtual] |
This creates a new TIO with the given parameters.
Definition at line 99 of file TAO_Time_Service_Server.cpp.
References ACE_NEW_THROW_EX.
00101 { 00102 TAO_TIO *tio = 0; 00103 00104 ACE_NEW_THROW_EX (tio, 00105 TAO_TIO (lower, 00106 upper), 00107 CORBA::NO_MEMORY ()); 00108 00109 return tio->_this (); 00110 }
CosTime::UTO_ptr TAO_Time_Service_Server::new_universal_time | ( | TimeBase::TimeT | time, | |
TimeBase::InaccuracyT | inaccuracy, | |||
TimeBase::TdfT | tdf | |||
) | [virtual] |
This creates a new UTO based on the given parameters.
Definition at line 65 of file TAO_Time_Service_Server.cpp.
References ACE_NEW_THROW_EX.
00068 { 00069 TAO_UTO *uto = 0; 00070 00071 ACE_NEW_THROW_EX (uto, 00072 TAO_UTO (time, 00073 inaccuracy, 00074 tdf), 00075 CORBA::NO_MEMORY ()); 00076 00077 return uto->_this (); 00078 }
CosTime::UTO_ptr TAO_Time_Service_Server::secure_universal_time | ( | void | ) | [virtual] |
This operation returns the current time in a UTO only if the time can be guaranteed to have been obtained securely. Currently this operation is not implemented and throws a CORBA::NO_IMPLEMENT exception, if called.
Definition at line 57 of file TAO_Time_Service_Server.cpp.
CosTime::UTO_ptr TAO_Time_Service_Server::universal_time | ( | void | ) | [virtual] |
This operation returns the current system time and an estimate of inaccuracy in a UTO.
Definition at line 30 of file TAO_Time_Service_Server.cpp.
References ACE_DEBUG, ACE_NEW_THROW_EX, ACE_OS::gettimeofday(), LM_DEBUG, TAO_debug_level, and timestamp().
00031 { 00032 TAO_UTO *uto = 0; 00033 00034 TimeBase::TimeT timestamp; 00035 ORBSVCS_Time::Absolute_Time_Value_to_TimeT(timestamp, ACE_OS::gettimeofday()); 00036 00037 // Return the local time of the system as a UTO. 00038 ACE_NEW_THROW_EX (uto, 00039 TAO_UTO (timestamp, 00040 0, 00041 0), 00042 CORBA::NO_MEMORY ()); 00043 00044 00045 if (TAO_debug_level > 0) 00046 ACE_DEBUG ((LM_DEBUG, 00047 "Returning a UTO\n")); 00048 00049 return uto->_this (); 00050 }
CosTime::UTO_ptr TAO_Time_Service_Server::uto_from_utc | ( | const TimeBase::UtcT & | utc | ) | [virtual] |
This creates a new UTO given a time in the UtcT form.
Definition at line 83 of file TAO_Time_Service_Server.cpp.
References ACE_NEW_THROW_EX.
00084 { 00085 TAO_UTO *uto = 0; 00086 00087 ACE_NEW_THROW_EX (uto, 00088 TAO_UTO (utc.time, 00089 utc.inacclo + utc.inacchi, 00090 utc.tdf), 00091 CORBA::NO_MEMORY ()); 00092 00093 return uto->_this (); 00094 }