w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
Retro::Rtime Class Reference

FIXME_docs. More...

#include <Rtime.hpp>

Public Member Functions

 Rtime ()
 Default constructor.
 
 Rtime (clockid_t clkid)
 FIXME_docs.
 
 Rtime (double dt)
 FIXME_docs.
 
void GetClock (clockid_t clkid)
 FIXME_docs.
 
void SetSec (time_t sec)
 FIXME_docs.
 
void SetNSec (long nsec)
 FIXME_docs.
 
void Set (const struct timespec &ts)
 FIXME_docs.
 
void Set (double dt)
 FIXME_docs.
 
void Clear ()
 FIXME_docs.
 
bool IsZero () const
 FIXME_docs.
 
bool IsPositive () const
 FIXME_docs.
 
bool IsNegative () const
 FIXME_docs.
 
time_t Sec () const
 FIXME_docs.
 
long NSec () const
 FIXME_docs.
 
const struct timespec & Timespec () const
 FIXME_docs.
 
int ToMSec () const
 FIXME_docs.
 
double ToDouble () const
 FIXME_docs.
 
std::string ToString () const
 FIXME_docs.
 
double Age (clockid_t clkid) const
 FIXME_docs.
 
void Print (std::ostream &os) const
 FIXME_docs.
 
void Dump (std::ostream &os, int ind=0, const char *text=0) const
 FIXME_docs.
 
 operator double () const
 FIXME_docs.
 
Rtimeoperator+= (const Rtime &rhs)
 FIXME_docs.
 
Rtimeoperator-= (const Rtime &rhs)
 FIXME_docs.
 
bool operator== (const Rtime &rhs)
 FIXME_docs.
 
bool operator!= (const Rtime &rhs)
 FIXME_docs.
 
bool operator< (const Rtime &rhs)
 FIXME_docs.
 
bool operator<= (const Rtime &rhs)
 FIXME_docs.
 
bool operator> (const Rtime &rhs)
 FIXME_docs.
 
bool operator>= (const Rtime &rhs)
 FIXME_docs.
 

Protected Member Functions

void Fixup ()
 FIXME_docs.
 

Private Attributes

struct timespec fTime
 time
 

Related Functions

(Note that these are not member functions.)

Rtime operator+ (const Rtime &x, const Rtime &y)
 operator+: Rtime + Rtime.
 
Rtime operator- (const Rtime &x, const Rtime &y)
 operator-: Rtime - Rtime.
 
std::ostream & operator<< (std::ostream &os, const Rtime &obj)
 ostream insertion operator.
 

Detailed Description

FIXME_docs.

Definition at line 25 of file Rtime.hpp.

Constructor & Destructor Documentation

◆ Rtime() [1/3]

Retro::Rtime::Rtime ( )
inline

Default constructor.

Definition at line 25 of file Rtime.ipp.

◆ Rtime() [2/3]

Retro::Rtime::Rtime ( clockid_t  clkid)
inlineexplicit

FIXME_docs.

Definition at line 32 of file Rtime.ipp.

References GetClock().

◆ Rtime() [3/3]

Retro::Rtime::Rtime ( double  dt)
inlineexplicit

FIXME_docs.

Definition at line 40 of file Rtime.ipp.

References Set().

Member Function Documentation

◆ GetClock()

void Retro::Rtime::GetClock ( clockid_t  clkid)

◆ SetSec()

void Retro::Rtime::SetSec ( time_t  sec)
inline

FIXME_docs.

Definition at line 48 of file Rtime.ipp.

References fTime.

◆ SetNSec()

void Retro::Rtime::SetNSec ( long  nsec)

FIXME_docs.

Definition at line 52 of file Rtime.cpp.

References fTime.

◆ Set() [1/2]

void Retro::Rtime::Set ( const struct timespec &  ts)
inline

FIXME_docs.

Definition at line 56 of file Rtime.ipp.

References fTime.

Referenced by Rtime().

◆ Set() [2/2]

void Retro::Rtime::Set ( double  dt)
inline

FIXME_docs.

Definition at line 64 of file Rtime.ipp.

References fTime.

◆ Clear()

void Retro::Rtime::Clear ( )
inline

FIXME_docs.

Definition at line 76 of file Rtime.ipp.

References fTime.

Referenced by Retro::RlinkPort::RawRead(), Retro::RlinkConnect::WaitAttn(), and Retro::Rw11Cpu::WaitCpuActDown().

◆ IsZero()

bool Retro::Rtime::IsZero ( ) const
inline

FIXME_docs.

Definition at line 85 of file Rtime.ipp.

References fTime.

Referenced by Age(), and Retro::RlinkPacketBufRcv::ReadData().

◆ IsPositive()

◆ IsNegative()

bool Retro::Rtime::IsNegative ( ) const
inline

FIXME_docs.

Definition at line 101 of file Rtime.ipp.

References fTime.

Referenced by Retro::RlinkPort::PollRead().

