GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LIM / V1-20-0

Constituent: lim     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

LIM_pkt_send.c File Reference

Send command and telemetry packets. More...

#include "string.h"
#include "CCSDS/CCSDS_pkt.h"
#include "ITC/ITC_drvdefs.h"
#include "ITC/ITC_pubdefs.h"
#include "LIM/LIM_msgs.h"
#include "LIM/LIM_pubdefs.h"
#include "MSG/MSG_pubdefs.h"
#include "PBS/MBA.h"
#include "PBS/WCT.h"
#include "LIM_pkt_send.h"
#include "LIM_pool.h"

Include dependency graph for LIM_pkt_send.c:


Data Structures

struct  _LIM_Pkt_Send
 State information for a LIM packet sending object. More...

Defines

#define LIM_PKT_SEND_VALID_KEY   (('L'<<24)+('P'<<16)+('K'<<8)+'S')
 Value that indicates LIM packet sending object state is valid.

Functions

static unsigned int lim_pkt_send_check (LIM_Pkt_Send *object_p)
 Validate a LIM packet sending object pointer.
static void lim_pkt_send_cb (ITC_QueueItem *qitem_p, unsigned int status_in, void *parm_0, void *parm_1, void *parm_2, unsigned int tx)
 Callback for freeing queue items for packets sent.
unsigned int LIM_pkt_send_new (LIM_Pkt_Send **object_pp, LIM_Pool *pool_p)
 Create and initialize a new packet sending object.
unsigned int LIM_pkt_send_delete (LIM_Pkt_Send *object_p)
 Shutdown and delete a packet sending object.
char * LIM_pkt_send_get_desc (LIM_Pkt_Send *object_p)
 Return the description field for a packet.
ITC_TaskID LIM_pkt_send_get_tid (LIM_Pkt_Send *object_p)
 Return the ID of the task associated with a packet.
unsigned int LIM_pkt_set_info (LIM_Pkt_Send *object_p, ITC_NodeID nid, ITC_TaskID tid, ITC_QueueID qid, unsigned int apid, unsigned int func, int use_checksum, char *desc)
 Update information about a packet.
static unsigned int lim_pkt_send_pkt (LIM_Pkt_Send *object_p, const unsigned char *pkt_p, unsigned int pkt_bytes, CCSDS_Pkt_Type ccsds_pkt_type, ITC_QueueItem **status_qitem_pp)
 Send a command or telemetry packet.
unsigned int LIM_pkt_send_cmd (LIM_Pkt_Send *object_p, const unsigned char *pkt_p, unsigned int pkt_bytes, ITC_QueueItem **status_qitem_pp)
 Send a command packet.
unsigned int LIM_pkt_send_tlm (LIM_Pkt_Send *object_p, const unsigned char *pkt_p, unsigned int pkt_bytes)
 Send a telemetry packet.
unsigned int LIM_pkt_fwd_pkt (LIM_Pkt_Send *object_p, const ITC_QueueItem *qitem_p)
 Forward a packet.

Detailed Description

Send command and telemetry packets.

**  CVS $Id: LIM_pkt_send.c,v 1.12 2008/01/13 19:11:32 dmay Exp $
**  

These are functions related to sending command and telemetry packets. They basically encapsulate the ITC_bind, ITC_send, and ITC_forward functions. They also handle the details of building the packets and allocating memory for them.


Function Documentation

unsigned int LIM_pkt_fwd_pkt LIM_Pkt_Send object_p,
const ITC_QueueItem *  qitem_p
 

Forward a packet.

Parameters:
object_p Pointer to packet sending object.
qitem_p Pointer to queue item to forward.
Returns:
MSG code.

void lim_pkt_send_cb ITC_QueueItem *  qitem_p,
unsigned int  status_in,
void *  parm_0,
void *  parm_1,
void *  parm_2,
unsigned int  tx
[static]
 

Callback for freeing queue items for packets sent.

Parameters:
qitem_p Pointer to queue item.
status_in Completion code.
parm_0 Callback parameter 0 (original cb_parm_0 value).
parm_1 Callback parameter 1 (original free_cb value).
parm_2 Callback parameter 2 (pointer to pkt sending object).
tx Flag indicating sender-side failure.
Returns:
Nothing.

unsigned int lim_pkt_send_check LIM_Pkt_Send object_p  )  [static]
 

Validate a LIM packet sending object pointer.

Parameters:
object_p Pointer to packet sending object.
Returns:
MSG code.

unsigned int LIM_pkt_send_cmd LIM_Pkt_Send object_p,
const unsigned char *  pkt_p,
unsigned int  pkt_bytes,
ITC_QueueItem **  status_qitem_pp
 

Send a command packet.

Parameters:
object_p Pointer to packet sending object.
pkt_p Pointer to packet data.
pkt_bytes Size of packet data, in bytes.
status_qitem_pp Location to store pointer to queue item.
Returns:
MSG code.

unsigned int LIM_pkt_send_delete LIM_Pkt_Send object_p  ) 
 

Shutdown and delete a packet sending object.

Parameters:
object_p Pointer to packet sending object.
Returns:
MSG code.

char * LIM_pkt_send_get_desc LIM_Pkt_Send object_p  ) 
 

Return the description field for a packet.

Parameters:
object_p Pointer to packet send object.
Returns:
Description field value from the packet.

ITC_TaskID LIM_pkt_send_get_tid LIM_Pkt_Send object_p  ) 
 

Return the ID of the task associated with a packet.

Parameters:
object_p Pointer to packet send object.
Returns:
Task ID field value from the packet.

unsigned int LIM_pkt_send_new LIM_Pkt_Send **  object_pp,
LIM_Pool pool_p
 

Create and initialize a new packet sending object.

Parameters:
object_pp Location to return pointer to new object.
pool_p Pointer to a memory pool object.
Returns:
MSG code.

unsigned int lim_pkt_send_pkt LIM_Pkt_Send object_p,
const unsigned char *  pkt_p,
unsigned int  pkt_bytes,
CCSDS_Pkt_Type  ccsds_pkt_type,
ITC_QueueItem **  status_qitem_pp
[static]
 

Send a command or telemetry packet.

Parameters:
object_p Pointer to packet sending object.
pkt_p Pointer to packet payload.
pkt_bytes Size of packet payload, in bytes.
ccsds_pkt_type Packet type value for the CCSDS header.
status_qitem_pp Location to store pointer to queue item.
Returns:
MSG code.

unsigned int LIM_pkt_send_tlm LIM_Pkt_Send object_p,
const unsigned char *  pkt_p,
unsigned int  pkt_bytes
 

Send a telemetry packet.

Parameters:
object_p Pointer to packet sending object.
pkt_p Pointer to packet data.
pkt_bytes Size of packet data, in bytes.
Returns:
MSG code.

unsigned int LIM_pkt_set_info LIM_Pkt_Send object_p,
ITC_NodeID  nid,
ITC_TaskID  tid,
ITC_QueueID  qid,
unsigned int  apid,
unsigned int  func,
int  use_checksum,
char *  desc
 

Update information about a packet.

Parameters:
object_p Pointer to packet sending object.
nid ID of target node.
tid ID of target task.
qid ID of target queue.
apid APID of the packet.
func Function code of the packet.
use_checksum Flag to indicate if packet includes a checksum.
desc Description of the packet.
Returns:
MSG code.


Generated on Thu Oct 30 01:45:09 2008 by  doxygen 1.4.4