GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> PBC / V4-12-4 > pbc / rad750


Interface   Data Structures   File List   Data Fields   Globals  

PBC_command.c File Reference

PBC application-level command handlers. More...

#include <string.h>
#include <CCSDS/CCSDS_pkt.h>
#include <ITC/ITC_pubdefs.h>
#include <MSG/MSG_pubdefs.h>
#include <PBS/PBS.h>
#include <PBC/PBC_cmddefs.h>
#include <PBC/PBC_msgs.h>

Functions

static unsigned int pbc_forward_cmd (const ITC_QueueItem *qitem_p, void *pkt_p, unsigned int len, int *fwd_p)
 Common routine to forward PBC commands to other nodes.
unsigned int PBC_LBTSTART (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len)
 Handle the Boot Start command.
unsigned int PBC_LBTRESET (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len)
 Handle the Boot Reset command.
unsigned int PBC_LBTERRDUMP (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len)
 Handle the Boot Error Dump command.
unsigned int PBC_LBTRTOSEXEC (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len)
 Handle the Boot RTOS Execute command.
unsigned int PBC_LBTBAD (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len)
 Handle the invalid Boot command (for testing purposes).


Detailed Description

PBC application-level command handlers.

    CVS $Id: PBC_command.c,v 1.11 2011/03/29 23:14:58 apw Exp $
    

Application-level handlers for the PBC boot commands. These handlers simply forward the commands to a target node.


Function Documentation

unsigned int pbc_forward_cmd ( const ITC_QueueItem *  qitem_p,
void *  pkt_p,
unsigned int  len,
int *  fwd_p 
) [static]

Common routine to forward PBC commands to other nodes.

This function looks at a PBC (boot) telecommand packet and determines if it should be forwarded to another node (CPU). It assumes that the ID of the target node is located in the same place within all PBC telecommand packets.

Parameters:
qitem_p Pointer to queue item.
pkt_p Pointer to telecommand packet.
len Length of telecommand packet, in bytes.
fwd_p Location to store pkt disposition (nonzero=>forwarded).
Returns:
MSG code.

Referenced by PBC_LBTBAD(), PBC_LBTERRDUMP(), PBC_LBTRESET(), PBC_LBTRTOSEXEC(), and PBC_LBTSTART().

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

Handle the invalid Boot command (for testing purposes).

Parameters:
prm Pointer to a context parameter (unused).
qitem Pointer to queue item (unused).
pay Pointer to command payload.
len Length of the command payload, in bytes.
Returns:
MSG code.

References pbc_forward_cmd().

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

Handle the Boot Error Dump command.

Parameters:
prm Pointer to a context parameter (unused).
qitem Pointer to queue item (unused).
pay Pointer to command payload.
len Length of the command payload, in bytes.
Returns:
MSG code.

References pbc_forward_cmd().

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

Handle the Boot Reset command.

Parameters:
prm Pointer to a context parameter (unused).
qitem Pointer to queue item (unused).
pay Pointer to command payload.
len Length of the command payload, in bytes.
Returns:
MSG code.

References _PBC_LBTRESET_Prm::bootFlags, _PBC_LBTRESET_Pkt::pay, pbc_forward_cmd(), PBC_LBTRESET(), and _PBC_CFLAGS32::ui.

Referenced by PBC_LBTRESET().

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

Handle the Boot RTOS Execute command.

Parameters:
prm Pointer to a context parameter (unused).
qitem Pointer to queue item (unused).
pay Pointer to command payload.
len Length of the command payload, in bytes.
Returns:
MSG code.

References pbc_forward_cmd().

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

Handle the Boot Start command.

Parameters:
prm Pointer to a context parameter (unused).
qitem Pointer to queue item (unused).
pay Pointer to command payload.
len Length of the command payload, in bytes.
Returns:
MSG code.

References pbc_forward_cmd().


Generated on Wed Nov 21 22:02:50 2012 by  doxygen 1.5.8