GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LDT / dev > test_convert / linux-gcc
#include <LDT/BW.h>
#include <LDT/BWP.h>
Functions | |
static __inline unsigned int | BFP__maskL (int width) |
Produce a left justified mask of the specified width. | |
static __inline unsigned int | BFP__maskR (int width) |
Produce a right justified mask of the specified width. | |
static __inline unsigned int | BFP__wordL (unsigned int *w, unsigned int position, unsigned int field, unsigned int width) |
Packs a left justified bit field into the current position. The width of the bit field must be less than or equal to 32 bits. | |
static __inline unsigned int | BFP__wordR (unsigned int *w, unsigned int position, unsigned int field, unsigned int width) |
Packs a right justified bit field into the current position. The width of the bit field must be less than or equal to 32 bits. | |
static __inline unsigned int | BFP__wordB (unsigned int *w, unsigned int position, unsigned int bit) |
Packs the value of the bit into the current bit position. The value of the bit is either 0 or 1, or said in a negative fashion, it is not the left justified version, i.e. 0x80000000 or 0. | |
static __inline unsigned int | BFP__wordLP (unsigned int *w, unsigned int position, unsigned int field, unsigned int width) |
Packs a left justified bit field into the current position limiting the field to the specified width. The width of the bit field must be less than or equal to 32 bits. | |
static __inline unsigned int | BFP__wordRP (unsigned int *w, unsigned int position, unsigned int field, unsigned int width) |
Packs a right justified bit field into the current position limiting the field to the specified width. The width of the bit field must be less than or equal to 32 bits. | |
static __inline unsigned int | BFP__wordOrL (unsigned int *w, unsigned int position, unsigned int field, unsigned int width) |
Packs a left justified bit field into the current position. The width of the bit field must be less than or equal to 32 bits. This word is OR'ed into the current stream. | |
static __inline unsigned int | BFP__wordOrR (unsigned int *w, unsigned int position, unsigned int field, unsigned int width) |
Packs a right justified bit field into the current position. The width of the bit field must be less than or equal to 32 bits This word is OR'd into the current stream. | |
static __inline unsigned int | BFP__wordOrB (unsigned int *w, unsigned int position, unsigned int bit) |
Packs the value of the bit into the current bit position. The value of the bit is either 0 or 1, or said in a negative fashion, it is not the left justified version, i.e. 0x80000000 or 0. | |
static __inline unsigned int | BFP__collapse (unsigned int *w, unsigned int position, unsigned int wrd, unsigned int msk) |
Convenience routine to first collapse wrd, keeping only those bits set in wrd, then pack the collapsed word into w starting at bit position. | |
static __inline unsigned int | BFP__copyW (unsigned int *w, unsigned int position, const unsigned int *wrds, int nwrds) |
Copies the specified array of 32-bit words into the output bit array. | |
static __inline unsigned int | BFP__convert (unsigned int *w, unsigned int position, unsigned int val, unsigned int nval, unsigned int nexp) |
Convenience routine to pack small integers that are embedded in a larger field. | |
static __inline unsigned int | BFP__word0N (unsigned int *w, unsigned int position, unsigned int cnt) |
Packs cnt consecutive 0's. | |
static __inline unsigned int | BFP__word1N (unsigned int *w, unsigned int position, unsigned int cnt) |
Packs cnt consecutive 1's. | |
static __inline unsigned int | BFP__pack1s (unsigned int *w, unsigned int position, unsigned int cnt) |
Packs cnt consecutive 1's terminated by a 0. |
static __inline unsigned int BFP__collapse | ( | unsigned int * | w, | |
unsigned int | position, | |||
unsigned int | wrd, | |||
unsigned int | msk | |||
) | [static] |
Convenience routine to first collapse wrd, keeping only those bits set in wrd, then pack the collapsed word into w starting at bit position.
w | The output word | |
position | The current bit position | |
wrd | The target word | |
msk | The selection mask |
References BFP__wordL(), _BW_vector::bits, and _BW_vector::nbits.
static __inline unsigned int BFP__convert | ( | unsigned int * | w, | |
unsigned int | position, | |||
unsigned int | val, | |||
unsigned int | nval, | |||
unsigned int | nexp | |||
) | [static] |
Convenience routine to pack small integers that are embedded in a larger field.
w | The output word | |
position | The current bit position | |
val | The interger value to be encoded | |
nval | The bit field width of val | |
nexp | The number of bits to devote to the exponent encoding |
References BFP__wordR(), _BW_vector::bits, and _BW_vector::nbits.
static __inline unsigned int BFP__copyW | ( | unsigned int * | w, | |
unsigned int | position, | |||
const unsigned int * | wrds, | |||
int | nwrds | |||
) | [static] |
Copies the specified array of 32-bit words into the output bit array.
w | The output word | |
position | The current bit position | |
wrds | The array of 32-bit words to copy | |
nwrds | The number of 32-bit words to copy |
static __inline unsigned int BFP__maskL | ( | int | width | ) | [static] |
Produce a left justified mask of the specified width.
width | The width of the mask |
Referenced by BFP__wordLP(), and BFP__wordRP().
static __inline unsigned int BFP__maskR | ( | int | width | ) | [static] |
Produce a right justified mask of the specified width.
width | The width of the mask, must be between 0 and 31. |
static __inline unsigned int BFP__pack1s | ( | unsigned int * | w, | |
unsigned int | position, | |||
unsigned int | cnt | |||
) | [static] |
Packs cnt consecutive 1's terminated by a 0.
__inline unsigned int BFP__pack1s (unsigned int *w, unsigned int position, unsigned int cnt)
w | The output word | |
position | The current bit position | |
cnt | The number of 1s to pack |
References BFP__wordL().
static __inline unsigned int BFP__word0N | ( | unsigned int * | w, | |
unsigned int | position, | |||
unsigned int | cnt | |||
) | [static] |
Packs cnt consecutive 0's.
w | The output word | |
position | The current bit position | |
cnt | The number of 0s to pack, must be > 0. |
static __inline unsigned int BFP__word1N | ( | unsigned int * | w, | |
unsigned int | position, | |||
unsigned int | cnt | |||
) | [static] |
Packs cnt consecutive 1's.
__inline unsigned int BFP_word1N (unsigned int *w, unsigned int position, unsigned int cnt)
w | The output word | |
position | The current bit position | |
cnt | The number of 1s to pack, must be > 0 |
References BFP__wordL().
static __inline unsigned int BFP__wordB | ( | unsigned int * | w, | |
unsigned int | position, | |||
unsigned int | bit | |||
) | [static] |
Packs the value of the bit into the current bit position. The value of the bit is either 0 or 1, or said in a negative fashion, it is not the left justified version, i.e. 0x80000000 or 0.
w | The output word | |
position | The current bit position | |
bit | The value of the bit to insert (0 or 1) |
static __inline unsigned int BFP__wordL | ( | unsigned int * | w, | |
unsigned int | position, | |||
unsigned int | field, | |||
unsigned int | width | |||
) | [static] |
Packs a left justified bit field into the current position. The width of the bit field must be less than or equal to 32 bits.
w | The output word array to insert the bit field into | |
position | The current bit position in the output bit field | |
field | The left justified field to insert | |
width | The width of the field to insert |
Referenced by BFP__collapse(), BFP__pack1s(), BFP__word1N(), BFP__wordLP(), BFP__wordR(), and BFP__wordRP().
static __inline unsigned int BFP__wordLP | ( | unsigned int * | w, | |
unsigned int | position, | |||
unsigned int | field, | |||
unsigned int | width | |||
) | [static] |
Packs a left justified bit field into the current position limiting the field to the specified width. The width of the bit field must be less than or equal to 32 bits.
w | The output word array to insert the bit field into | |
position | The current bit position in the output bit field | |
field | The left justified field to insert | |
width | The width of the field to insert |
References BFP__maskL(), and BFP__wordL().
static __inline unsigned int BFP__wordOrB | ( | unsigned int * | w, | |
unsigned int | position, | |||
unsigned int | bit | |||
) | [static] |
Packs the value of the bit into the current bit position. The value of the bit is either 0 or 1, or said in a negative fashion, it is not the left justified version, i.e. 0x80000000 or 0.
w | The output word | |
position | The current bit position | |
bit | The value of the bit to insert (0 or 1) |
static __inline unsigned int BFP__wordOrL | ( | unsigned int * | w, | |
unsigned int | position, | |||
unsigned int | field, | |||
unsigned int | width | |||
) | [static] |
Packs a left justified bit field into the current position. The width of the bit field must be less than or equal to 32 bits. This word is OR'ed into the current stream.
w | The output word array to insert the bit field into | |
position | The current bit position in the output bit field | |
field | The left justified field to insert | |
width | The width of the field to insert |
Referenced by BFP__wordOrR().
static __inline unsigned int BFP__wordOrR | ( | unsigned int * | w, | |
unsigned int | position, | |||
unsigned int | field, | |||
unsigned int | width | |||
) | [static] |
Packs a right justified bit field into the current position. The width of the bit field must be less than or equal to 32 bits This word is OR'd into the current stream.
w | The output word array to insert the bit field into | |
position | The current bit position in the output bit field | |
field | The left justified field to insert | |
width | The width of the field to insert |
References BFP__wordOrL().
static __inline unsigned int BFP__wordR | ( | unsigned int * | w, | |
unsigned int | position, | |||
unsigned int | field, | |||
unsigned int | width | |||
) | [static] |
Packs a right justified bit field into the current position. The width of the bit field must be less than or equal to 32 bits.
w | The output word array to insert the bit field into | |
position | The current bit position in the output bit field | |
field | The left justified field to insert | |
width | The width of the field to insert |
References BFP__wordL().
Referenced by BFP__convert().
static __inline unsigned int BFP__wordRP | ( | unsigned int * | w, | |
unsigned int | position, | |||
unsigned int | field, | |||
unsigned int | width | |||
) | [static] |
Packs a right justified bit field into the current position limiting the field to the specified width. The width of the bit field must be less than or equal to 32 bits.
w | The output word array to insert the bit field into | |
position | The current bit position in the output bit field | |
field | The right justified field to insert | |
width | The width of the field to insert |
References BFP__maskL(), and BFP__wordL().