GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > CTDB / V5-5-0
Constituent: sumt_rt_poll_pmc1553     Tag: mv2304
#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. |