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.vx-xxx-xxx File Reference

Defines the representation of a timeout value for a VXWORKS platform. More...


Defines

#define TOV_K_FOREVER   (-1)
 The TOV value corresponding to an indefinite wait. The actual value and representation is platform dependent. On some platforms this may be implemented as an inline routine.
#define TOV_K_NOWAIT   (0)
 The TOV value corresponding to an no waiting. The actual value and representation is platform dependent. On some platforms this may be implemented as an inline routine.
#define TOV_IS_FOREVER(_tov)   ((_tov) == TOV_K_FOREVER)
 Checks if the specified TOV value tov, is the TOV forever value.
#define TOV_IS_NOWAIT(_tov)   ((_tov) == TOV_K_NOWAIT)
 Checks if the specified TOV value tov, is the TOV nowait value.
#define TOV_SECS(_tov)   ((unsigned int)((_tov) / TOV_K_NSECS_IN_A_SEC))
 Returns the number of full seconds in the timeout value.
#define TOV_NSECS(_tov)   ((unsigned int)((_tov) % TOV_K_NSECS_IN_A_SEC))
 Returns the number of nanoseconds in the timeout value.
#define TOV_FROM_SECS_NSECS(_secs, _nsecs)
 Converts the specified number of seconds and nanoseconds to a TOV value.
#define TOV_EXTRACT_SECS_NSECS(_tov, _secs, _nsecs)
 Extracts the number of seconds/nanoseconds.

Typedefs

typedef unsigned long long int TOV
 An implementation dependent definition of the time out services.


Detailed Description

Defines the representation of a timeout value for a VXWORKS platform.

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

Define Documentation

#define TOV_EXTRACT_SECS_NSECS _tov,
_secs,
_nsecs   ) 
 

Value:

{                                                   \
   _secs  = (_tov) / TOV_K_NSECS_IN_A_SEC;          \
   _nsecs = (_tov) - TOV_K_NSECS_IN_A_SEC * (_secs);\
}
Extracts the number of seconds/nanoseconds.

Parameters:
_tov The tov to breack down
_secs The number of full seconds in the specified TOV
_nsecs The number of nanoseconds remaining after the full seconds
The implementation of this macro is platform dependent.

#define TOV_FROM_SECS_NSECS _secs,
_nsecs   ) 
 

Value:

(unsigned long long int)((((unsigned long long int)(_secs) *              \
                            (unsigned long long int)TOV_K_NSECS_IN_A_SEC)) \
                        +   (_nsecs))
Converts the specified number of seconds and nanoseconds to a TOV value.

Parameters:
_secs The number of seconds (presumably since the epoch)
_nsecs The number of nanoseconds (a delta less than 1 billion)
Returns:
The corresponding TOV.
The implementation of this macro is platform dependent.

#define TOV_IS_FOREVER _tov   )     ((_tov) == TOV_K_FOREVER)
 

Checks if the specified TOV value tov, is the TOV forever value.

Parameters:
_tov The TOV value to be checked.
Returns:
Non zero if true, else 0.

#define TOV_IS_NOWAIT _tov   )     ((_tov) == TOV_K_NOWAIT)
 

Checks if the specified TOV value tov, is the TOV nowait value.

Parameters:
_tov The TOV value to be checked.
Returns:
Non zero if true, else 0.

#define TOV_NSECS _tov   )     ((unsigned int)((_tov) % TOV_K_NSECS_IN_A_SEC))
 

Returns the number of nanoseconds in the timeout value.

Parameters:
_tov The timeout value to extract the number of nanoseconds from
Returns:
The fractional number of nanoseconds in the timeout value
This macro, along with TOV_SECS(), allows the user to breakdown a timeout value into seconds and nanoseconds. The user may also wish to consider using macro TOV_EXTRACT_SECS_NSECS(), which, on some platforms, is a more efficient means of breaking a timeout value down.

#define TOV_SECS _tov   )     ((unsigned int)((_tov) / TOV_K_NSECS_IN_A_SEC))
 

Returns the number of full seconds in the timeout value.

Parameters:
_tov The timeout value to extract the number of seconds from
Returns:
The number of full seconds in the timeout value
This macro, along with TOV_NSECS(), allows the user to breakdown a timeout value into seconds and nanoseconds. The user may also wish to consider using macro TOV_EXTRACT_SECS_NSECS(), which, on some platforms, is a more efficient means of breaking a timeout value down.


Typedef Documentation

TOV
 

An implementation dependent definition of the time out services.

This data structure should not be manipulated by an user code. The only reason this data structure is exposed is to allow the user to declare an instance of a TOV. The user should only use the declared routines to interface with a TOV.


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