GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EBC / dev > ebc_epu / rad750


Interface   Data Structures   File List   Data Fields   Globals  

EBC_lsm.c File Reference

EBC's simulation of the LSM task (primitive time hack services only). More...

#include <string.h>
#include <time.h>
#include <EBC/EBC_msgs.h>
#include <IMM/FPM_pubdefs.h>
#include <IMM/RBM_pubdefs.h>
#include <ITC/ITC_pubdefs.h>
#include <PBS/FORK.h>
#include <PBS/INT.ih>
#include <PBS/MBA.h>
#include <PBS/PTS.h>
#include <PBS/WCT.h>
#include <PBS/WUT.h>
#include <EBC_prvdefs.h>

Classes

struct  _timetone
 Local structure definition for a timetone command message. More...

Functions

static unsigned int fakeLsmInitialize (EBC_Control *ecb)
 Create an emulation of the LSM task.
unsigned int EBC_fakeLsmInitialize (ITC_TaskID tid)
 Initialize the ECB control block.
unsigned int EBC_fakeLsmStart ()
 Start the fake LSM task.
unsigned int EBC_ignore (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len)
 Command handler to turn command into a no-op.
unsigned int EBC_timetone (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len)
 Command handler for timetone messages.
unsigned int MON_get_loading ()
 Fake up the "MON_get_loading" entry point (always fails).
WCT_time THS_gemAbsTimeEvent (int gemStrobeIn, int gemClk)
 Dummy routine.
unsigned int THS_simulatedPPS ()
 Fake up the "simulated pulse-per-second" logical (always true).
unsigned int THS_simulatedTT ()
 Fake up the "simulated timetone" logical (always true).

Variables

EBC_ControlEBC_ecb
 Control block for EBC facility.
ITC_CommandItem EBC_Apid701Item [3]
 Command dispatch table for APID 0x701.
ITC_CommandList EBC_Apid701List
 Command dispatch control block for APID 0x701.
ITC_ApidDef EBC_Apid701
 Apid control block for APID 0x701.
TASK_attr attr_mLSM = { "mLSM", 55, 0, NULL, 0 }
 Compiled in task defaults for the "mLSM" task.
TASK_attr attr_sLSM = { "sLSM", 55, 0, NULL, 0 }
 Compiled in task defaults for the "sLSM" task.


Detailed Description

EBC's simulation of the LSM task (primitive time hack services only).

CVS $Id: EBC_lsm.c,v 1.3 2011/03/30 01:32:56 apw Exp $
Author:
A.P.Waite
EBC_lsm.c simulates the LSM task. This is a very poor simulation, providing only primitive support for the time hack services (traditionally provided by package THS), and no support at all for the attitude and ancillary spacecraft broadcast commands (they simply accepted and ignored).

Function Documentation

unsigned int EBC_fakeLsmInitialize ( ITC_TaskID  tid  ) 

Initialize the ECB control block.

Parameters:
tid (in) Task ID for the LSM task to be faked
Returns:
A MSG code

References EBC_CTL_BROKEN, EBC_CTL_INITIALIZED, EBC_CTL_UNINITIALIZED, fakeLsmInitialize(), _EBC_Control::mtx, _EBC_Control::rwi, _EBC_Control::state, and _EBC_Control::tid.

Referenced by SBC_init().

unsigned int EBC_fakeLsmStart ( void   ) 

Start the fake LSM task.

EBC_fakeLsmStart() starts the LSM task simulation.

References EBC_CTL_BROKEN, EBC_CTL_INITIALIZED, _EBC_Control::itc, _EBC_Control::mtx, _EBC_Control::state, and _EBC_Control::tid.

Referenced by SBC_init().

unsigned int EBC_ignore ( void *  prm,
const struct _ITC_QueueItem *  qitem,
void *  pay,
unsigned int  len 
)

Command handler to turn command into a no-op.

Parameters:
prm (in) Context parameter
qitem (in) Queue item
pay (in) Command payload
len (in) Length of payload (bytes)
Return values:
EBC_SUCCESS Always

unsigned int EBC_timetone ( void *  prm,
const struct _ITC_QueueItem *  qitem,
void *  pay,
unsigned int  len 
)

Command handler for timetone messages.

Parameters:
prm (in) Context parameter
qitem (in) Queue item
pay (in) Command payload
len (in) Length of payload (bytes)
Return values:
EBC_SUCCESS Always

References _timetone::sec.

static unsigned int fakeLsmInitialize ( EBC_Control ecb  )  [static]

Create an emulation of the LSM task.

Parameters:
ecb (in) The EBC control block
Returns:
A MSG code

References _EBC_Control::itc, _EBC_Control::pcb, _EBC_Control::rcb, and _EBC_Control::tid.

Referenced by EBC_fakeLsmInitialize().

unsigned int MON_get_loading (  ) 

Fake up the "MON_get_loading" entry point (always fails).

Return values:
1 Always

WCT_time THS_gemAbsTimeEvent ( int  gemStrobeIn,
int  gemClk 
)

Dummy routine.

Parameters:
gemStrobeIn (none) Ignored
gemClk (none) Ignored
Return values:
0LL Always
For compatibility with the THS_gemAbsTimeEvent() entry point in THS proper.

unsigned int THS_simulatedPPS (  ) 

Fake up the "simulated pulse-per-second" logical (always true).

Return values:
1 Always

unsigned int THS_simulatedTT (  ) 

Fake up the "simulated timetone" logical (always true).

Return values:
1 Always


Variable Documentation

ITC_ApidDef EBC_Apid701

Initial value:

 
    {    0x701, 0, &EBC_Apid701List }
Apid control block for APID 0x701.

ITC_CommandItem EBC_Apid701Item[3]

Initial value:

 
    {
        { 1 , 60, &EBC_ignore   },
        { 2 , 44, &EBC_ignore   },
        { 3 , 14, &EBC_timetone },
    }
Command dispatch table for APID 0x701.

ITC_CommandList EBC_Apid701List

Initial value:

 
    {    3, 0, EBC_Apid701Item }
Command dispatch control block for APID 0x701.


Generated on Tue Mar 29 18:39:04 2011 by  doxygen 1.5.8