GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> CTDB / V5-5-5 > sumt_bc_sib / rad750


Interface   Data Structures   File List   Data Fields   Globals  

SUMT_bc_pkt.c File Reference

Interface functions for Summit bus controller CCSDS packet queues. More...

#include <CTDB/SUMT_bc.h>
#include <CTDB/CO1553_bc.h>
#include <PBS/TOC.h>
#include <MSG/MSG_pubdefs.h>
#include <SUMT_bc_private.h>

Functions

unsigned int SUMT_bcPktTelemRecv (SUMT_BC *bc, void **pkt, const TOC *timeout)
 Receive a CCSDS telemetry packet.
unsigned int SUMT_bcPktTelemFree (SUMT_BC *bc, void *pkt)
 Free a CCSDS telemtry packet.
unsigned int SUMT_bcPktCmdTxRecv (SUMT_BC *bc, void **pkt, const TOC *timeout)
 Receive a CCSDS telecommand transmit packet.
unsigned int SUMT_bcPktCmdTxFree (SUMT_BC *bc, void *pkt)
 Free a CCSDS telecommand transmit packet.
unsigned int SUMT_bcPktCmdRxSend (SUMT_BC *bc, void *pkt, SUMT_BC_Pkt_Free *freeHandler, void *freeArg, const TOC *timeout)
 Send a CCSDS telecommand receive packet.


Detailed Description

Interface functions for Summit bus controller CCSDS packet queues.

Author:
D.L. Wood

Function Documentation

unsigned int SUMT_bcPktCmdRxSend ( SUMT_BC bc,
void *  pkt,
SUMT_BC_Pkt_Free freeHandler,
void *  freeArg,
const TOC *  timeout 
)

Send a CCSDS telecommand receive packet.

Places a CCSDS telecommand receive packet on the bus controller output queue. The packet will be sent when bandwidth becomes available.

Parameters:
bc A device descriptor.
pkt A pointer to the packet to send. The packet buffer should start with a properly formatted CCSDS packet header.
freeHandler The function to be called after the packet has been sent.
freeArg A user argument to be passed to the freeHandler function.
timeout The time to wait for a packet on the queue.
Returns:
A CTDB MSG code.

References _SUMT_BC::check, _SUMT_BC::cmd_rx_inter, and CO1553_bcCmdRxPktSend().

Referenced by CTDB_bcPktCmdRxSend().

unsigned int SUMT_bcPktCmdTxFree ( SUMT_BC bc,
void *  pkt 
)

Free a CCSDS telecommand transmit packet.

Returns a CCSDS telecommand transmit packet buffer to the driver. This function should be called for every telecommand packet received from the function SUMT_bcPktCmdTxRecv().

Parameters:
bc A device descriptor.
pkt A pointer to the packet buffer to free.
Returns:
A CTDB MSG code.

References _SUMT_BC::check, _SUMT_BC::cmd_tx_inter, and CO1553_bcCmdTxPktFree().

Referenced by CTDB_bcPktCmdTxFree().

unsigned int SUMT_bcPktCmdTxRecv ( SUMT_BC bc,
void **  pkt,
const TOC *  timeout 
)

Receive a CCSDS telecommand transmit packet.

Waits for a new CCSDS telecommand transmit packet on the bus controller input queue. The function will place a pointer to the new packet buffer in pkt. The user should return the packet buffer to the driver by calling SUMT_bcPktCmdTxFree().

Parameters:
bc A device descriptor.
pkt Holds a pointer to the telecommand packet.
timeout The time to wait for a packet on the queue.
Returns:
A CTDB MSG code.

References _SUMT_BC::check, _SUMT_BC::cmd_tx_inter, and CO1553_bcCmdTxPktRecv().

Referenced by CTDB_bcPktCmdTxRecv().

unsigned int SUMT_bcPktTelemFree ( SUMT_BC bc,
void *  pkt 
)

Free a CCSDS telemtry packet.

Returns a CCSDS telemetry packet buffer to the driver. This function should be called for every telemetry packet received from the function SUMT_bcPktTelemRecv().

Parameters:
bc A device descriptor.
pkt A pointer to the packet buffer to free.
Returns:
A CTDB MSG code.

References _SUMT_BC::check, CO1553_bcTelemPktFree(), and _SUMT_BC::telem_inter.

Referenced by CTDB_bcPktTelemFree().

unsigned int SUMT_bcPktTelemRecv ( SUMT_BC bc,
void **  pkt,
const TOC *  timeout 
)

Receive a CCSDS telemetry packet.

Waits for a new CCSDS telemetry packet on the bus controller input queue. The function will place a pointer to the new packet buffer in pkt if everything is working correctly. The user should return the packet buffer to the driver by calling SUMT_bcPktTelemFree().

Parameters:
bc A device descriptor.
pkt Holds a pointer to the telemetry packet.
timeout The time to wait for a packet on the queue.
Returns:
A CTDB MSG code.

References _SUMT_BC::check, CO1553_bcTelemPktRecv(), and _SUMT_BC::telem_inter.

Referenced by CTDB_bcPktTelemRecv().


Generated on Tue Sep 27 14:38:53 2011 by  doxygen 1.5.8