GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCM / dev > lcm_siu / rhel5-32


Interface   Data Structures   File List   Data Fields   Globals  

LCM_houseSIU.c File Reference

SIU generic functions for housekeeping support functions. More...

#include <string.h>
#include <CCSDS/CCSDS_pkt.h>
#include <ITC/ITC_apidefs.h>
#include <LHK/LHK_pubdefs.h>
#include <LHK_DB/LHK_DB_pktdefs.h>
#include <MDB/MDB_pubdefs.h>
#include <PBS/MBA.h>
#include <LCM/LCM_msgs.h>
#include <LCM_prvdefs.h>

Defines

#define LCM_L_PACKET   ( sizeof(LCM_pkt2aidx) / sizeof(unsigned int) )
#define LCM_M_HSK_CPUSTATS   ( 0x80000000 )

Functions

static LHK_PacketStatus LCM_capture (unsigned int *sav, unsigned int abas, unsigned int aidx, unsigned int seq, unsigned char *out)
 Copy housekeeping packets from the LCM packet database.
static unsigned int control_rx (void *prm, const ITC_QueueItem *qitem, void *pay, unsigned int len)
 Process messages arriving on the control queue.
unsigned int LCM_houseInitializeSIU (LCM_Control *ctl)
 Initialize the housekeeping function (specific to SIU).

Variables

const unsigned int LCM_pkt2aidx []
 Map dense packet number to APID index.
unsigned int LCM_aidx2pkt [ITC_L_APID_HOUSE]
 Reverse map from APID index to hardware packet.


Detailed Description

SIU generic functions for housekeeping support functions.

CVS $Id: LCM_houseSIU.c,v 1.7 2011/03/29 21:59:33 apw Exp $
Author:
A.P.Waite
LCM_house.c provides SIU specific support for LCM's housekeeping functions.

Function Documentation

static unsigned int control_rx ( void *  prm,
const ITC_QueueItem *  qitem,
void *  pay,
unsigned int  len 
) [static]

Process messages arriving on the control queue.

Parameters:
prm (in) User context parameter
qitem (in) Queue item to process
pay (in) Queue item payload
len (in) Queue item payload length
control_rx() is the callback routine for any traffic arriving on the control queue. For now, that's CPU status records and ITC configuration records coming from the EPUs.

References _LCM_Database::cnt, _LCM_Control::house, LCM_HSK_RECORD_CPU, LCM_HSK_RECORD_ITC, LCM_HSK_RECORD_LPA, LCM_turboApplication(), _LCM_Record::node, _LCM_Packet::pay, _LCM_HouseControl::pdb, _LCM_Database::pkt, _LCM_Record::report, _LCM_Database::seq, _LCM_Record::seq, and _LCM_Record::type.

Referenced by LCM_houseInitializeSIU().

static LHK_PacketStatus LCM_capture ( unsigned int *  sav,
unsigned int  abas,
unsigned int  aidx,
unsigned int  seq,
unsigned char *  out 
) [static]

Copy housekeeping packets from the LCM packet database.

Parameters:
sav (in) User parameter (update counter of last packet copy)
abas (in) Base of APID table (ITC_K_APID_HOUSE or ITC_K_APID_DIAG)
aidx (in) APID index
seq (in) CCSDS sequence count
out (in) Output buffer (beginning of CCSDS telemetry header)
Returns:
A member of the LHK_PacketStatus enumeration

References _LCM_Database::cnt, _LCM_Packet::hdr, _LCM_Control::house, LCM_lcb, _LCM_HouseControl::pdb, and _LCM_Database::pkt.

Referenced by LCM_houseInitializeSIU().

unsigned int LCM_houseInitializeSIU ( LCM_Control ctl  ) 

Initialize the housekeeping function (specific to SIU).

Parameters:
ctl (in) LCM control block
LCM_houseInitializeSIU() builds up the SIU specific elements for providing housekeeping information.

References _LCM_Database::cnt, control_rx(), _LCM_Control::house, _LCM_Control::itc, LCM_capture(), _LCM_HouseControl::pdb, _LCM_HouseControl::prx, and _LCM_Database::sav.

Referenced by LCM_initializeSIU().


Variable Documentation

const unsigned int LCM_pkt2aidx[LCM_L_PACKET]

Initial value:

{
    LHK_DB_PKT_STATUS_SIU,            
    LHK_DB_PKT_STATUS_EPU0,           
    LHK_DB_PKT_STATUS_EPU1,           
    LHK_DB_PKT_STATUS_EPU2,           

    LHK_DB_PKT_TASKCFG_SIU,           
    LHK_DB_PKT_TASKCFG_EPU0,          
    LHK_DB_PKT_TASKCFG_EPU1,          
    LHK_DB_PKT_TASKCFG_EPU2,          

    LHK_DB_PKT_LPACFG_0_SIU,          
    LHK_DB_PKT_LPACFG_0_EPU0,         
    LHK_DB_PKT_LPACFG_0_EPU1,         
    LHK_DB_PKT_LPACFG_0_EPU2,         

    LHK_DB_PKT_SIU_STATS,             
    LHK_DB_PKT_EPU0_STATS,            
    LHK_DB_PKT_EPU1_STATS,            
    LHK_DB_PKT_EPU2_STATS,            
}
Map dense packet number to APID index.


Generated on Wed Mar 30 16:05:43 2011 by  doxygen 1.5.8