GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LEM / dev > lem / rhel5-32


Interface   Data Structures   File List   Data Fields   Globals  

decode.ih File Reference

Loe-level routines for unpacking the payload of a result item. More...

#include <PBS/PARITY.ih>

Functions

static void decode_ul (const unsigned short *pkt, unsigned short nWords, unsigned *value)
 Unpack the result of a 32-bit register read.
static void decode_cal (const unsigned short *pkt, CAL_rsp *rsp)
 Unpack the result of a CAL register read.
static void decode_tkr (const unsigned short *pkt, TKR_rsp *rsp)
 Unpack the result of a TKR register read.
static void decode_acd (const unsigned short *pkt, ACD_rsp *rsp)
 Unpack the result of an ACD register read.


Detailed Description

Loe-level routines for unpacking the payload of a result item.

Author:
James Swain & Owen Saxton
$Id: decode.ih,v 1.22 2011/03/25 18:51:53 apw Exp $

Function Documentation

void decode_acd ( const unsigned short *  pkt,
ACD_rsp rsp 
) [static]

Unpack the result of an ACD register read.

Format of GARC response in 16-bit chunks

-------------------------------- 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 -------------------------------- 0000 (0000) A B C C C C C D E F F F F G H H 0001 (0000) H H H H H H H H H H H H H H I J

where,

A - 1 bit. Start bit B - 1 bit. Copy of write command field (0 for GARC, 1 for GAFE). C - 5 bits. Copy of write command field (GARC func block, or GAFE address). D - 1 bit. Read/Write bit. Always 1 for read. E - 1 bit. Data/Dataless, always 1. F - 4 bits. Copy of write command field (GARC func code or GAFE register). G - 1 bit. Odd parity over previous 12 bits. H - 16 bits. Data payload, MSB first. I - 1 bit. Summary error detected. J - 1 bit. Odd parity over previous 17 bits.

Parameters:
pkt Pointer to response payload data
rsp Pointer to memory to hold off board GARC/GAFE response data

References ACD_rsp::bf, and ACD_rsp::ui.

Referenced by AFE_decode(), and ARC_decode().

void decode_cal ( const unsigned short *  pkt,
CAL_rsp rsp 
) [static]

Unpack the result of a CAL register read.

Parameters:
pkt Pointer to result item payload
rsp Pointer to memory to hold decoded payload

References CAL_rsp::bf, and CAL_rsp::ui.

Referenced by CFE_decode(), and CRC_decode().

void decode_tkr ( const unsigned short *  pkt,
TKR_rsp rsp 
) [static]

Unpack the result of a TKR register read.

Format of off-board tracker response in 16-bit chunks

-------------------------------- 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 -------------------------------- 0000 (0000) A A A A A A A A A A A A A A A A 0001 (0000) 1 D D D D D D D D D D D D D D D 0002 (0000) D 1 D D D D D D D D D D D D D D 0003 (0000) D D 1 D D D D D D D D D D D D D 0004 (0000) D D D 1 D D D D D D D D D D D D 0005 (0000) D D D D E P [<---- MBZ ------>]

meaning ------------------------------- A -- access descriptor, 16 bits D -- response data, 64 bits with a "1" preceeding each 16-bit chunk E -- error summary, 1 bit P -- parity, 1 bit

Parameters:
pkt Pointer to response payload data
rsp Pointer to structure holding TKR 64-bit response data and TKR response flags

References TKR_flags::bf, TKR_rsp::flags, TKR_flags::us, and TKR_rsp::value.

Referenced by TDC_decode(), TFE_decode(), and TRC_decode().

void decode_ul ( const unsigned short *  pkt,
unsigned short  nWords,
unsigned *  value 
) [static]

Unpack the result of a 32-bit register read.

Parameters:
pkt Payload from a result item
nWords Number of 32-bit words in the response
value Pointer to location to copy repsonse to

Referenced by AEM_decode(), CCC_decode(), CRU_decode(), EBM_decode(), GEM_decode(), PDU_decode(), PDU_ENV_decode(), TCC_decode(), TEM_decode(), and TIC_decode().


Generated on Fri Mar 25 11:57:19 2011 by  doxygen 1.5.8