GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCM / dev > lcm_scp / linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

LCM_scpside.c File Reference

Some usefule LCM commands (SCP side). More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <PBI/Endianness.h>
#include <PBS/MBA.h>
#include <MSG/MSG_pubdefs.h>
#include <CCSDS/CCSDS_pkt.h>
#include <LCM/LCM_cmddefs.h>
#include <LCM/LCM_cmdxtrn.h>
#include <ITC/ITC_dump.h>
#include <ITC/ITC_pubdefs.h>
#include <LCM/LCM_scpside.h>
#include <LCM/LCM_dump.h>
#include <LCM/LCM_msgs.h>
#include <LCM_prvdefs.h>
#include <CLI/CLI_pubdefs.h>

Defines

#define LCM_L_TESTPKT   (4096)

Functions

void freePacket (ITC_QueueItem *qitem, unsigned int status, void *prm0, void *prm1, void *prm2)
 Free a command confirmation buffer.
static void cmdFree (ITC_QueueItem *qitem, unsigned int status, void *prm0, void *prm1, void *prm2)
unsigned int LCM_sendCommand (unsigned int apid, unsigned int func, unsigned int qilen)
 Send a pattern telecommand packet to the LAT.
unsigned int LCM_sendCmdResponse (unsigned int nid, unsigned int tid, unsigned int scb, unsigned int fwd, unsigned int new)
 Send a request to change spacecraft command response parameters.
unsigned int LCM_sendMsgResponse (unsigned int nid, unsigned int tid, unsigned int new)
 Send a request to change a task's messaging level.
unsigned int LCM_sendTaskDump (unsigned int nid, unsigned int xactID)
 Send a request to dump CPU current task status.
unsigned int LCM_sendModDump (unsigned int nid, unsigned int xactID)
 Send a request to dump CPU current loaded software module status.
unsigned int LCM_sendScrubRun (unsigned int nid)
 Send a request to run CPU memory active scrubber (RAD750-only).
unsigned int LCM_sendScrubConfig (unsigned int nid, unsigned int period)
 Send a request to configure CPU memory active scrubber (RAD750-only).
unsigned int LCM_sendErrorConfig (unsigned int nid, unsigned int errClass, unsigned int errLevel)
 Send a request to configure CPU memory active scrubber (RAD750-only).
unsigned int LCM_sendMsgOut (unsigned int nid, unsigned int inter, unsigned int lvl)
 Send a request to configure MSG output for a particular interface.
unsigned int LCM_sendNoop (unsigned int nid)
 Send a LCM no-op telecommand.
static unsigned int LCM_sendCommand_cli (CLI_Control *cli, void *prm)
 CLI callback for "LCM_sendCommand" command.
static unsigned int LCM_sendCmdResponse_cli (CLI_Control *cli, void *prm)
 CLI callback for "LCM_setCmdConfirm" command.
static unsigned int LCM_sendMsgResponse_cli (CLI_Control *cli, void *prm)
 CLI callback for "LCM_setCmdConfirm" command.
static unsigned int LCM_sendTaskDumpCli (CLI_Control *cli, void *prm)
static unsigned int LCM_sendModDumpCli (CLI_Control *cli, void *arg)
static unsigned int LCM_sendScrubRunCli (CLI_Control *cli, void *arg)
static unsigned int LCM_sendScrubConfigCli (CLI_Control *cli, void *arg)
static unsigned int LCM_sendErrorConfigCli (CLI_Control *cli, void *arg)
unsigned int LCM_addSyntaxSCP (CLI_Syntax *syntax)
 Contribute the LCM section to the command line syntax.

Variables

static unsigned int lock
 Test packet interlock control.
static unsigned char pkt [LCM_L_TESTPKT]
 Test packet buffer.
const char * d_0 = "$0"
 The string "$0".


Detailed Description

Some usefule LCM commands (SCP side).

CVS $Id: LCM_scpside.c,v 1.16 2011/03/29 21:59:33 apw Exp $
Author:
A.P.Waite

Function Documentation

static void cmdFree ( ITC_QueueItem *  qitem,
unsigned int  status,
void *  prm0,
void *  prm1,
void *  prm2 
) [static]