◆ Sec()

time_t Retro::Rtime::Sec ( ) const
inline

FIXME_docs.

Definition at line 109 of file Rtime.ipp.

References fTime.

Referenced by Retro::Rw11CntlDEUNA::ExecGetcmd(), and Retro::RtimerFd::SetRelative().

◆ NSec()

long Retro::Rtime::NSec ( ) const
inline

FIXME_docs.

Definition at line 117 of file Rtime.ipp.

References fTime.

Referenced by Retro::RtimerFd::SetRelative().

◆ Timespec()

const struct timespec & Retro::Rtime::Timespec ( ) const
inline

FIXME_docs.

Definition at line 125 of file Rtime.ipp.

References fTime.

Referenced by Retro::RtimerFd::SetRelative().

◆ ToMSec()

int Retro::Rtime::ToMSec ( ) const
inline

FIXME_docs.

Definition at line 133 of file Rtime.ipp.

References fTime.

Referenced by Retro::RlinkPort::PollRead().

◆ ToDouble()

double Retro::Rtime::ToDouble ( ) const
inline

FIXME_docs.

Definition at line 142 of file Rtime.ipp.

References fTime.

Referenced by Print(), and Retro::Rw11Cpu::WaitCpuActDown().

◆ ToString()

std::string Retro::Rtime::ToString ( ) const

FIXME_docs.

Definition at line 62 of file Rtime.cpp.

References Print().

Referenced by Dump().

◆ Age()

double Retro::Rtime::Age ( clockid_t  clkid) const

FIXME_docs.

Definition at line 72 of file Rtime.cpp.

References IsZero().

Referenced by Retro::Rw11CntlDEUNA::Dump().

◆ Print()

void Retro::Rtime::Print ( std::ostream &  os) const

FIXME_docs.

Definition at line 82 of file Rtime.cpp.

References fTime, Retro::RosPrintf(), and ToDouble().

Referenced by operator<<(), and ToString().

◆ Dump()

void Retro::Rtime::Dump ( std::ostream &  os,
int  ind = 0,
const char *  text = 0 
) const

FIXME_docs.

Definition at line 103 of file Rtime.cpp.

References fTime, Retro::RosPrintf(), and ToString().

◆ operator double()

Retro::Rtime::operator double ( ) const
inlineexplicit

FIXME_docs.

Definition at line 150 of file Rtime.ipp.

◆ operator+=()

Rtime & Retro::Rtime::operator+= ( const Rtime rhs)
inline

FIXME_docs.

Definition at line 158 of file Rtime.ipp.

References Fixup(), and fTime.

◆ operator-=()

Rtime & Retro::Rtime::operator-= ( const Rtime rhs)
inline

FIXME_docs.

Definition at line 169 of file Rtime.ipp.

References Fixup(), and fTime.

◆ operator==()

bool Retro::Rtime::operator== ( const Rtime rhs)
inline

FIXME_docs.

Definition at line 180 of file Rtime.ipp.

References fTime.

Referenced by operator!=().

◆ operator!=()

bool Retro::Rtime::operator!= ( const Rtime rhs)
inline

FIXME_docs.

Definition at line 189 of file Rtime.ipp.

References operator==().

◆ operator<()

bool Retro::Rtime::operator< ( const Rtime rhs)
inline

FIXME_docs.

Definition at line 197 of file Rtime.ipp.

References fTime.

Referenced by operator>=().

◆ operator<=()

bool Retro::Rtime::operator<= ( const Rtime rhs)
inline

FIXME_docs.

Definition at line 207 of file Rtime.ipp.

References fTime.

Referenced by operator>().

◆ operator>()

bool Retro::Rtime::operator> ( const Rtime rhs)
inline

FIXME_docs.

Definition at line 217 of file Rtime.ipp.

References operator<=().

◆ operator>=()

bool Retro::Rtime::operator>= ( const Rtime rhs)
inline

FIXME_docs.

Definition at line 225 of file Rtime.ipp.

References operator<().

◆ Fixup()

void Retro::Rtime::Fixup ( )
inlineprotected

FIXME_docs.

Definition at line 233 of file Rtime.ipp.

References fTime.

Referenced by operator+=(), and operator-=().

Friends And Related Function Documentation

◆ operator+()

Rtime operator+ ( const Rtime x,
const Rtime y 
)
related

operator+: Rtime + Rtime.

Definition at line 251 of file Rtime.ipp.

◆ operator-()

Rtime operator- ( const Rtime x,
const Rtime y 
)
related

operator-: Rtime - Rtime.

Definition at line 264 of file Rtime.ipp.

◆ operator<<()

std::ostream & operator<< ( std::ostream &  os,
const Rtime obj 
)
related

ostream insertion operator.

Definition at line 277 of file Rtime.ipp.

References Print().

Member Data Documentation

◆ fTime

struct timespec Retro::Rtime::fTime
private

The documentation for this class was generated from the following files: