GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> PBS / dev > pbs / rhel6-32


Interface   Data Structures   File List   Data Fields   Globals  

TOC.h File Reference

TimeOut Control, prototypes and public data structures. More...

#include <PBS/TOV.h>
#include <PBS/TOC_comdefs.h>

Classes

struct  _TOC_cvt_s
 Structure specifying the conversion of an small range timeout (TOS) to a timeout value (TOV), via user provided TOV_cvt_s function. More...
struct  _TOC_cvt_v
 Structure specifying the timeout is being provided as an immediate timeout value (TOV). More...
struct  _TOC_cvt_x
 Structure specifying the conversion of an unsigned int to a timeout value (TOV), via user provided TOV_cvt_x style function. More...
union  _TOC_cvt
 A union of the all the converter styles. More...
struct  _TOC
 The timeout conversion control structure. More...

Typedefs

typedef enum _TOC_style TOC_style
typedef struct _TOC_cvt_s TOC_cvt_s
 Typedef for struct _TOC_cvt_s.
typedef struct _TOC_cvt_v TOC_cvt_v
 Typedef for struct _TOC_cvt_v.
typedef struct _TOC_cvt_x TOC_cvt_x
 Typedef for struct _TOC_cvt_x.
typedef union _TOC_cvt TOC_cvt
 Typedef for union _TOC_cvt.

Enumerations

enum  _TOC_style {
  TOC_K_STYLE_S = -1,
  TOC_K_STYLE_V = 0,
  TOC_K_STYLE_X = 1
}
 Enumerates the different way that a timeout may be specified. More...

Functions

void TOC_set_s (TOC *toc, TOV_cvt_s fnc, TOS tmo)
 Sets the TOV converter and value for small range timeouts.
void TOC_set_v (TOC *toc, TOV tmo)
 Sets the TOV converter and value for an immediate TOV.
void TOC_set_x (TOC *toc, TOV_cvt_x fnc, TOX tmo)
 Sets the TOV converter and value for extended range timeouts.
void TOC_reset_tos (TOC *toc, TOS tmo)
 Resets the small range timeout value. The timeout conversion routine is assumed to be have previously set using TOC_set_s.
void TOC_reset_tov (TOC *toc, TOV tmo)
 Resets the immediate timeout value. The timeout conversion routine is assumed to be have previously set using TOC_set_v.
void TOC_reset_tox (TOC *toc, TOX tmo)
 Resets the extended range timeout value. The timeout conversion routine is assumed to be have previously set using TOC_set_x.
TOV TOC_compute (const TOC *toc)
 Computes the timeout value (TOV) specified by the timeout control structure.


Detailed Description

TimeOut Control, prototypes and public data structures.

Author:
JJRussell - russell@slac.stanford.edu

    CVS $Id: TOC.h,v 1.5 2011/03/24 23:05:44 apw Exp $

SYNOPSIS
Provides a set of utility functions to define a timeout control structure. This structure is passed to most all routines that requirement implement a timeout. It serves as a universal method to convert a variety of time representations to a TimeOut Value, TOV.

Typedef Documentation

Typedef for struct _TOC_cvt_s.

This is one of the conversion styles, specified by TOC_styles, e.g. TOC_K_STYLE_CVT_S.

Typedef for struct _TOC_cvt_v.

This is one of the conversion styles, specified by TOC_styles, e.g. TOC_K_STYLE_CVT_V.

Typedef for struct _TOC_cvt_x.

This is one of the conversion styles, specified by TOC_styles, e.g. TOC_K_STYLE_CVT_X.

brief Typedef for enum _TOC_style

Warning:
This is an internal only data structure.


Enumeration Type Documentation

enum _TOC_style

Enumerates the different way that a timeout may be specified.

Enumerator:
TOC_K_STYLE_S  Convert using a TOV_cvt_s function
TOC_K_STYLE_V  Value is already a TOV
TOC_K_STYLE_X  Convert using a TOV_cvt_x function


Function Documentation

TOV TOC_compute ( const TOC toc  ) 

Computes the timeout value (TOV) specified by the timeout control structure.

Returns:
The timeout value specified by the timeout control structure
Parameters:
toc The timeout control structure

Referenced by RW__tmr_wait().

void TOC_reset_tos ( TOC toc,
TOS  tmo 
)

Resets the small range timeout value. The timeout conversion routine is assumed to be have previously set using TOC_set_s.

Parameters:
toc The target Timeout control structure.
tmo The new small range timeout value to convert.
Warning:
No check is made to assure that the conversion style is TOC_K_STYLE_S. It is the user's responsibility to ensure this.

void TOC_reset_tov ( TOC toc,
TOV  tmo 
)

Resets the immediate timeout value. The timeout conversion routine is assumed to be have previously set using TOC_set_v.

Parameters:
toc The target Timeout control structure.
tmo The new extended range timeout value to convert.
Warning:
No check is made to assure that the conversion style is TOC_K_STYLE_V. It is the user's responsibility to ensure this.

void TOC_reset_tox ( TOC toc,
TOX  tmo 
)

Resets the extended range timeout value. The timeout conversion routine is assumed to be have previously set using TOC_set_x.

Parameters:
toc The target Timeout control structure
tmo The new extended range timeout value to convert.
Warning:
No check is made to assure that the conversion style is TOC_K_STYLE_X. It is the user's responsibility to ensure this.

void TOC_set_s ( TOC toc,
TOV_cvt_s  fnc,
TOS  tos 
)

Sets the TOV converter and value for small range timeouts.

Parameters:
toc The target Timeout control structure
fnc The extended range to TOV converter function.
tos The value to convert

void TOC_set_v ( TOC toc,
TOV  tmo 
)

Sets the TOV converter and value for an immediate TOV.

Parameters:
toc The target Timeout control structure
tmo The TOV value to set.

void TOC_set_x ( TOC toc,
TOV_cvt_x  fnc,
TOX  tmo 
)

Sets the TOV converter and value for extended range timeouts.

Parameters:
toc The target Timeout control structure.
fnc The extended range to TOV converter.
tmo The extended range timeout value to convert.


Generated on Fri Aug 5 18:33:17 2011 by  doxygen 1.5.8