GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > PBS / V2-10-15

Constituent: pbs     Tag: mv2304


Interface   Data Structures   File List   Data Fields   Globals  

TOV.h File Reference

TimeOut Value definition and manipulation routines. More...

#include "PBS/WCT.h"

Include dependency graph for TOV.h:

This graph shows which files directly or indirectly include this file:


Defines

#define TOV_K_NSECS_IN_A_SEC   (1000 * 1000 * 1000)
 Convenience symbol defining the number of nanoseconds in a second.

Typedefs

typedef TOV(* TOV_cvt_s )(unsigned int delta)
 Signature of a function to convert a timeout value in arbitrary units (but known to the converter) to a TOV.
typedef TOV(* TOV_cvt_x )(long long int delta)
 Signature of a function to convert a timeout value in arbitrary units (but known to the converter) to a TOV.

Functions

TOV TOV_add_nsecx (TOV tov, signed long long int dnsecx)
 Returns the timeout value delta nanoseconds from the specified tov.
TOV TOV_add_nsecs (TOV tov, unsigned int dnsecs)
 Returns the timeout value delta nanoseconds from the specified tov.
TOV TOV_from_nsecx (long long int dnsecx)
 Returns the timeout value dsecx nanoseconds from the current time.
TOV TOV_from_nsecs (unsigned int dnsecs)
 Returns the timeout value dnsecs nanoseconds from the current time.
TOV TOV_from_usecs (unsigned int dusecs)
 Returns the timeout value delta microseconds from the current time.
TOV TOV_from_secs (unsigned int dsecs)
 Returns the timeout value dsecs seconds from the current time.
TOV TOV_from_wct (WCT_time atime)
 Returns the timeout value corresponding to the specified Wall Clock Time wct.

Detailed Description

TimeOut Value definition and manipulation routines.

Author:
JJRussell - russell@slac.stanford.edu
    CVS $Id: TOV.h,v 1.4 2004/12/07 16:13:06 russell Exp $

Provides a set of utility functions to define a timeout time. The timeout is always given in terms of absolute time, but the exact specification is platform dependent.


Typedef Documentation

TOV_cvt_s
 

Signature of a function to convert a timeout value in arbitrary units (but known to the converter) to a TOV.

All timeouts must eventually be expressed as a TOV. The exact representation of this is platform dependent. Most code would like to specify a timeout in natural delta units, like seconds, micro-seconds, nano-seconds. A feature of a TOV is that, on some systems, it is an absolute time. Therefore, the conversion from a delta units to a TOV must be done when the blocking operation to be timed out is posted. That is, no cannot precompute the timeout value and store it for latter use. In this case, one stores the delta unit and a pointer to a function that can implement the conversion.

The timeout period to be converted is expressed as unsigned int. If a longer timeout period is needed, consider TOV_cvt_x, for the larger range, a 64-bit signed delta.

In most cases, the converter will be one of the TOV routines, although nothing prohibits the user from providing his own.

TOV_cvt_x
 

Signature of a function to convert a timeout value in arbitrary units (but known to the converter) to a TOV.

All timeouts must eventually be expressed as a TOV. The exact representation of this is platform dependent. Most code would like to specify a timeout in natural delta units, like seconds, micro-seconds, nano-seconds. A feature of a TOV is that, on some systems, it is an absolute time. Therefore, the conversion from a delta units to a TOV must be done when the blocking operation to be timed out is posted. That is, no cannot precompute the timeout value and store it for latter use. In this case, one stores the delta unit and a pointer to a function that can implement the conversion.

The timeout period to be converted is expressed as signed long long value. This is gives an extended range necessary for very long timeouts. If a smaller range is all that is necessary, consider TOV_cvt_s.

In most cases, the converter will be one of the TOV routines, although nothing prohibits the user from providing his own.


Function Documentation

TOV TOV_add_nsecs TOV  tov,
unsigned int  dnsecs
 

Returns the timeout value delta nanoseconds from the specified tov.

Parameters:
tov The TOV to add to
dnsecs The number of nanoseconds to add.
Return values:
The timeout value delta nanoseconds from tov.

TOV TOV_add_nsecx TOV  tov,
signed long long int  dnsecx
 

Returns the timeout value delta nanoseconds from the specified tov.

Parameters:
tov The TOV to add to
dnsecx The number of nanoseconds to add.
Return values:
The timeout value delta nanoseconds from tov.

TOV TOV_from_nsecs unsigned int  dnsecs  ) 
 

Returns the timeout value dnsecs nanoseconds from the current time.

Parameters:
dnsecs The delta time in nanoseconds
Return values:
The timeout value dnsecs nanoseconds from the current time.

TOV TOV_from_nsecx long long int  dnsecx  ) 
 

Returns the timeout value dsecx nanoseconds from the current time.

Parameters:
dnsecx The delta time in extended nanoseconds.
Return values:
The timeout value delta nanoseconds from the current time.

TOV TOV_from_secs unsigned int  dsecs  ) 
 

Returns the timeout value dsecs seconds from the current time.

Parameters:
dsecs The delta time in seconds.
Return values:
The timeout value dsecs seconds from the current time.

TOV TOV_from_usecs unsigned int  dusecs  ) 
 

Returns the timeout value delta microseconds from the current time.

Parameters:
dusecs The delta time in microseconds.
Return values:
The timeout value usecs microseconds from the current time.

TOV TOV_from_wct WCT_time  wct  ) 
 

Returns the timeout value corresponding to the specified Wall Clock Time wct.

Parameters:
wct The Wall Clock Time to convert to a TOV.
Return values:
The corresponding TOV


Generated on Thu Mar 22 05:27:30 2007 by  doxygen 1.4.4