GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LIH / V0-2-0

Constituent: lih_test     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

LIH_test.c File Reference

Some useful LIH commands (to be run on same CPU as LIH task). More...

#include <stdio.h>
#include "CCSDS/CCSDS_pkt.h"
#include "ITC/ITC_pubdefs.h"
#include "LIH/LIH_msgs.h"
#include "LIH/LIH_cmddefs.h"
#include "LIH_prvdefs.h"

Include dependency graph for LIH_test.c:


Defines

#define LIH_L_TESTPKT   (256)

Functions

unsigned char * composeCommand (unsigned int func, unsigned int size)
 Start filling out a telecommand.
void freePacket (ITC_QueueItem *qitem, unsigned int status, void *prm0, void *prm1, void *prm2)
 Free the LIH command "buffer".
void LIH_dumpAdc (unsigned int adx)
 Immediate dump of the database entries for an ADC.
unsigned int LIH_sendDumpLimits (unsigned int reason, unsigned int ident)
 Send command to dump the limits.
unsigned int LIH_sendDumpLimitsAdc (unsigned int adx)
 Send command to dump the limits for a single ADC.
unsigned int LIH_sendEnableActions (unsigned int state)
 Send command enable/disable taking action on limits.
unsigned int LIH_sendSetActionsAdc (unsigned int adx, unsigned int from, unsigned int to, signed short alert, signed short diag, signed short msg)
 Send command enable/disable taking action on limits.
unsigned int LIH_sendSetLimitsAdc (unsigned int adx, signed short zero, signed short one, signed short two, signed short three, signed short four, signed short five)
 Send command enable/disable taking action on limits.
unsigned int LIH_sendSetNagTimesAdc (unsigned int adx, signed int zero, signed int one, signed int two, signed int three, signed int four, signed int five, signed int six, signed int seven)
 Send command enable/disable taking action on limits.
unsigned int LIH_sendSetPersistAdc (unsigned int adx, signed int delta)
 Send command enable/disable taking action on limits.
unsigned int LIH_sendSetSettleAdc (unsigned int adx, signed int delta)
 Send command enable/disable taking action on limits.

Variables

static unsigned int LIH_lock
 Test packet interlock control.
static unsigned char LIH_pkt [LIH_L_TESTPKT]
 Test packet buffer.
ITC_CommandItem LIH_CmdLength [10]
 Annoying. Must be maintained by hand.

Detailed Description

Some useful LIH commands (to be run on same CPU as LIH task).

CVS $Id: LIH_test.c,v 1.1 2008/08/28 21:02:55 apw Exp $
Author:
A.P.Waite

Function Documentation

unsigned char * composeCommand unsigned int  func,
unsigned int  size
 

Start filling out a telecommand.

Parameters:
func (in) Function code
size (in) Command size
Return values:
NULL Command buffer in use
x Address of queue item

void freePacket ITC_QueueItem *  qitem,
unsigned int  status,
void *  prm0,
void *  prm1,
void *  prm2
 

Free the LIH command "buffer".

Parameters:
qitem (in) Queue item (unused)
status (in) Processing completion code (unused)
prm0 (in) User parameter 0 (unused)
prm1 (in) User parameter 1 (unused)
prm2 (in) User parameter 2 (unused)
Return values:
LIH_SUCCESS Success
freePacket() frees a test packet.

void LIH_dumpAdc unsigned int  adx  ) 
 

Immediate dump of the database entries for an ADC.

Parameters:
adx (in) ADC index
Return values:
LIH_GENERROR Failure
LIH_SUCCESS Success

unsigned int LIH_sendDumpLimits unsigned int  reason,
unsigned int  ident
 

Send command to dump the limits.

Parameters:
reason (in) Reason for generating this dump
ident (in) User provided dump identifier
Return values:
LIH_GENERROR Failure
LIH_SUCCESS Success

unsigned int LIH_sendDumpLimitsAdc unsigned int  adx  ) 
 

Send command to dump the limits for a single ADC.

Parameters:
adx (in) ADC index
Return values:
LIH_GENERROR Failure
LIH_SUCCESS Success

unsigned int LIH_sendEnableActions unsigned int  state  ) 
 

Send command enable/disable taking action on limits.

Parameters:
state (in) Enable/disable (boolean, 1 => enable)
Return values:
LIH_GENERROR Failure
LIH_SUCCESS Success

unsigned int LIH_sendSetActionsAdc unsigned int  adx,
unsigned int  from,
unsigned int  to,
signed short  alert,
signed short  diag,
signed short  msg
 

Send command enable/disable taking action on limits.

Parameters:
adx (in) ADC index
from (in) Previous state
to (in) Next state
alert (in) Action: generate an alert
diag (in) Action: ping a housekeeping packet
msg (in) Action: generate message (with severity)
Return values:
LIH_GENERROR Failure
LIH_SUCCESS Success

unsigned int LIH_sendSetLimitsAdc unsigned int  adx,
signed short  zero,
signed short  one,
signed short  two,
signed short  three,
signed short  four,
signed short  five
 

Send command enable/disable taking action on limits.

Parameters:
adx (in) ADC index
zero (in) limit[0]
one (in) limit[1]
two (in) limit[2]
three (in) limit[3]
four (in) limit[4]
five (in) limit[5]
Return values:
LIH_GENERROR Failure
LIH_SUCCESS Success

unsigned int LIH_sendSetNagTimesAdc unsigned int  adx,
signed int  zero,
signed int  one,
signed int  two,
signed int  three,
signed int  four,
signed int  five,
signed int  six,
signed int  seven
 

Send command enable/disable taking action on limits.

Parameters:
adx (in) ADC index
zero (in) nag[0]
one (in) nag[1]
two (in) nag[2]
three (in) nag[3]
four (in) nag[4]
five (in) nag[5]
six (in) nag[6]
seven (in) nag[7]
Return values:
LIH_GENERROR Failure
LIH_SUCCESS Success

unsigned int LIH_sendSetPersistAdc unsigned int  adx,
signed int  delta
 

Send command enable/disable taking action on limits.

Parameters:
adx (in) ADC index
delta (in) Delta persistence time
Return values:
LIH_GENERROR Failure
LIH_SUCCESS Success

unsigned int LIH_sendSetSettleAdc unsigned int  adx,
signed int  delta
 

Send command enable/disable taking action on limits.

Parameters:
adx (in) ADC index
delta (in) Delta persistence time
Return values:
LIH_GENERROR Failure
LIH_SUCCESS Success


Variable Documentation

ITC_CommandItem LIH_CmdLength[10]
 

Initial value:

 
{
    { 0 ,  8, NULL },
    { 1 , 12, NULL },
    { 2 , 10, NULL },
    { 3 , 22, NULL },
    { 4 , 20, NULL },
    { 5 , 44, NULL },
    { 6 , 16, NULL },
    { 7 , 16, NULL },
    { 8 , 10, NULL },
    { 9 , 16, NULL }
}
Annoying. Must be maintained by hand.


Generated on Fri Aug 29 01:57:56 2008 by  doxygen 1.4.4