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

Constituent: co1553_bc_sim     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

CTDB_bc.h File Reference

1553 Bus Controller Interface More...

#include "CTDB/CTDB_msg.h"
#include "PBS/TOC.h"

Include dependency graph for CTDB_bc.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Control Functions

unsigned int CTDB_bcSizeof (void)
 Get the size of a bus controller interface descriptor.

void * CTDB_bcGet (void)
 Get a pointer to the bus controller interface static descriptor.

unsigned int CTDB_bcExit (void *bc)
 Shutdown a 1553 bus controller interface.

unsigned int CTDB_bcStart (void *bc)
 Start the bus controller listening for 1553 bus commands.

unsigned int CTDB_bcStop (void *bc)
 Stop the bus controller listening for 1553 bus commands.


Packet Queue Functions

unsigned int CTDB_bcPktTelemRecv (void *bc, void **pkt, const TOC *timeout)
 Receive a CCSDS telemetry packet.

unsigned int CTDB_bcPktTelemFree (void *bc, void *pkt)
 Free a CCSDS telemtry packet.

unsigned int CTDB_bcPktCmdTxRecv (void *bc, void **pkt, const TOC *timeout)
 Receive a CCSDS telecommand transmit packet.

unsigned int CTDB_bcPktCmdTxFree (void *bc, void *pkt)
 Free a CCSDS telecommand transmit packet.

unsigned int CTDB_bcPktCmdRxSend (void *bc, void *pkt, CTDB_BC_Pkt_Free *freeHandler, void *freeArg, const TOC *timeout)
 Send a CCSDS telecommand receive packet.


Typedefs

typedef void CTDB_BC_Pkt_Free (void *pkt, void *arg)

Detailed Description

1553 Bus Controller Interface

Author:
D.L. Wood
This library contains functions that serve as wrappers for the various LAT 1553 implementations. Allows higher level code to be implementation independent, except for the initialization functions. Also note that the actual hardware drivers can return device specific error codes. These specific error codes are not covered by this interface.

Typedef Documentation

CTDB_BC_Pkt_Free
 

The definition of a packet buffer memory free callback function. These callbacks are employeed when users are sending packets on a transmit queue. The packet memory is borrowed while the packet is on the queue. When the packet contents have been transmitted, the free handler is called with a user supplied argument.

        void CTDB_BC_Pkt_Free(void *pkt, void *arg)

Parameters:
pkt A pointer to the packet buffer to release.
arg The user defined argument.


Function Documentation

unsigned int CTDB_bcExit void *  bc  ) 
 

Shutdown a 1553 bus controller interface.

Disconnects the bus controller and releases system resources.

Parameters:
bc A device descriptor.
Returns:
A CTDB MSG code.

Here is the call graph for this function:

void * CTDB_bcGet void   ) 
 

Get a pointer to the bus controller interface static descriptor.

Returns a pointer to a static instance of the interface descriptor. This pointer may be passed in as the first paramter to all of the other interface functions. The device-specific intialization function must be called before use.

Returns:
A pointer to the BC interface descriptor.

Here is the call graph for this function:

unsigned int CTDB_bcPktCmdRxSend void *  bc,
void *  pkt,
CTDB_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. This value is ignored by the simulator implementation.
Returns:
A CTDB MSG code.

Here is the call graph for this function:

unsigned int CTDB_bcPktCmdTxFree void *  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 CTDB_bcPktCmdTxRecv().

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

Here is the call graph for this function:

unsigned int CTDB_bcPktCmdTxRecv void *  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 CTDB_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. This value is ignored by the simulator implementation.
Returns:
A CTDB MSG code.

Here is the call graph for this function:

unsigned int CTDB_bcPktTelemFree void *  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 CTDB_bcPktTelemRecv().

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

Here is the call graph for this function:

unsigned int CTDB_bcPktTelemRecv void *  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. The user should return the packet buffer to the driver by calling CTDB_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. This value is ignored by the simulator implementation.
Returns:
A CTDB MSG code.

Here is the call graph for this function:

unsigned int CTDB_bcSizeof void   ) 
 

Get the size of a bus controller interface descriptor.

Returns the size of a bus controller descriptor.

This function is obsolete. Use CTDB_bcGet() to provide an instance of the simulator descriptor instead.

Returns:
The size in bytes of the descriptor.

Here is the call graph for this function:

unsigned int CTDB_bcStart void *  bc  ) 
 

Start the bus controller listening for 1553 bus commands.

Starts the bus controller processing bus commands to send to the remote terminal.

Parameters:
bc A device descriptor.
Returns:
A CTDB MSG code.

Here is the call graph for this function:

unsigned int CTDB_bcStop void *  bc  ) 
 

Stop the bus controller listening for 1553 bus commands.

Stops the bus controller from sending 1553 bus commands..

Parameters:
bc A device descriptor.
Returns:
A CTDB MSG code.

Here is the call graph for this function:


Generated on Wed Sep 7 22:50:27 2005 by doxygen 1.3.3