GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > CTDB / V5-2-1

Constituent: co1553_rt_sim     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

CO1553_rt_sim.h File Reference

1553 Remote Terminal Simulator. More...

#include "CTDB/CTDB_msg.h"

Include dependency graph for CO1553_rt_sim.h:

Include dependency graph

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

Included by dependency graph

Data Structures

struct  _CO1553_RT_Sim_Config

Simulator Control Functions

unsigned int CO1553_rtSimSizeof (void)
 Get the size of a remote terminal simulator descriptor.

CO1553_RT_SimCO1553_rtSimGet (void)
 Get a pointer to the remote terminal simulator static descriptor.

unsigned int CO1553_rtSimInit (CO1553_RT_Sim *rt, const CO1553_RT_Sim_Config *simConfig)
 Intialize a 1553 remote terminal simulator.

unsigned int CO1553_rtSimExit (CO1553_RT_Sim *rt)
 Shutdown a 1553 remote terminal simulator.

unsigned int CO1553_rtSimStart (CO1553_RT_Sim *rt)
 Start the remote terminal simulator listening for 1553 bus commands.

unsigned int CO1553_rtSimStop (CO1553_RT_Sim *rt)
 Stop the remote terminal simulator listening for 1553 bus commands.

unsigned int CO1553_rtSimHkpSet (CO1553_RT_Sim *rt, void *hkpHandler, void *hkpArg)
 Change the HKP application callback.

unsigned int CO1553_rtSimHkpGet (CO1553_RT_Sim *rt, void **hkpHandler, void **hkpArg)
 Get current HKP application callback information.


Packet Queue Functions

unsigned int CO1553_rtSimPktTelemSend (CO1553_RT_Sim *rt, void *pkt)
 Send a CCSDS telemetry packet.

unsigned int CO1553_rtSimPktCmdTxSend (CO1553_RT_Sim *rt, void *pkt)
 Send a CCSDS telecommand transmit packet.

unsigned int CO1553_rtSimPktCmdRxRecv (CO1553_RT_Sim *rt, void **pkt)
 Receive a CCSDS telecommand receive packet.

unsigned int CO1553_rtSimPktCmdRxFree (CO1553_RT_Sim *rt, void *pkt)
 Free a CCSDS telecommand receive packet buffer.


Typedefs

typedef _CO1553_RT_Sim CO1553_RT_Sim
typedef _CO1553_RT_Sim_Config CO1553_RT_Sim_Config

Detailed Description

1553 Remote Terminal 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_RT_Sim
 

Remote terminal simulator descriptor.

CO1553_RT_Sim_Config
 

The typedef for _CO1553_RT_Sim_Config.


Function Documentation

unsigned int CO1553_rtSimExit CO1553_RT_Sim rt  ) 
 

Shutdown a 1553 remote terminal simulator.

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

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

Here is the call graph for this function:

CO1553_RT_Sim* CO1553_rtSimGet void   ) 
 

Get a pointer to the remote terminal 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_rtSimInit() must be called before use.

Returns:
A pointer to the RT simulator descriptor.

unsigned int CO1553_rtSimHkpGet CO1553_RT_Sim rt,
void **  hkpHandler,
void **  hkpArg
 

Get current HKP application callback information.

Retrieves the HKP application callback function and arguments current values.

Parameters:
rt A device descriptor.
hkpHandler Stores the pointer to the application HKP function.
hkpArg Stores user argument for hkpHandler.
Returns:
A CTDB MSG code.

unsigned int CO1553_rtSimHkpSet CO1553_RT_Sim rt,
void *  hkpHandler,
void *  hkpArg
 

Change the HKP application callback.

Changes the HKP application callback function and arguments to new values (simulated).

Parameters:
rt A device descriptor.
hkpHandler The callback to handle insertion of HKP telemety.
hkpArg A user argument for hkpHandler.
Returns:
A CTDB MSG code.

unsigned int CO1553_rtSimInit CO1553_RT_Sim rt,
const CO1553_RT_Sim_Config simConfig
 

Intialize a 1553 remote terminal simulator.

Intializes the remote terminal simulator descriptor and simlator software.

Parameters:
rt An uninitialized simlator descriptor.
simConfig The configuration values for the simulator.
Returns:
A CTDB MSG code.

unsigned int CO1553_rtSimPktCmdRxFree CO1553_RT_Sim rt,
void *  pkt
 

Free a CCSDS telecommand receive packet buffer.

Returns a telecommand receive packet buffer to the simulator.

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

unsigned int CO1553_rtSimPktCmdRxRecv CO1553_RT_Sim rt,
void **  pkt
 

Receive a CCSDS telecommand receive packet.

Waits for a new CCSDS telecommand receive packet on the remote terminal input queue. The function will place a pointer to the new packet in pkt. Call CO1553_rtSimPktCmdRxFree() to return the packet buffer to the simulator.

Parameters:
rt A device descriptor.
pkt Holds a pointer to the received telecommand packet buffer.
Returns:
A CTDB MSG code.

Here is the call graph for this function:

unsigned int CO1553_rtSimPktCmdTxSend CO1553_RT_Sim rt,
void *  pkt
 

Send a CCSDS telecommand transmit packet.

Places a CCSDS telecommand packet on the remote terminal output queue. The packet will be sent when bandwidth becomes available.

Parameters:
rt A simultator 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.

Here is the call graph for this function:

unsigned int CO1553_rtSimPktTelemSend CO1553_RT_Sim rt,
void *  pkt
 

Send a CCSDS telemetry packet.

Places a CCSDS telemetry packet on the remote terminal output queue. The packet will be sent when bandwidth becomes available.

Parameters:
rt A simultator 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.

Here is the call graph for this function:

unsigned int CO1553_rtSimSizeof void   ) 
 

Get the size of a remote terminal simulator descriptor.

Returns the size of a Summit remote terminal simulator descriptor. The user is responsible for allocating this memory before calling SUMT_rtSimInit().

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

Returns:
The size in bytes of the simulator descriptor.

unsigned int CO1553_rtSimStart CO1553_RT_Sim rt  ) 
 

Start the remote terminal simulator listening for 1553 bus commands.

Starts the remote terminal listening on the 1553 bus for commands from the bus controller. For the simulator, the remote terminal TCP server listens for connections on the subaddress sockets.

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

unsigned int CO1553_rtSimStop CO1553_RT_Sim rt  ) 
 

Stop the remote terminal simulator listening for 1553 bus commands.

Stops the remote terminal listening on the 1553 bus for commands from the bus controller. For the simulator, the remote terminal TCP server disconnects the subaddress sockets.

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


Generated on Tue Mar 22 20:51:47 2005 by doxygen 1.3.3