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

Constituent: encdec     Tag: sun-gcc


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 Thu Sep 14 09:19:07 2006 by  doxygen 1.4.4