GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> CTDB / V5-5-6 > sumt_rt_poll_sib_boot / rad750


Interface   Data Structures   File List   Data Fields   Globals  

SUMT_rt_poll.h File Reference

Polled Mode SUMT 1553 Remote Terminal Driver. More...

#include <CTDB/SUMT_rt.h>

Typedefs

typedef struct _SUMT_RT_Poll SUMT_RT_Poll

Functions

SUMT_RT_PollSUMT_rtPollGet (void)
 Get a pointer to the polled mode remote terminal descriptor.
unsigned int SUMT_rtPollInit (SUMT_RT_Poll *rt, const SUMT_RT_Bus_Config *busConfig, unsigned int busAddr)
 Intialize a polled mode remote terminal driver and 1553 device hardware.
unsigned int SUMT_rtPollStart (SUMT_RT_Poll *rt)
 Start the remote terminal listening for 1553 bus commands.
unsigned int SUMT_rtPollQuery (SUMT_RT_Poll *rt, unsigned short *subAddr, void *buf)
 Query the polled mode remote terminal for any new 1553 bus events.
unsigned int SUMT_rtPollTelem (SUMT_RT_Poll *rt, void *buf, const void *pkt, int size)
 Set the polled mode remote terminal telemetry output values.


Detailed Description

Polled Mode SUMT 1553 Remote Terminal Driver.

Author:
D.L. Wood
The polled mode driver generally deals with a simplified bus schedule and does not provide the full CCSDS packet interface. Only interfaces to the telecommand receive and telemetry transmit subaddresses are provided.

Typedef Documentation

A polled mode driver remote terminal descriptor. The driver interface functions will take a pointer to an instance of one of these structures as a parameter.


Function Documentation

SUMT_RT_Poll* SUMT_rtPollGet ( void   ) 

Get a pointer to the polled mode remote terminal descriptor.

Returns a pointer to the global Summit polled mode remote terminal driver descriptor. The user is responsible for calling SUMT_rtPollInit() to initialize this descriptor.

Returns:
A pointer to the device descriptor.

unsigned int SUMT_rtPollInit ( SUMT_RT_Poll rt,
const SUMT_RT_Bus_Config busConfig,
unsigned int  busAddr 
)

Intialize a polled mode 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 structure.

Parameters:
rt An uninitialized device descriptor.
busConfig The configuration values for the 1553 bus schedule.
busAddr The bus address of the Summit controller board (not needed for PCI Summit boards).
Returns:
A CTDB MSG code.

References _SUMT_RT_Poll::check, _SUMT_RT_Poll::data_buf, _SUMT_RT_Poll::desc_blk, _SUMT_RT_Poll::mem_addr, _SUMT_RT_Poll::mem_size, _SUMT_RT_Bus_Config::rt_addr, SUMT_CHAEN, SUMT_CHBEN, SUMT_DMAF, SUMT_ILCMD, SUMT_memSet(), SUMT_MERR, SUMT_MSEL_RT, SUMT_MSG, SUMT_READY, SUMT_REG_BIT_WORD, SUMT_REG_COMMAND, SUMT_REG_CONTROL, SUMT_REG_I_RCV_0, SUMT_REG_I_RCV_1, SUMT_REG_I_XMT_0, SUMT_REG_I_XMT_1, SUMT_REG_IBRD_RCV_0, SUMT_REG_IBRD_RCV_1, SUMT_REG_IBRD_XMT_0, SUMT_REG_IBRD_XMT_1, SUMT_REG_IMOD_BRD_RCV_0, SUMT_REG_IMOD_BRD_RCV_1, SUMT_REG_IMOD_BRD_XMT_0, SUMT_REG_IMOD_BRD_XMT_1, SUMT_REG_IMOD_RCV_0, SUMT_REG_IMOD_RCV_1, SUMT_REG_IMOD_XMT_0, SUMT_REG_IMOD_XMT_1, SUMT_REG_IRQ_LLP, SUMT_REG_IRQ_MASK, SUMT_REG_IRQ_PEND, SUMT_REG_SRT_DP, SUMT_REG_STATUS, SUMT_REG_STATUS_WORD, SUMT_REG_WRITE, _SUMT_RT_Poll::sumt_regs, SUMT_reset(), SUMT_RT_DESC_SIZE, SUMT_RT_POLL_MAX_TELEM_MSG, SUMT_RTA, SUMT_rtPollBoardInit(), SUMT_rtPollConfigure(), SUMT_RTPTY, SUMT_SSYSF, SUMT_SUBAD, SUMT_test(), SUMT_TPARF, SUMT_WMASK_CONTROL, SUMT_WMASK_IRQ_MASK, SUMT_WMASK_STATUS, SUMT_WORD_READ, SUMT_WRAPF, _SUMT_RT_Poll::telem_counter, _SUMT_RT_Poll::telem_data, _SUMT_RT_Bus_Config::telem_msg_count, and telemPtr.

