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

Constituent: ctdb_com_test_poll     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

SUMT_rt.h File Reference

Summit 1553 Remote Terminal Driver. More...

#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:

Include dependency graph

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

Included by dependency graph

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_RTSUMT_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
}

Detailed Description

Summit 1553 Remote Terminal Driver.

Author:
D.L. Wood
This driver provides a 1553 remote terminal interface through a UTMC Summit controller device. The user is provided function to initialize, control, and transfer data on the 1553 bus. The interface for sending data is through CCSDS packet queues.

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


Typedef Documentation

SUMT_RT
 

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.

SUMT_RT_Bus_Config
 

The typedef for _SUMT_RT_Bus_Config.

SUMT_RT_Callback_Config
 

The typedef for _SUMT_RT_Callback_Config.

SUMT_RT_Diag
 

The typedef for _SUMT_RT_Diag.

SUMT_RT_Hkp_Handler
 

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.

        int SUMT_RT_Hkp_Handler(void *buf, void *arg)

Parameters:
buf A local buffer to accept the SOH packet contents.
arg A user supplied argument.
Returns:
SUMT_RT_OK if successful; other code if HKP packet not inserted.

SUMT_RT_Mode_Flags
 

The typedef for _SUMT_RT_Mode_Flags.

SUMT_RT_Pkt_Config
 

The typedef for _SUMT_RT_Pkt_Config.

SUMT_RT_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 SUMT_RT_Pkt_Free(void *pkt, void *arg)

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

SUMT_RT_Priority
 

The typedef for _SUMT_RT_Priority.

SUMT_RT_Subaddr
 

The typedef for _SUMT_RT_Subaddr.

SUMT_RT_Task_Config
 

The typedef for _SUMT_RT_Task_Config.


Enumeration Type Documentation

enum _SUMT_RT_Mode_Flags
 

Configuration bitmask values for the mode_flags member of _SUMT_RT_Bus_Config.

Enumeration values:
SUMT_RT_MODE_FLAG_VALID  The RT will accept the mode code command as valid.
SUMT_RT_MODE_FLAG_BCAST  The mode code command may be broadcast.

enum _SUMT_RT_Priority
 

Priority values for telemetry packets.

Enumeration values:
SUMT_RT_PRIORITY_LOW  A priority value to indicate low priority.
SUMT_RT_PRIORITY_HIGH  A priority value to indicate high priority.

enum _SUMT_RT_Subaddr
 

Subaddress ID values for keying the polled mode driver.

Enumeration values:
SUMT_RT_SUBADDR_CMD_RX  Input telecommands.
SUMT_RT_SUBADDR_CMD_TX  Output telecommands.
SUMT_RT_SUBADDR_TELEM_DATA  Low rate telemetry data.
SUMT_RT_SUBADDR_TELEM_END  Low rate telemetry completion.
SUMT_RT_SUBADDR_WRAP  Data wraparound.


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