GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > CTDB / V5-5-0
Constituent: sumt_rt_sib     Tag: rad750
#include "CTDB/CTDB_msg.h"
#include "PBS/TOC.h"
#include "PBS/TASK.h"
#include "MSG/MSG_pubdefs.h"
Include dependency graph for SUMT_rt.h:
This graph shows which files directly or indirectly include this file:
Data Structures | |
struct | _SUMT_RT_Bus_Config |
struct | _SUMT_RT_Callback_Config |
struct | _SUMT_RT_Diag |
struct | _SUMT_RT_Pkt_Config |
struct | _SUMT_RT_Task_Config |
Device Control Functions | |
unsigned int | SUMT_rtSizeof (void) |
Get the size of a remote terminal driver descriptor. | |
SUMT_RT * | SUMT_rtGet (void) |
Get a pointer to the remote terminal driver static descriptor. | |
unsigned int | SUMT_rtInit (SUMT_RT *rt, const SUMT_RT_Bus_Config *busConfig, const SUMT_RT_Pkt_Config *pktConfig, const SUMT_RT_Callback_Config *cbConfig, const SUMT_RT_Task_Config *taskConfig) |
Intialize a remote terminal driver and 1553 device hardware. | |
unsigned int | SUMT_rtStart (SUMT_RT *rt) |
Start the remote terminal listening for 1553 bus commands. | |
unsigned int | SUMT_rtStop (SUMT_RT *rt) |
Stop the remote terminal from listening for 1553 bus commands. | |
unsigned int | SUMT_rtExit (SUMT_RT *rt) |
Shutdown a remote terminal driver and 1553 device hardware. | |
unsigned int | SUMT_rtHkpSet (SUMT_RT *rt, SUMT_RT_Hkp_Handler *hkpHandler, void *hkpArg) |
Change the HKP application callback. | |
unsigned int | SUMT_rtHkpGet (SUMT_RT *rt, SUMT_RT_Hkp_Handler **hkpHandler, void **hkpArg) |
Get current HKP application callback information. | |
Packet Queue Functions | |
unsigned int | SUMT_rtPktTelemSend (SUMT_RT *rt, void *pkt, SUMT_RT_Pkt_Free *freeHandler, void *freeArg, SUMT_RT_Priority priority, const TOC *timeout) |
Send a CCSDS telemetry packet. | |
unsigned int | SUMT_rtPktCmdTxSend (SUMT_RT *rt, void *pkt, SUMT_RT_Pkt_Free *freeHandler, void *freeArg, const TOC *timeout) |
Send an outgoing CCSDS command transmit packet. | |
unsigned int | SUMT_rtPktCmdRxRecv (SUMT_RT *rt, void **pkt, const TOC *timeout) |
Receive an incomming CCSDS command receive packet. | |
unsigned int | SUMT_rtPktCmdRxFree (SUMT_RT *rt, void *pkt) |
Free a CCSDS command receive packet. | |
Diagnostics Functions | |
unsigned int | SUMT_rtDiagGet (SUMT_RT *rt, SUMT_RT_Diag *diag) |
Read the diagnostics information. | |
unsigned int | SUMT_rtDiagClear (SUMT_RT *rt) |
Clear the diagnostics information. | |
Typedefs | |
typedef enum _SUMT_RT_Priority | SUMT_RT_Priority |
typedef enum _SUMT_RT_Mode_Flags | SUMT_RT_Mode_Flags |
typedef _SUMT_RT | SUMT_RT |
typedef enum _SUMT_RT_Subaddr | SUMT_RT_Subaddr |
typedef unsigned int | SUMT_RT_Hkp_Handler (void *buf, void *arg) |
typedef void | SUMT_RT_Pkt_Free (void *pkt, void *arg) |
typedef _SUMT_RT_Bus_Config | SUMT_RT_Bus_Config |
typedef _SUMT_RT_Pkt_Config | SUMT_RT_Pkt_Config |
typedef _SUMT_RT_Task_Config | SUMT_RT_Task_Config |
typedef _SUMT_RT_Diag | SUMT_RT_Diag |
typedef _SUMT_RT_Callback_Config | SUMT_RT_Callback_Config |
Enumerations | |
enum | _SUMT_RT_Priority { SUMT_RT_PRIORITY_LOW = 0, SUMT_RT_PRIORITY_HIGH = 1 } |
enum | _SUMT_RT_Mode_Flags { SUMT_RT_MODE_FLAG_VALID = 0x0001, SUMT_RT_MODE_FLAG_BCAST = 0x0002 } |
enum | _SUMT_RT_Subaddr { SUMT_RT_SUBADDR_CMD_RX = 0x0001, SUMT_RT_SUBADDR_CMD_TX = 0x0002, SUMT_RT_SUBADDR_TELEM_DATA = 0x0004, SUMT_RT_SUBADDR_TELEM_END = 0x0008, SUMT_RT_SUBADDR_WRAP = 0x0010 } |
The driver recognizes a set of subaddress types. Each type can transfer one packet. 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
|
Each subaddress is provided with queues and callback mechanisms to transfer packets to and from the 1553 remote terminal.
The Summit RT drivers are supported for different target boards.
Library | Board | Tags |
libsumt_rt_pmc1553.o | Alphi PMC-1553B | mv2304 mcp750 |
libsumt_rt_sib.o | LAT SIB | rad750 mcp750
|
LAT SIB Board
The Summit driver for the LAT SIB board assumes that the PCI configuration header of the board has been setup by the PCI autoconfig process or something similar. The driver will obtain the PCI MEM address from the SIB/sib constituent function SIB_queury(). The driver will invoke pciIntConnect() to setup the interrupt handler.
Alphi PMC-1553B Board
The Summit driver for the PMC1553 board assumes that the PCI configuration header of the board has been setup by the PCI autoconfig process or something similar. The driver will obtain the PCI MEM addresses from the config Base Address registers #0, #1, and #3. The driver will call sysPciToLocalAdrs() to map the BAR values into local address space. The driver will invoke pciIntConnect() to setup the interrupt handler based on the value contained in the config Interrupt Line register.
Driver Memory Usage
The Summit driver requires a small amount of memory for internal data objects. The primary memory requirements, however, derive from the packet queue buffers. The Summit remote terminal driver memory requirements are summarized below:
Driver data structures | < 1 KB |
Telecommand packet input queue | queue size * (72 bytes + user) |
Telecommand packet output queue | queue size * 24 bytes |
Telemetry packet output queue | queue size * 24 bytes |
Telemetry block buffer | 960 bytes |
RT event service task Stack | 8192 bytes |
RT event service task queue | 896 bytes
|
|
An interrupt mode driver remote terminal descriptor. The driver interface functions will take a pointer to an instance of one of these structures as a parameter. |
|
The typedef for _SUMT_RT_Bus_Config. |
|
The typedef for _SUMT_RT_Callback_Config. |
|
The typedef for _SUMT_RT_Diag. |
|
The format of the real-time housekeeping remote terminal callback. The user provides this function so that the HKP data packet may be inserted into the 1553 frame. The user should copy the HKP packet, with properly formatted CCSDS header, into the buf memory.
unsigned int SUMT_RT_Hkp_Handler(void *buf, void *arg)
|
|
The typedef for _SUMT_RT_Mode_Flags. |
|
The typedef for _SUMT_RT_Pkt_Config. |
|
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 SUMT_RT_Pkt_Free(void *pkt, void *arg)
|
|
The typedef for _SUMT_RT_Priority. |
|
The typedef for _SUMT_RT_Subaddr. |
|
The typedef for _SUMT_RT_Task_Config. |
|
Configuration bitmask values for the mode_flags member of _SUMT_RT_Bus_Config. |
|
Priority values for telemetry packets. |
|
Subaddress ID values for keying the polled mode driver. |
|
Clear the diagnostics information. Sets to zero the current diagnostics counter values.
|
|
Read the diagnostics information. Places the current diagnostics counter values into diag.
|
|
Shutdown a remote terminal driver and 1553 device hardware. Stops the remote terminal from processing 1553 bus events and releases system resources claimed by the driver. The remote terminal event service task will be deleted.
|
|
Get a pointer to the remote terminal driver static descriptor. Returns a pointer to a static instance of the driver descriptor. This pointer may be passed in as the first paramter to all of the other driver functions. SUMT_rtInit() must be called before use.
|
|
Get current HKP application callback information. Retrieves the HKP application callback function and arguments current values.
|
Here is the call graph for this function:
|
Change the HKP application callback. Changes the HKP application callback function and arguments to new values. The old values, set either in SUMT_rtInit() or in the last call to this function, are replaced.
|
Here is the call graph for this function:
|
Intialize a remote terminal driver and 1553 device hardware. Intializes the Summit remote terminal device descriptor and device hardware. The device and associated software structures are configured according to the contents of the busConfig, boardConfig, pktConfig, and cbConfig structures. The device internal registers are initialized to remote terminal mode. The function SUMT_rtConfigure() is called to setup the shared memory structures as well as the device RT illegallization registers. At the end, the device sercive task is spawned, and the device interrupts are enabled. The device is still not listening on the bus. Call SUMT_rtStart() to enable activity.
|
Here is the call graph for this function:
|
Free a CCSDS command receive packet. Returns a CCSDS telecommand input packet buffer to the driver. This function should be called for every command packet received from the function SUMT_rtPktCmdRxRecv().
|
Here is the call graph for this function:
|
Receive an incomming CCSDS command 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 buffer in pkt. The user should return the packet buffer to the driver by calling SUMT_rtPktCmdRxFree().
|
Here is the call graph for this function:
|
Send an outgoing CCSDS command transmit packet. Places a CCSDS telecommand packet on the remote terminal output queue. The packet will be sent when bandwidth becomes available.
|
Here is the call graph for this function:
|
Send a CCSDS telemetry packet. Places a CCSDS telemetry packet on one of the remote terminal output queues. The packet will be sent when bandwidth becomes available.
|
Here is the call graph for this function:
|
Get the size of a remote terminal driver descriptor. Returns the size of a Summit remote terminal driver descriptor. The user is responsible for allocating this memory before calling SUMT_rtInit().
|
|
Start the remote terminal listening for 1553 bus commands. Starts the remote terminal listening on the 1553 bus for commands from the bus controller.
|
Here is the call graph for this function:
|
Stop the remote terminal from listening for 1553 bus commands. Stops the remote terminal from listening on the 1553 bus for commands from the bus controller.
|