GLAST/LAT >
DAQ and FSW >
FSW >
Doxygen Index >
PBS / V2-10-5
Constituent: pbs     Tag: rad750
Interface Data Structures File List Data Fields Globals
WCT_pvtdefs.ih.vx-xxx-xxx File Reference
Package private inlines, structures and typedefs for the WCT (Wall Clock Time) facility for VXWORK's platform.
More...
#include "PBS/PTS.h"
#include "PBS/INT.ih"
#include "LSU_pvt.ih"
#include "PBI/Unions.h"
Include dependency graph for WCT_pvtdefs.ih.vx-xxx-xxx:
|
Functions |
WCT__EXP_PROTO unsigned int | WCT__pticks_to_aticks (unsigned int pticks) ATTR_UNUSED_OK |
| Converts processor clock ticks to absolute clock ticks.
|
WCT__EXP_PROTO unsigned int | WCT__aticks_to_pticks (unsigned int aticks) ATTR_UNUSED_OK |
| Converts absolute clock ticks to processor clock ticks.
|
WCT__EXP_PROTO long long | WCT__diff_aticks (register WCT_time atime) ATTR_UNUSED_OK |
| Computes the difference between the current time and the specified time in terms of processor ticks.
|
WCT__EXP_PROTO long long | WCT__diff_aticksL (register WCT_time atime) ATTR_UNUSED_OK |
| Computes the difference between the current time and the specified time in terms of processor ticks.
|
WCT__LCL_PROTO WCT_time | wct__get (void) |
| Retrieves the current time in absolute time units.
|
WCT__LCL_PROTO long long | wct__diff_aticks (register WCT_time dtime, register WCT_time btime, unsigned int btick, unsigned int scale) |
| Computes the difference between the current time and the specified time in terms of processor ticks.
|
WCT__LCL_PROTO unsigned int | wct__update (void) |
| Updates the time base in the scaling factors to the current time (both atime and ptime), without changing the scaling factor.
|
WCT__EXP_FNC WCT_time | WCT__utb_get () |
| Fetches the current absolute time, using the UNIX epoch as a base/.
|
Variables |
_WCT | Wct |
| The global control structure for WCT.
|
Detailed Description
Package private inlines, structures and typedefs for the WCT (Wall Clock Time) facility for VXWORK's platform.
- Author:
- JJRussell - russell@slac.stanford.edu
CVS $Id: WCT_pvtdefs.ih.vx-xxx-xxx,v 1.4 2005/05/04 20:53:05 russell Exp $
Function Documentation
WCT__EXP_FNC unsigned int WCT__aticks_to_pticks |
( |
unsigned int |
aticks |
) |
|
|
|
Converts absolute clock ticks to processor clock ticks.
- Parameters:
-
aticks | The number of absolute clock ticks to convert to processor clock ticks. |
- Returns:
- The equivalent number of processor clock ticks.
- Converts absolute clock ticks to processor clock ticks. This conversion always uses the most recent calibration of the processor clock available.
- It is expected that the only use of this routine will be in setting the decrement counter used by the timer interrupt routines (see the WUT facility.)
|
Here is the call graph for this function:
long long wct__diff_aticks |
( |
register WCT_time |
dtime, |
|
|
register WCT_time |
btime, |
|
|
unsigned int |
btick, |
|
|
unsigned int |
scale |
|
) |
|
|
|
Computes the difference between the current time and the specified time in terms of processor ticks.
long long wct__diff_aticks (register WCT_time dtime, register WCT_time btime, unsigned int btick, unsigned int scale)
- Parameters:
-
dtime | The specified time |
btime | The base time at the last WCT_set |
btick | The base processor tick at the last WCT_set |
scale | The multiplying scale factor to change absolute clock ticks (nanoseconds) to processor ticks. |
- Returns:
- The difference if > 0, else an arbitray negative number indicating the time is in the past.
- This is a member of the wct__diff suite. Is is internally callable only.
|
Here is the call graph for this function:
WCT__EXP_FNC long long WCT__diff_aticks |
( |
register WCT_time |
dtime |
) |
|
|
|
Computes the difference between the current time and the specified time in terms of processor ticks.
- Parameters:
-
- Returns:
- The difference if > 0, else an arbitray negative number indicating the time is in the past.
- This is a member of the wct__diff suite. It must be called with interrupts locked.
|
Here is the call graph for this function:
WCT__EXP_FNC long long WCT__diff_aticksL |
( |
register WCT_time |
dtime |
) |
|
|
|
Computes the difference between the current time and the specified time in terms of processor ticks.
- Parameters:
-
- Returns:
- The difference if > 0, else an arbitray negative number indicating the time is in the past.
- This is a member of the wct__diff suite. It may be called with interrupts locked or unlocked.
|
Here is the call graph for this function:
|
Retrieves the current time in absolute time units.
- This routine is coded to be a cheap call on the PowerPC, involving less than 20 cycles. Other implementations may be more expensive.
|
Here is the call graph for this function:
WCT__EXP_FNC unsigned int WCT__pticks_to_aticks |
( |
unsigned int |
pticks |
) |
|
|
|
Converts processor clock ticks to absolute clock ticks.
- Parameters:
-
pticks | The number of processor clock ticks to convert to aticks |
- Returns:
- The equivalent number of absolute clock ticks.
- Converts processor clock ticks to absolute clock ticks. This conversion always uses the most recent calibration of the processor clock available.
- It is expected that the only real use of this routine is to implement WCT_gt().
|
Here is the call graph for this function:
WCT__LCL_FNC unsigned int wct__update |
( |
void |
|
) |
|
|
|
Updates the time base in the scaling factors to the current time (both atime and ptime), without changing the scaling factor.
- This routine is a replacement for WCT_announce and is used to keep the range that the time conversion routines must function over in check. The problem with the WCT_announce was that it did a WCT_get folllowed by a PTS_get, meaning the atime and ptime are calculated at two different times. This routine gets the current ptime and uses it to calculate the absolute time (atime). The ptime and resulting atime are then used to update the time base.
- Warning:
- This routine must be done with interrupt locked or otherwise ensure that the scaling parameters are not being changed out from underneath it. Since this routine will most naturally be called back in the context of an WUT interrupt routine, the interrupt locking or whatever other mechanism is used to ensure the stability of the scaling parameters is left to the caller.
|
Here is the call graph for this function:
WCT__EXP_FNC WCT_time WCT__utb_get |
( |
void |
|
) |
|
|
|
Fetches the current absolute time, using the UNIX epoch as a base/.
- Returns:
- The current absolute time
|
Here is the call graph for this function:
Variable Documentation
|
The global control structure for WCT.
- This variable must be exposed to allow the inline implementation of the conversion routines. No other routine within the package should access this structure.
|
Generated on Tue Sep 13 21:48:20 2005 by
1.3.3