GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LIM / V1-22-0 > lim_scp / rad750
#include <stdlib.h>
#include "MSG/MSG_pubdefs.h"
#include "CCSDS/CCSDS_pkt.h"
#include "CCSDS/CCSDS_swap.h"
#include "ITC/ITC_dump.h"
#include "ITC/ITC_pubdefs.h"
#include "LIM/LIM_msgs.h"
#include "LIM/LIM_scpside.h"
#include "PBS/BSWP.h"
#include "PBS/MBA.h"
#include "CLI/CLI_pubdefs.h"
Classes | |
struct | _Lim_Parm |
Description of a command parameter. More... | |
Defines | |
#define | LIM_APID_ARR_RESPONSE 1633 |
#define | LIM_APID_ARR_ABORT 1633 |
#define | LIM_APID_LOAD_SHED 1634 |
#define | LIM_APID_BIAS_ACD 1635 |
#define | LIM_APID_BIAS_CAL 1635 |
#define | LIM_APID_BIAS_TKR 1635 |
#define | LIM_APID_CONFIG_GBM 1635 |
#define | LIM_APID_CONFIG_HV 1635 |
#define | LIM_APID_CONFIG_PID 1635 |
#define | LIM_APID_HOLD_ENTER 1635 |
#define | LIM_APID_HOLD_EXIT 1635 |
#define | LIM_APID_LATC_RECORD 1635 |
#define | LIM_APID_MAIN_FEED_ON 1635 |
#define | LIM_APID_PIG_RECORD 1635 |
#define | LIM_APID_POWER_ON 1635 |
#define | LIM_APID_POWER_OFF 1635 |
#define | LIM_APID_SAA_ENTER 1635 |
#define | LIM_APID_SAA_EXIT 1635 |
#define | LIM_APID_SAFE_MODE 1635 |
#define | LIM_APID_TOO_ABORT 1635 |
#define | LIM_APID_TOO_START 1635 |
#define | LIM_APID_NOOP 1635 |
#define | LIM_APID_CAL_START (0x67c) |
#define | LIM_FC_ARR_RESPONSE 0 |
#define | LIM_FC_ARR_ABORT 1 |
#define | LIM_FC_LOAD_SHED 1 |
#define | LIM_FC_BIAS_ACD 10 |
#define | LIM_FC_BIAS_CAL 11 |
#define | LIM_FC_BIAS_TKR 12 |
#define | LIM_FC_CONFIG_GBM 13 |
#define | LIM_FC_CONFIG_HV 14 |
#define | LIM_FC_CONFIG_PID 15 |
#define | LIM_FC_HOLD_ENTER 2 |
#define | LIM_FC_HOLD_EXIT 3 |
#define | LIM_FC_LATC_RECORD 17 |
#define | LIM_FC_MAIN_FEED_ON 4 |
#define | LIM_FC_PIG_RECORD 16 |
#define | LIM_FC_POWER_ON 6 |
#define | LIM_FC_POWER_OFF 7 |
#define | LIM_FC_SAA_ENTER 8 |
#define | LIM_FC_SAA_EXIT 9 |
#define | LIM_FC_SAFE_MODE 5 |
#define | LIM_FC_TOO_ABORT 1 |
#define | LIM_FC_TOO_START 0 |
#define | LIM_FC_NOOP 18 |
#define | LIM_FC_CAL_START 1 |
Typedefs | |
typedef void(* | LIM_DumpCB )(char *pkt) |
LIM command dump callback pointer. | |
typedef struct _Lim_Parm | Lim_Parm |
Typedef for _Lim_Parm. | |
Functions | |
int | LIM_setDisplayLevelCmd (int level) |
Set the verbosity level of the LIM command display. | |
static void | lim_free_cb (ITC_QueueItem *qitem_p, unsigned int status, void *parm_0, void *parm_1, void *parm_2, unsigned int tx) |
ITC callback to free command packet memory. | |
static unsigned int | lim_send_command (unsigned int num_parms, unsigned int *parm_bytes, unsigned int *parm_values, unsigned int apid, unsigned int func_code, LIM_DumpCB dump_func_p) |
Send a LIM command. | |
static unsigned int | lim_sendBiasAcd (unsigned int arc_id, unsigned int bias, int saa) |
Send the Bias-ACD command. | |
unsigned int | LIM_sendBiasAcdHv (unsigned int arc_id, unsigned int bias) |
Send the Bias-ACD command to set an ARC's HV bias. | |
unsigned int | LIM_sendBiasAcdSaa (unsigned int arc_id, unsigned int bias) |
Send the Bias-ACD command to set an ARC's SAA bias. | |
unsigned int | LIM_sendBiasCal (unsigned int tower_id, unsigned int bias) |
Send the Bias-CAL command. | |
unsigned int | LIM_sendBiasTkr (unsigned int tower_id, unsigned int bias) |
Send the Bias-TKR command. | |
unsigned int | LIM_sendCalStart (unsigned int latc_config, unsigned int lci_config, unsigned int dest) |
Send the Calibration-Start command. | |
unsigned int | LIM_sendConfigGbm (int rep_allowed, int pri_int_allowed, int red_int_allowed) |
Send the Configure-GBM command. | |
unsigned int | LIM_sendConfigHv (int hv_allowed) |
Send the Configure-HV command. | |
unsigned int | LIM_sendConfigPid (int primary) |
Send the Configure-PID command. | |
unsigned int | LIM_sendEpuOff (unsigned int epu_id) |
Send the Power-Off command to disable power from an EPU. | |
unsigned int | LIM_sendEpuOn (unsigned int epu_id, unsigned int pdu_id) |
Send the Power-On command to enable power to an EPU. | |
unsigned int | LIM_sendHoldEnter (void) |
Send the Hold-Enter command. | |
unsigned int | LIM_sendHoldExit (void) |
Send the Hold-Exit command. | |
unsigned int | LIM_sendLatcRecord (unsigned int dest) |
Send the Latc-Record command. | |
unsigned int | LIM_sendLoadShed (void) |
Send the Load-Shed command. | |
unsigned int | LIM_sendMainFeedOnPrimary (unsigned int siu_id, unsigned int pdu, unsigned int pps) |
Send the Main-Feed-On command to enable primary component power. | |
unsigned int | LIM_sendPigRecord (unsigned int dest) |
Send the Pig-Record command. | |
unsigned int | LIM_sendSaaEnter (void) |
Send the SAA-Enter command. | |
unsigned int | LIM_sendSaaExit (void) |
Send the SAA-Exit command. | |
unsigned int | LIM_sendSafeMode (void) |
Send the Safe-Mode command. | |
unsigned int | LIM_sendTemOn (unsigned int tem_id, unsigned int pdu_id) |
Send the Power-On command to enable power to a TEM. | |
unsigned int | LIM_sendNoop (void) |
Send the No-Op command. | |
static unsigned int | lim_get_parms (CLI_Control *cli, Lim_Parm *parm_p, unsigned int num_parms, char *usage) |
Get command-line parameters. | |
static unsigned int | LIM_sendBiasAcdHv_cli (CLI_Control *cli, void *prm) |
CLI callback for the "LIM_sendBiasAcdHv" command. | |
static unsigned int | LIM_sendBiasAcdSaa_cli (CLI_Control *cli, void *prm) |
CLI callback for the "LIM_sendBiasAcdSaa" command. | |
static unsigned int | LIM_sendBiasCal_cli (CLI_Control *cli, void *prm) |
CLI callback for the "LIM_sendBiasCal" command. | |
static unsigned int | LIM_sendBiasTkr_cli (CLI_Control *cli, void *prm) |
CLI callback for the "LIM_sendBiasTkr" command. | |
static unsigned int | LIM_sendCalStart_cli (CLI_Control *cli, void *prm) |
CLI callback for the "LIM_sendCalStart" command. | |
static unsigned int | LIM_sendEpuOff_cli (CLI_Control *cli, void *prm) |
CLI callback for the "LIM_sendEpuOff" command. | |
static unsigned int | LIM_sendEpuOn_cli (CLI_Control *cli, void *prm) |
CLI callback for the "LIM_sendEpuOn" command. | |
static unsigned int | LIM_sendHoldEnter_cli (CLI_Control *cli, void *prm) |
CLI callback for the "LIM_sendHoldEnter" command. | |
static unsigned int | LIM_sendHoldExit_cli (CLI_Control *cli, void *prm) |
CLI callback for the "LIM_sendHoldExit" command. | |
static unsigned int | LIM_sendLoadShed_cli (CLI_Control *cli, void *prm) |
CLI callback for the "LIM_sendLoadShed" command. | |
static unsigned int | LIM_sendMainFeedOnPrimary_cli (CLI_Control *cli, void *prm) |
CLI callback for the "LIM_sendMainFeedOnPrimary" command. | |
static unsigned int | LIM_sendConfigPid_cli (CLI_Control *cli, void *prm) |
CLI callback for the "LIM_sendConfigPid" command. | |
static unsigned int | LIM_sendSaaEnter_cli (CLI_Control *cli, void *prm) |
CLI callback for the "LIM_sendSaaEnter" command. | |
static unsigned int | LIM_sendSaaExit_cli (CLI_Control *cli, void *prm) |
CLI callback for the "LIM_sendSaaExit" command. | |
static unsigned int | LIM_sendSafeMode_cli (CLI_Control *cli, void *prm) |
CLI callback for the "LIM_sendSafeMode" command. | |
static unsigned int | LIM_sendTemOn_cli (CLI_Control *cli, void *prm) |
CLI callback for the "LIM_sendTemOn" command. | |
static unsigned int | LIM_setDisplayLevelCmd_cli (CLI_Control *cli, void *prm) |
CLI callback for the "LIM_setDisplayLevelCmd" command. | |
unsigned int | LIM_addSyntaxSCP (CLI_Syntax *syntax) |
Add LIM commands to the command-line syntax. | |
Variables | |
int | LIM_displayLevelCmd = 1 |
The verbosity level of the LIM command display. |
** CVS $Id: LIM_send.c,v 1.15 2006/10/25 00:04:48 dmay Exp $ **
These functions use standard ITC functions to send LIM telecommands to an SIU.
unsigned int LIM_addSyntaxSCP | ( | CLI_Syntax * | syntax | ) |
Add LIM commands to the command-line syntax.
syntax | Syntax handle. |
void lim_free_cb | ( | ITC_QueueItem * | qitem_p, | |
unsigned int | status, | |||
void * | parm_0, | |||
void * | parm_1, | |||
void * | parm_2, | |||
unsigned int | tx | |||
) | [static] |
ITC callback to free command packet memory.
qitem_p | Pointer to packet's queue item. | |
status | Status of packet transmission. | |
parm_0 | Callback parameter 0 - first item to free. | |
parm_1 | Callback parameter 1 - second item to free. | |
parm_2 | Callback parameter 2 - third item to free. | |
tx | Flag to indicate sender-side failure (unused). |
unsigned int lim_get_parms | ( | CLI_Control * | cli, | |
Lim_Parm * | parm_p, | |||
unsigned int | num_parms, | |||
char * | usage | |||
) | [static] |
Get command-line parameters.
cli | CLI control handle. | |
parm_p | Pointer to first parameter description. | |
num_parms | Number of parameters to get. | |
usage | Usage description. |
0 | Success. | |
Nonzero | Failure. |
unsigned int lim_send_command | ( | unsigned int | num_parms, | |
unsigned int * | parm_bytes, | |||
unsigned int * | parm_values, | |||
unsigned int | apid, | |||
unsigned int | func_code, | |||
LIM_DumpCB | dump_func_p | |||
) | [static] |
Send a LIM command.
num_parms | Number of command parameters. | |
parm_bytes | Pointer to array of parameter sizes, in bytes. | |
parm_values | Pointer to array of parameter values. | |
apid | APID of the command. | |
func_code | Function code of the command. | |
dump_func_p | Pointer to function that dumps the command payload. |
unsigned int lim_sendBiasAcd | ( | unsigned int | arc_id, | |
unsigned int | bias, | |||
int | saa | |||
) | [static] |
Send the Bias-ACD command.
arc_id | ID of the ARC (0 - 11). | |
bias | Bias voltage value (0 - 0xfff). | |
saa | Flag to indicate that SAA bias should be set (0 or 1). |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendBiasAcdHv | ( | unsigned int | arc_id, | |
unsigned int | bias | |||
) |
Send the Bias-ACD command to set an ARC's HV bias.
arc_id | ID of the ARC (0 - 11). | |
bias | Bias voltage value (0 - 0xfff). |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendBiasAcdHv_cli | ( | CLI_Control * | cli, | |
void * | prm | |||
) | [static] |
CLI callback for the "LIM_sendBiasAcdHv" command.
cli | CLI control handle. | |
prm | User parameter (unused). |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendBiasAcdSaa | ( | unsigned int | arc_id, | |
unsigned int | bias | |||
) |
Send the Bias-ACD command to set an ARC's SAA bias.
arc_id | ID of the ARC (0 - 11). | |
bias | Bias voltage value (0 - 0xfff). |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendBiasAcdSaa_cli | ( | CLI_Control * | cli, | |
void * | prm | |||
) | [static] |
CLI callback for the "LIM_sendBiasAcdSaa" command.
cli | CLI control handle. | |
prm | User parameter (unused). |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendBiasCal | ( | unsigned int | tower_id, | |
unsigned int | bias | |||
) |
Send the Bias-CAL command.
tower_id | ID of the tower (0 - 15). | |
bias | Bias voltage value (0 - 0xffff). |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendBiasCal_cli | ( | CLI_Control * | cli, | |
void * | prm | |||
) | [static] |
CLI callback for the "LIM_sendBiasCal" command.
cli | CLI control handle. | |
prm | User parameter (unused). |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendBiasTkr | ( | unsigned int | tower_id, | |
unsigned int | bias | |||
) |
Send the Bias-TKR command.
tower_id | ID of the tower (0 - 15). | |
bias | Bias voltage value (0 - 0xffff). |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendBiasTkr_cli | ( | CLI_Control * | cli, | |
void * | prm | |||
) | [static] |
CLI callback for the "LIM_sendBiasTkr" command.
cli | CLI control handle. | |
prm | User parameter (unused). |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendCalStart | ( | unsigned int | latc_config, | |
unsigned int | lci_config, | |||
unsigned int | dest | |||
) |
Send the Calibration-Start command.
latc_config | LATC configuration. | |
lci_config | LCI configuration. | |
dest | Destination. |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendCalStart_cli | ( | CLI_Control * | cli, | |
void * | prm | |||
) | [static] |
CLI callback for the "LIM_sendCalStart" command.
cli | CLI control handle. | |
prm | User parameter (unused). |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendConfigGbm | ( | int | rep_allowed, | |
int | pri_int_allowed, | |||
int | red_int_allowed | |||
) |
Send the Configure-GBM command.
rep_allowed | Flag to allow repoint requests. | |
pri_int_allowed | Flag to allow primary GBM interrupts. | |
red_int_allowed | Flag to allow redundant GBM interrupts. |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendConfigHv | ( | int | hv_allowed | ) |
Send the Configure-HV command.
hv_allowed | Flag to allow high-voltage enabling. |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendConfigPid | ( | int | primary | ) |
Send the Configure-PID command.
primary | Flag to select primary PID input signals. |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendConfigPid_cli | ( | CLI_Control * | cli, | |
void * | prm | |||
) | [static] |
CLI callback for the "LIM_sendConfigPid" command.
cli | CLI control handle. | |
prm | User parameter (unused). |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendEpuOff | ( | unsigned int | epu_id | ) |
Send the Power-Off command to disable power from an EPU.
epu_id | ID of the EPU (0 - 2). |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendEpuOff_cli | ( | CLI_Control * | cli, | |
void * | prm | |||
) | [static] |
CLI callback for the "LIM_sendEpuOff" command.
cli | CLI control handle. | |
prm | User parameter (unused). |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendEpuOn | ( | unsigned int | epu_id, | |
unsigned int | pdu_id | |||
) |
Send the Power-On command to enable power to an EPU.
epu_id | ID of the EPU (0 - 2). | |
pdu_id | ID of the PDU to use (0 or 1). |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendEpuOn_cli | ( | CLI_Control * | cli, | |
void * | prm | |||
) | [static] |
CLI callback for the "LIM_sendEpuOn" command.
cli | CLI control handle. | |
prm | User parameter (unused). |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendHoldEnter | ( | void | ) |
Send the Hold-Enter command.
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendHoldEnter_cli | ( | CLI_Control * | cli, | |
void * | prm | |||
) | [static] |
CLI callback for the "LIM_sendHoldEnter" command.
cli | CLI control handle. | |
prm | User parameter (unused). |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendHoldExit | ( | void | ) |
Send the Hold-Exit command.
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendHoldExit_cli | ( | CLI_Control * | cli, | |
void * | prm | |||
) | [static] |
CLI callback for the "LIM_sendHoldExit" command.
cli | CLI control handle. | |
prm | User parameter (unused). |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendLatcRecord | ( | unsigned int | dest | ) |
Send the Latc-Record command.
dest | Destination parameter value. |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendLoadShed | ( | void | ) |
Send the Load-Shed command.
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendLoadShed_cli | ( | CLI_Control * | cli, | |
void * | prm | |||
) | [static] |
CLI callback for the "LIM_sendLoadShed" command.
cli | CLI control handle. | |
prm | User parameter (unused). |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendMainFeedOnPrimary | ( | unsigned int | siu_id, | |
unsigned int | pdu, | |||
unsigned int | pps | |||
) |
Send the Main-Feed-On command to enable primary component power.
This command sends the Main-Feed-On command to enable power using the primary main feed and primary DAB. It also selects the primary paths to the SSR and GBM.
siu_id | ID of the SIU (0 - 2). | |
pdu | Bitmask of PDUs to power (0 = none, 1 = PDU-0, 2 = PDU-1, 3 = both). | |
pps | Bitmask of PPS source (0 = primary external, 1 = internal, 2 = redundant external, 3 = internal) |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendMainFeedOnPrimary_cli | ( | CLI_Control * | cli, | |
void * | prm | |||
) | [static] |
CLI callback for the "LIM_sendMainFeedOnPrimary" command.
cli | CLI control handle. | |
prm | User parameter (unused). |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendNoop | ( | void | ) |
Send the No-Op command.
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendPigRecord | ( | unsigned int | dest | ) |
Send the Pig-Record command.
dest | Destination parameter value. |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendSaaEnter | ( | void | ) |
Send the SAA-Enter command.
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendSaaEnter_cli | ( | CLI_Control * | cli, | |
void * | prm | |||
) | [static] |
CLI callback for the "LIM_sendSaaEnter" command.
cli | CLI control handle. | |
prm | User parameter (unused). |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendSaaExit | ( | void | ) |
Send the SAA-Exit command.
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendSaaExit_cli | ( | CLI_Control * | cli, | |
void * | prm | |||
) | [static] |
CLI callback for the "LIM_sendSaaExit" command.
cli | CLI control handle. | |
prm | User parameter (unused). |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendSafeMode | ( | void | ) |
Send the Safe-Mode command.
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendSafeMode_cli | ( | CLI_Control * | cli, | |
void * | prm | |||
) | [static] |
CLI callback for the "LIM_sendSafeMode" command.
cli | CLI control handle. | |
prm | User parameter (unused). |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendTemOn | ( | unsigned int | tem_id, | |
unsigned int | pdu_id | |||
) |
Send the Power-On command to enable power to a TEM.
tem_id | ID of the TEM (0 - 15). | |
pdu_id | ID of the PDU to use (0 or 1). |
0 | Success. | |
Nonzero | Failure. |
unsigned int LIM_sendTemOn_cli | ( | CLI_Control * | cli, | |
void * | prm | |||
) | [static] |
CLI callback for the "LIM_sendTemOn" command.
cli | CLI control handle. | |
prm | User parameter (unused). |
0 | Success. | |
Nonzero | Failure. |
int LIM_setDisplayLevelCmd | ( | int | level | ) |
Set the verbosity level of the LIM command display.
level | Level of verbosity - set higher to display more. |
unsigned int LIM_setDisplayLevelCmd_cli | ( | CLI_Control * | cli, | |
void * | prm | |||
) | [static] |
CLI callback for the "LIM_setDisplayLevelCmd" command.
cli | CLI control handle. | |
prm | User parameter (unused). |
0 | Success. | |
Nonzero | Failure. |
int LIM_displayLevelCmd = 1 |
The verbosity level of the LIM command display.
This variable determines the amount of information that is displayed for each LIM telecommand that is sent. The higher the value, the more information that is displayed. Use LIM_setDisplayLevelCmd() to change this value.