GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LDT / V0-4-0

Constituent: encdec     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

BWU.h File Reference

Bit Word interface definitions, unpacking specific routines. More...

#include "LDT/BW.h"

Include dependency graph for BWU.h:

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


Functions

unsigned int BWU_expand (unsigned int wrd, unsigned int msk)
 Expands wrd according to the bits set in msk. This is the inverse operation of BWP_collapse.
unsigned int BWU_revert (unsigned int wrd, unsigned int nwrd, unsigned int nexp)
 Reverts wrd to the original integer. This is the inverse operation of BWP_convert.

Detailed Description

Bit Word interface definitions, unpacking specific routines.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: BWU.h,v 1.1 2006/09/13 17:09:08 russell Exp $

Function Documentation

unsigned int BWU_expand ( unsigned int  msk,
unsigned int  wrd 
)

Expands wrd according to the bits set in msk. This is the inverse operation of BWP_collapse.

Returns:
The expanded word
Parameters:
wrd The mask to control the expansion
msk The word to expand
For each cleared bit encountered in msk, a 0 is placed into the equivalent bit position in the output word. For each set bit in msk, the value of the next available bit is pulled from the top of wrd and inserted into the equivalent bit position in the output word. Here equivalent bit position means the same bit position as in msk.

Example

        msk = 0x001101110;
        wrd = 0x1011;

    Expand wrd where the 0's in msk are
        out = 0x001001100;

    If one collapsed out
        msk = 0x001101110;
        out = 0x001001100;
        wrd = 1011;

unsigned int BWU_revert ( unsigned int  wrd,
unsigned int  nwrd,
unsigned int  nexp 
)

Reverts wrd to the original integer. This is the inverse operation of BWP_convert.

Returns:
The revert word
Parameters:
wrd The word to expand
nwrd The bit field width of the expanded word
nexp The number of bits in the exponent.


Generated on Fri Jun 19 01:48:09 2009 by  doxygen 1.5.3