Free memory after sending ITC commands.

Parameters:
qitem The memory buffer.
status Status of command.
prm0 Completion callback paramter 0.
prm1 Completion callback paramter 1.
prm2 Completion callback paramter 2.

Referenced by LCM_sendErrorConfig(), LCM_sendModDump(), LCM_sendMsgOut(), LCM_sendNoop(), LCM_sendScrubConfig(), LCM_sendScrubRun(), and LCM_sendTaskDump().

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

Free a command confirmation 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:
LCM_SUCCESS Success
freePacket() frees a test packet.

Referenced by LCM_sendCmdResponse(), LCM_sendCommand(), and LCM_sendMsgResponse().

unsigned int LCM_addSyntaxSCP ( CLI_Syntax *  syntax  ) 

Contribute the LCM section to the command line syntax.

Parameters:
syntax Syntax handle
Returns:
CLI_SUCCESS

References LCM_sendCmdResponse_cli(), LCM_sendCommand_cli(), LCM_sendErrorConfigCli(), LCM_sendModDumpCli(), LCM_sendMsgResponse_cli(), LCM_sendScrubConfigCli(), LCM_sendScrubRunCli(), and LCM_sendTaskDumpCli().

unsigned int LCM_sendCmdResponse ( unsigned int  nid,
unsigned int  tid,
unsigned int  scb,
unsigned int  fwd,
unsigned int  new 
)

Send a request to change spacecraft command response parameters.

Parameters:
nid ITC node ID
tid ITC task ID
scb Command class ( normal/broadcast : 0/1)
fwd Task action (execute/forward : 0/1)
new New response level (all/error/none : 0/1/2)
Return values:
LCM_GENERROR Failure
LCM_SUCCESS Success

References freePacket().

Referenced by LCM_sendCmdResponse_cli().

static unsigned int LCM_sendCmdResponse_cli ( CLI_Control *  cli,
void *  prm 
) [static]

CLI callback for "LCM_setCmdConfirm" command.

Parameters:
cli (in) CLI control handle
prm (in) User parameter (unused)
Returns:
CLI_SUCCESS

References LCM_sendCmdResponse().

Referenced by LCM_addSyntaxSCP().

unsigned int LCM_sendCommand ( unsigned int  apid,
unsigned int  func,
unsigned int  qilen 
)

Send a pattern telecommand packet to the LAT.

Parameters:
apid APID
func Function code
qilen Size of packet to send (even number of bytes)
Return values:
LCM_GENERROR Failure
LCM_SUCCESS Success

References freePacket().

Referenced by LCM_sendCommand_cli().

static unsigned int LCM_sendCommand_cli ( CLI_Control *  cli,
void *  prm 
) [static]

CLI callback for "LCM_sendCommand" command.

Parameters:
cli CLI control handle
prm User parameter (unused)
Returns:
CLI_SUCCESS

References LCM_sendCommand().

Referenced by LCM_addSyntaxSCP().

unsigned int LCM_sendErrorConfig ( unsigned int  nid,
unsigned int  errClass,
unsigned int  errLevel 
)

Send a request to configure CPU memory active scrubber (RAD750-only).

Parameters:
nid ITC node ID
errClass Error type class to work on.
errLevel Error level setting for class.
Returns:
An LCM MSG code.

References cmdFree(), and LCM_dumpErrorConfigCmd().

Referenced by LCM_sendErrorConfigCli().

static unsigned int LCM_sendErrorConfigCli ( CLI_Control *  cli,
void *  arg 
) [static]

Handles the "LCM_sendErrorConfig" command from the SCP command line.

Parameters:
cli The CLI master control handle.
arg Ignored.
Returns:
A LCM MSG code.

References LCM_sendErrorConfig().

Referenced by LCM_addSyntaxSCP().

unsigned int LCM_sendModDump ( unsigned int  nid,
unsigned int  xactID 
)

Send a request to dump CPU current loaded software module status.

Parameters:
nid ITC node ID
xactID Telemetry dump transaction ID.
Returns:
An LCM MSG code.

References cmdFree(), and LCM_dumpModDumpCmd().

Referenced by LCM_sendModDumpCli().

