GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > IPBS / V0-0-1

Constituent: pbs     Tag: i845e


Interface   Data Structures   File List   Data Fields   Globals  

WUT.c.vx-xxx-xxx File Reference

WakeUp Timer facility. More...

#include <vxWorks.h>
#include <sysLib.h>
#include <tickLib.h>
#include <time.h>
#include <intLib.h>
#include <wdLib.h>
#include "PBI/Unions.h"
#include "VBI/Alias.h"

Include dependency graph for WUT.c.vx-xxx-xxx:


Data Structures

struct  _WCB_specific
 The platform specific piece of the WUT control structure. More...
struct  _WCB
 WakeUp Control Block. More...

Typedefs

typedef _WCB_specific WCB_specific
 Typedef for struct _WCB_specific.

Functions

static __inline void wut_period_set (unsigned int period)
 Informs VxWorks of a new clock rate.
int wut_sys_shutdown (WCB *wcb)
 Platform specific shutdown procedure.
void WUT_sys_handler (void)
 The facility's internal Interrupt Service Routine.
STATIC int cmp_lt_tov (TOV tov_a, TOV tov_b)
 Platform implementation dependent routine to compare to timeout values.
static int ticks_until_tov (TOV tov)
static void arm_watchdog (TOV tov)
STATIC int lock_que (WCB *wcb)
 Platform implementation dependent routine to lock the WUT timer que.
STATIC void unlock_que (WCB *wcb, int key)
 Platform implementation dependent routine to unlock the WUT timer que.
STATIC void arm_handler (WCB *wcb, TOV tov)
 Seeds the timer interrupt to handle expire a tov.
STATIC void arm_handler_nxt_wut (WCB *wcb, const WUT_tmr *wut)
 Seeds the timer interrupt to handle expire at the timeout associated with the specified WUT timer entry.
int wut_sys_connect (WCB *wcb)
 Platform dependent part of the WUT system connection process.
int WUT_dec_get ()
 Gets the current time left till the next timer expiration.
WUT_cb_status WUT_keepalive_rtn (WUT_keepalive_ctx *keepalive, WUT_tmr *wut)
 Simple WUT timer callback routine used to drive the VxWorks system clock.

Variables

static WCB Wcb
 Statically allocate control block as a facilty private structure.

Detailed Description

WakeUp Timer facility.

Author:
JJRussell - russell@slac.stanford.edu
   CVS $Id: WUT.c.vx-xxx-xxx,v 1.1.1.1 2006/02/10 21:45:35 saxton Exp $

The generic VxWorks implementation of the WakeUp Timers (WUT) facility.


Function Documentation

void arm_handler WCB wcb,
TOV  tov
[inline]
 

Seeds the timer interrupt to handle expire a tov.

Parameters:
wcb The WUT control block
tov The expiration timeout value

void arm_handler_nxt_wut WCB wcb,
const WUT_tmr wut
[inline]
 

Seeds the timer interrupt to handle expire at the timeout associated with the specified WUT timer entry.

Parameters:
wcb The WUT control block
wut The WUT timer entry.

int cmp_lt_tov TOV  tov_a,
TOV  tov_b
[inline]
 

Platform implementation dependent routine to compare to timeout values.

Parameters:
tov_a The first of the two timeout values to compare
tov_b The second of the two timeout values to compare
Returns:
non-zero if tov_a < tov_b, else 0

int lock_que WCB wcb  )  [inline]
 

Platform implementation dependent routine to lock the WUT timer que.

Parameters:
wcb Pointer to the WUT control block
Returns:
A key to be used to unlock the que.

void unlock_que WCB wcb,
int  key
[inline]
 

Platform implementation dependent routine to unlock the WUT timer que.

Parameters:
wcb Pointer to the WUT control block
key The key used to unlock the que (returned from lock_que()

int WUT_dec_get void   ) 
 

Gets the current time left till the next timer expiration.

This primarily used as a debugging aid.

WUT_cb_status WUT_keepalive_rtn WUT_keepalive_ctx keepalive,
WUT_tmr wut
 

Simple WUT timer callback routine used to drive the VxWorks system clock.

Parameters:
keepalive The keepalive control structure.
wut The WUT timer entry
Return values:
WUT_K_STATE_CHANGE_YES 
VXWORKS Implementation Note
On the PowerPC platform, this routine is used to keep the decrement counter within its limited range, ensuring that no timer entry attempts to seed it with a value beyond it's limits. It is also used to update the VxWork's system clock by calling tickAnnounce().
Return Value
The return value reflects the fact the timer entries state has been changed by the callback routine (its been restarted).

static __inline void wut_period_set unsigned int  period  )  [static]
 

Informs VxWorks of a new clock rate.

Parameters:
period The period, in nanoseconds, that tickAnnounce is being driven

int wut_sys_connect WCB wcb  ) 
 

Platform dependent part of the WUT system connection process.

Parameters:
wcb The WUT control block
Returns:
Status

void WUT_sys_handler void   ) 
 

The facility's internal Interrupt Service Routine.

Warning:
This is not a user callable routine

int wut_sys_shutdown WCB wcb  ) 
 

Platform specific shutdown procedure.

The decrement counter is set to the maximum expiration, effectively providing enough time to restore the original VxWorks exception handler.


Generated on Fri Feb 10 20:25:44 2006 by  doxygen 1.4.4