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

Constituent: co1553_bc_sim     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

CO1553_bc_sim.h File Reference

1553 Bus Controller Simulator. More...

#include "CTDB/CTDB_msg.h"

Include dependency graph for CO1553_bc_sim.h:

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


Data Structures

struct  _CO1553_BC_Sim_Config

Simulator Control Functions

unsigned int CO1553_bcSimSizeof (void)
 Get the size of a bus controller simulator descriptor.
CO1553_BC_SimCO1553_bcSimGet (void)
 Get a pointer to the bus controller simulator static descriptor.
unsigned int CO1553_bcSimInit (CO1553_BC_Sim *bc, const CO1553_BC_Sim_Config *simConfig, const char *rtAddr)
 Intialize a 1553 bus controller simulator.
unsigned int CO1553_bcSimExit (CO1553_BC_Sim *bc)
 Shutdown a 1553 bus controller simulator.
unsigned int CO1553_bcSimStart (CO1553_BC_Sim *bc)
 Start the bus controller simulator sending 1553 bus commands.
unsigned int CO1553_bcSimStop (CO1553_BC_Sim *bc)
 Stop the bus controller simulator sending 1553 bus commands.

Packet Queue Functions

unsigned int CO1553_bcSimPktTelemRecv (CO1553_BC_Sim *bc, void **pkt)
 Receive a CCSDS telemetry packet.
unsigned int CO1553_bcSimPktTelemFree (CO1553_BC_Sim *bc, void *pkt)
 Free a CCSDS telemetry packet buffer.
unsigned int CO1553_bcSimPktCmdTxRecv (CO1553_BC_Sim *bc, void **pkt)
 Receive a CCSDS telecommand transmit packet.
unsigned int CO1553_bcSimPktCmdTxFree (CO1553_BC_Sim *bc, void *pkt)
 Free a CCSDS telecommand transmit packet buffer.
unsigned int CO1553_bcSimPktCmdRxSend (CO1553_BC_Sim *bc, void *pkt)
 Send a CCSDS telecommand receive packet.

Typedefs

typedef _CO1553_BC_Sim CO1553_BC_Sim
typedef _CO1553_BC_Sim_Config CO1553_BC_Sim_Config

Detailed Description

1553 Bus Controller Simulator.

Author:
D.L. Wood
This simulator provides a UNIX compatable environment for command and telemetry. TCP/IP sockets are used to simulate the various 1553 subaddress types.

The recognized subaddress types are shown below,

Subaddress Direction Description
Command Receive (CmdRx) Receive (BC->RT) Telecommand input
Command Transmit(CmdTx) Transmit (RT->BC) Telecommand output
Telemetry (Telem) Transmit (RT->BC) Low rate telemetry

The remote terminal simulator acts as the TCP servers. Once started, it waits for connections from the bus controller simulator, which acts as a TCP client. Only one bus controller simulator may connect to the remote terminal simulator at a given time.


Typedef Documentation

CO1553_BC_Sim
 

The bus controller simulator descriptor.

CO1553_BC_Sim_Config
 

The typedef for _CO1553_BC_Sim_Config.


Function Documentation

unsigned int CO1553_bcSimExit CO1553_BC_Sim bc  ) 
 

Shutdown a 1553 bus controller simulator.

Disconnects the bus controller simulator and releases system resources claimed by the simulator.

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

CO1553_BC_Sim* CO1553_bcSimGet void   ) 
 

Get a pointer to the bus controller simulator static descriptor.

Returns a pointer to a static instance of the simulator descriptor. This pointer may be passed in as the first paramter to all of the other simulator functions. CO1553_bcSimInit() must be called before use.

Returns:
A pointer to the BC simulator descriptor.

unsigned int CO1553_bcSimInit CO1553_BC_Sim bc,
const CO1553_BC_Sim_Config simConfig,
const char *  rtAddr
 

Intialize a 1553 bus controller simulator.

Intializes the bus controller simulator descriptor and simlator software.

Parameters:
bc An uninitialized simlator descriptor.
simConfig The configuration values for the simulator.
rtAddr The name or dot numerical IP address of the RT simulator node.
Returns:
A CTDB MSG code.

unsigned int CO1553_bcSimPktCmdRxSend CO1553_BC_Sim bc,
void *  pkt
 

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.
Returns:
A CTDB MSG code.

unsigned int CO1553_bcSimPktCmdTxFree CO1553_BC_Sim bc,
void *  pkt
 

Free a CCSDS telecommand transmit packet buffer.

Returns a telecommand transmit packet buffer to the simulator.

Parameters:
bc A device descriptor.
pkt The telecommand packet buffer.
Returns:
A CTDB MSG code.

unsigned int CO1553_bcSimPktCmdTxRecv CO1553_BC_Sim bc,
void **  pkt
 

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 in pkt. Call CO1553_bcSimPktCmdTxFree() to return the packet buffer to the simulator.

Parameters:
bc A simulator descriptor.
pkt Holds the telecommand packet pointer.
Returns:
A CTDB MSG code.

unsigned int CO1553_bcSimPktTelemFree CO1553_BC_Sim bc,
void *  pkt
 

Free a CCSDS telemetry packet buffer.

Returns a telemetry packet buffer to the simulator.

Parameters:
bc A device descriptor.
pkt The telemetry packet buffer.
Returns:
A CTDB MSG code.

unsigned int CO1553_bcSimPktTelemRecv CO1553_BC_Sim bc,
void **  pkt
 

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 in pkt. Call CO1553_bcSimPktTelemFree() to return the packet buffer to the simulator.

Parameters:
bc A simulator descriptor.
pkt Holds the telemetry packet pointer.
Returns:
A CTDB MSG code.

unsigned int CO1553_bcSimSizeof void   ) 
 

Get the size of a bus controller simulator descriptor.

Returns the size of a Summit bus controller simulator descriptor. The user is responsible for allocating this memory before calling SUMT_bcSimInit().

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

Returns:
The size in bytes of the simulator descriptor.

unsigned int CO1553_bcSimStart CO1553_BC_Sim bc  ) 
 

Start the bus controller simulator sending 1553 bus commands.

Starts the bus controller sending commands on the bus for the remote terminal. For the simulator, the bus controller TCP client connects to the subaddress sockets.

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

unsigned int CO1553_bcSimStop CO1553_BC_Sim bc  ) 
 

Stop the bus controller simulator sending 1553 bus commands.

Stops the bus controller sending commands on the bus for the remote terminal. For the simulator, the bus controller TCP client disconnects from the RT server.

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


Generated on Wed Dec 14 20:48:45 2005 by  doxygen 1.4.4