unsigned int SUMT_rtPollQuery ( SUMT_RT_Poll rt,
unsigned short *  subAddr,
void *  buf 
)

Query the polled mode remote terminal for any new 1553 bus events.

Checks the Summit RT descriptor table to see if any new 1553 bus activity has occurred since the last call. If a new telecommand receive packet is ready, the contents are copied to buf and subAddr is set to SUMT_RT_SUBADDR_CMD_RX. If a the last telemetry packet block has been sent, subAddr is set to SUMT_RT_SUBADDR_TELEM_END. If no new 1553 messages are ready, then the function returns CTDB_TIMEOUT.

Parameters:
rt A device descriptor.
subAddr Holds subaddress key if new 1553 activity.
buf Holds telecommand receive message (should be CO1553_MSG_SIZE bytes in size = 64 bytes).
Returns:
A CTDB MSG code.

References _SUMT_RT_Poll::check, _SUMT_RT_Poll::cmd_rx_data, _SUMT_RT_Poll::cmd_rx_desc, CO1553_MSG_WORDS, SUMT_DESC_CONTROL, SUMT_DMAF, SUMT_ILLCMD, SUMT_memCopyIn(), SUMT_MERR, SUMT_MSG, SUMT_REG_COMMAND, SUMT_REG_IRQ_MASK, SUMT_REG_IRQ_PEND, SUMT_REG_STATUS, _SUMT_RT_Poll::sumt_regs, SUMT_RT_CTRL_BAC, SUMT_RT_SUBADDR_CMD_RX, SUMT_RT_SUBADDR_TELEM_END, SUMT_WORD_READ, SUMT_WORD_WRITE, SUMT_WRAPF, and _SUMT_RT_Poll::telem_desc.

unsigned int SUMT_rtPollStart ( SUMT_RT_Poll rt  ) 

Start the remote terminal listening for 1553 bus commands.

Starts the remote terminal listening on the 1553 bus for commands from the bus controller.

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

References _SUMT_RT_Poll::base_addr, _SUMT_RT_Poll::check, _SUMT_RT_Poll::desc_blk, SUMT_addrLocalToChip(), SUMT_MSG, SUMT_REG_CONTROL, SUMT_REG_SRT_DP, SUMT_REG_WRITE, _SUMT_RT_Poll::sumt_regs, SUMT_STEX, SUMT_WMASK_CONTROL, SUMT_WMASK_SRT_DP, and SUMT_WORD_READ.

unsigned int SUMT_rtPollTelem ( SUMT_RT_Poll rt,
void *  buf,
const void *  pkt,
int  size 
)

Set the polled mode remote terminal telemetry output values.

Prepares a new telemetry packet block for transmission. The buf paramter should point to a buffer for formatting the GLAST telemetry block (GT_PDU). The driver constructs a telemetry block out of the one or more packets in a chain pointed to by pkt. The packet chain is size bytes in total length. The data telemetry data is copied to the Summit controller and will be sent on the next telemetry block read.

Parameters:
rt A device descriptor.
buf Holds telemetry packet block messages (should be CO1553_MSG_SIZE bytes # of telemetry messages).
pkt A point to the telemetry packet to send.
size The size in bytes of pkt.
Returns:
A CTDB MSG code.

References _SUMT_RT_Poll::check, CO1553_MSG_SIZE, CO1553_MSG_WORDS, SUMT_memCopyOut(), SUMT_MSG, _SUMT_RT_Poll::telem_counter, _SUMT_RT_Poll::telem_data, and _SUMT_RT_Poll::telem_msg_count.


Generated on Wed Nov 21 20:05:03 2012 by  doxygen 1.5.8