static unsigned int LCM_sendModDumpCli ( CLI_Control *  cli,
void *  arg 
) [static]

Handles the "LCM_sendModDump" command from the SCP command line.

Parameters:
cli The CLI master control handle.
arg Ignored.
Returns:
A LCM MSG code.

References LCM_sendModDump().

Referenced by LCM_addSyntaxSCP().

unsigned int LCM_sendMsgOut ( unsigned int  nid,
unsigned int  inter,
unsigned int  lvl 
)

Send a request to configure MSG output for a particular interface.

Parameters:
nid ITC node ID
inter MSG output interface to work on.
lvl New MSG output severity level for interface.
Returns:
An LCM MSG code.

References cmdFree(), and LCM_dumpMsgOutCmd().

unsigned int LCM_sendMsgResponse ( unsigned int  nid,
unsigned int  tid,
unsigned int  new 
)

Send a request to change a task's messaging level.

Parameters:
nid ITC node ID
tid ITC task ID
new New messaging level (success/information/warning/error " : 0..3)
Return values:
LCM_GENERROR Failure
LCM_SUCCESS Success

References freePacket().

Referenced by LCM_sendMsgResponse_cli().

static unsigned int LCM_sendMsgResponse_cli ( CLI_Control *  cli,
void *  prm 
) [static]

CLI callback for "LCM_setCmdConfirm" command.

Parameters:
cli (in) CLI control handle
prm (in) User parameter (unused)
Returns:
CLI_SUCCESS

References LCM_sendMsgResponse().

Referenced by LCM_addSyntaxSCP().

unsigned int LCM_sendNoop ( unsigned int  nid  ) 

Send a LCM no-op telecommand.

Parameters:
nid ITC node ID
Returns:
An LCM MSG code.

References cmdFree(), and LCM_dumpNoopCmd().

unsigned int LCM_sendScrubConfig ( unsigned int  nid,
unsigned int  period 
)

Send a request to configure CPU memory active scrubber (RAD750-only).

Parameters:
nid ITC node ID
period Memory scrub period in minutes.
Returns:
An LCM MSG code.

References cmdFree(), and LCM_dumpScrubConfigCmd().

Referenced by LCM_sendScrubConfigCli().

static unsigned int LCM_sendScrubConfigCli ( CLI_Control *  cli,
void *  arg 
) [static]

Handles the "LCM_sendScrubConfig" command from the SCP command line.

Parameters:
cli The CLI master control handle.
arg Ignored.
Returns:
A LCM MSG code.

References LCM_sendScrubConfig().

Referenced by LCM_addSyntaxSCP().

unsigned int LCM_sendScrubRun ( unsigned int  nid  ) 

Send a request to run CPU memory active scrubber (RAD750-only).

Parameters:
nid ITC node ID
Returns:
An LCM MSG code.

References cmdFree(), and LCM_dumpScrubRunCmd().

Referenced by LCM_sendScrubRunCli().

static unsigned int LCM_sendScrubRunCli ( CLI_Control *  cli,
void *  arg 
) [static]

Handles the "LCM_sendScrubRun" command from the SCP command line.

Parameters:
cli The CLI master control handle.
arg Ignored.
Returns:
A LCM MSG code.

References LCM_sendScrubRun().

Referenced by LCM_addSyntaxSCP().

unsigned int LCM_sendTaskDump ( unsigned int  nid,
unsigned int  xactID 
)

Send a request to dump CPU current task status.

Parameters:
nid ITC node ID
xactID Telemetry dump transaction ID.
Returns:
An LCM MSG code.

References cmdFree(), and LCM_dumpTaskDumpCmd().

Referenced by LCM_sendTaskDumpCli().

static unsigned int LCM_sendTaskDumpCli ( CLI_Control *  cli,
void *  arg 
) [static]

Handles the "LCM_sendTaskDump" command from the SCP command line.

Parameters:
cli The CLI master control handle.
arg Ignored.
Returns:
A LCM MSG code.

References LCM_sendTaskDump().

Referenced by LCM_addSyntaxSCP().


Generated on Wed Mar 30 16:03:01 2011 by  doxygen 1.5.8