GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> ITC / V3-9-1 > itc / linux-gcc
#include <string.h>
#include "PBI/TBD_id.h"
#include "PBS/MBA.h"
#include "PBS/RNG.h"
#include "PBS/RW.ih"
#include "PBS/TBD.ih"
#include "PBS/WCT.h"
#include "MSG/MSG_pubdefs.h"
#include "CCSDS/CCSDS_pkt.h"
#include "ITC/ITC_msgs.h"
#include "ITC/ITC_pubdefs.h"
#include "ITC/ITC_tlmdefs.h"
#include "ITC_prvdefs.h"
Functions | |
unsigned int | ITC_attachCmdConfirm (ITC_Task *task, ITC_cb_Memory *rtn, void *prm) |
Attach a command confirmation memory allocator to a task. | |
void | ITC_copyCmdConfirm (ITC_Task *task, const char *cmd, WCT_time tim) |
Make a copy of a spacecraft command. | |
unsigned int | ITC_detachCmdConfirm (ITC_Task *task) |
Detach a command confirmation memory allocator from a task. | |
unsigned int | ITC_reportConfiguration (ITC_Configuration *cfg) |
Generate a configuration report. | |
void | ITC_sendCmdConfirm (ITC_Task *task, const char *cmd, unsigned int scb, WCT_time dtim, WCT_time xtim, unsigned int status) |
Send a telecommand execution status reponse. | |
unsigned int | ITC_setCmdConfirm (ITC_TaskID tid, ITC_CmdClass scb, ITC_CmdAction fwd, ITC_CmdLevel new, ITC_CmdLevel *old) |
Set the command confirmation level for a task. | |
unsigned int | ITC_setMsgResponse (ITC_TaskID tid, MSG_Level new) |
Set the message response level of a task. |
CVS $Id: ITC_confirm.c,v 1.9 2007/08/24 20:14:39 apw Exp $
unsigned int ITC_attachCmdConfirm | ( | ITC_Task * | task, | |
ITC_cb_Memory * | rtn, | |||
void * | prm | |||
) |
Attach a command confirmation memory allocator to a task.
task | (in) Task handle | |
rtn | (in) Memory allocation routine | |
prm | (in) Memory allocation routine parameter |
ITC_CNFRTNAT | Command confirmation memory allocator already attached | |
ITC_CTLSTAT | Control block not in state initialized | |
ITC_NOTINIT | ITC control block does not exist | |
ITC_TASKHNDL | Task handle is invalid | |
ITC_TASKSTAT | Task not in state initialized | |
ITC_SUCCESS | Success | |
ITC_VARNULL | NULL variable (pointer) detected |
Any (ITC compliant) memory manager will do, but this memory manager application has the characteristics of "single write/single reader" with all deallocations being done in the exact order of allocations. In other words it's tailor made for a ring buffer. If a ring buffer is used (better yet, a managed ring buffer as provided in the IMM package), a buffer size of 1 kByte with a 256 byte overflow area should suffice (most command confirmations are of order 110-120 bytes (minimum 98, maximum 150), so this is sufficient buffering to hold ~8 command confirmations.
void ITC_copyCmdConfirm | ( | ITC_Task * | task, | |
const char * | cmd, | |||
WCT_time | tim | |||
) |
Make a copy of a spacecraft command.
task | (in) Task handle | |
cmd | (in) Pointer to CCSDS telecommand | |
tim | (in) Time command was dequeued |
unsigned int ITC_detachCmdConfirm | ( | ITC_Task * | task | ) |
Detach a command confirmation memory allocator from a task.
task | (in) Task handle |
ITC_CNFRTNDE | No command confirmation memory allocator exists to detach | |
ITC_CTLSTAT | Control block not in state initialized | |
ITC_NOTINIT | ITC control block does not exist | |
ITC_SUCCESS | Success | |
ITC_TASKHNDL | Task handle is invalid | |
ITC_TASKSTAT | Task not in state initialized |
unsigned int ITC_reportConfiguration | ( | ITC_Configuration * | cfg | ) |
Generate a configuration report.
cfg | (in) Pointer to array of configuration records |
void ITC_sendCmdConfirm | ( | ITC_Task * | task, | |
const char * | cmd, | |||
unsigned int | scb, | |||
WCT_time | dtim, | |||
WCT_time | xtim, | |||
unsigned int | status | |||
) |
Send a telecommand execution status reponse.
task | (in) Task handle | |
cmd | (in) Pointer to CCSDS telecommand | |
scb | (in) Spacecraft broadcast APID flag | |
dtim | (in) Time command dequeued | |
xtim | (in) Time execution completed | |
status | (in) Command completion code |
unsigned int ITC_setCmdConfirm | ( | ITC_TaskID | tid, | |
ITC_CmdClass | scb, | |||
ITC_CmdAction | fwd, | |||
ITC_CmdLevel | new, | |||
ITC_CmdLevel * | old | |||
) |
Set the command confirmation level for a task.
tid | (in) Task ID | |
scb | (in) Spacecraft broadcast APID flag | |
fwd | (in) Task acting as forwarding agent flag | |
new | (in) New command confirmation level | |
old | (in) Old command confirmation level (pointer can be NULL) |
ITC_SUCCESS | S Success | |
ITC_TASKMISS | E No entry in task table for task | |
ITC_TASKPTR | E Task pointer check failed | |
ITC_VARRNG | E Out of range variable detected |
scb
). The second element of the matrix is whether the task is acting as a forwarding agent (parameter fwd
). Thus the call ITC_setCmdReponse( tid, ITC_CMD_NORMAL, ITC_ACT_FORWARD, ITC_LVL_ERROR, &old );
would mean "for task tid
, set the command confirmation level to ITC_LVL_ERROR
when forwarding non-broadcast spacecraft commands".
unsigned int ITC_setMsgResponse | ( | ITC_TaskID | tid, | |
MSG_Level | new | |||
) |
Set the message response level of a task.
tid | (in) Task ID | |
new | (in) New task response level |
ITC_SUCCESS | S Success | |
ITC_TASKMISS | E No entry in task table for task | |
ITC_TASKPTR | E Task pointer check failed | |
ITC_VARRNG | E Out of range variable detected |