|
GNU Radio's GSM Package
|
#include <BitVector.h>
Public Types | |
| typedef char * | iterator |
| typedef const char * | const_iterator |
Public Member Functions | |
| void | zero () |
| void | invert () |
| unsigned | sum () const |
| void | map (const unsigned *map, size_t mapSize, BitVector &dest) const |
| void | unmap (const unsigned *map, size_t mapSize, BitVector &dest) const |
| void | pack (unsigned char *) const |
| void | pack2 (unsigned char *) const |
| std::string | packToString () const |
| void | unpack (const unsigned char *) |
| void | hex (std::ostream &) const |
| std::string | hexstr () const |
| bool | unhex (const char *) |
| void | dup (BitVector other) |
| void | dup (BitVector &other) |
| bool | operator== (const BitVector &other) const |
| void | copyPunctured (BitVector &dst, const unsigned *puncture, const size_t plth) |
| bool | bit (size_t index) const |
| char & | operator[] (size_t index) |
| const char & | operator[] (size_t index) const |
| void | settfb (size_t index, int value) |
Casts of Vector constructors. | |
| BitVector (VectorDataType wData, char *wStart, char *wEnd) | |
| BitVector (const BitVector &other) | |
| BitVector (size_t len) | |
| BitVector () | |
| BitVector (const BitVector &other1, const BitVector &other2) | |
| BitVector (const char *valString) | |
Casts and overrides of Vector operators. | |
| BitVector | segment (size_t start, size_t span) |
| const BitVector | cloneSegment (size_t start, size_t span) const |
| BitVector | alias () const |
| BitVector | head (size_t span) |
| BitVector | tail (size_t start) |
FEC operations. | |
| uint64_t | syndrome (Generator &gen) const |
| uint64_t | parity (Generator &gen) const |
Byte-wise operations. | |
| void | reverse8 () |
| void | LSB8MSB () |
Serialization and deserialization. | |
| uint64_t | peekField (size_t readIndex, unsigned length) const |
| uint64_t | peekFieldReversed (size_t readIndex, unsigned length) const |
| uint64_t | readField (size_t &readIndex, unsigned length) const |
| uint64_t | readFieldReversed (size_t &readIndex, unsigned length) const |
| void | fillField (size_t writeIndex, uint64_t value, unsigned length) |
| void | fillFieldReversed (size_t writeIndex, uint64_t value, unsigned length) |
| void | writeField (size_t &writeIndex, uint64_t value, unsigned length) |
| void | writeFieldReversed (size_t &writeIndex, uint64_t value, unsigned length) |
| void | write0 (size_t &writeIndex) |
| void | write1 (size_t &writeIndex) |
Public Member Functions inherited from VectorBase< char > | |
| size_t | size () const |
| size_t | bytes () const |
| void | resize (size_t newElements) |
| void | clear () |
| void | clone (const VectorBase< char > &other) |
| void | vConcat (const VectorBase< char > &other1, const VectorBase< char > &other2) |
| ~VectorBase () | |
| bool | isOwner () |
| std::string | inspect () const |
| void | copyToSegment (VectorBase< char > &other, size_t start, size_t span) const |
| void | copyToSegment (VectorBase< char > &other, size_t start=0) const |
| void | copyTo (VectorBase< char > &other) const |
| void | segmentCopyTo (VectorBase< char > &other, size_t start, size_t span) const |
| void | fill (const char &val) |
| void | fill (const char &val, unsigned start, unsigned length) |
| void | operator= (const VectorBase< char > &other) |
| char & | operator[] (size_t index) |
| const char & | operator[] (size_t index) const |
| const char * | begin () const |
| char * | begin () |
| const char * | end () const |
| char * | end () |
| const char * | getData () const |
Additional Inherited Members | |
Protected Types inherited from VectorBase< char > | |
| typedef char * | VectorDataType |
Protected Member Functions inherited from VectorBase< char > | |
| void | vInit (size_t elements) |
| void | shiftMem (VectorBase< char > &other) |
| void | makeAlias (const VectorBase< char > &other) |
| VectorBase () | |
| VectorBase (VectorDataType wData, char *wStart, char *wEnd) | |
Protected Attributes inherited from VectorBase< char > | |
| VectorDataType | mData |
| allocated data block. More... | |
| char * | mStart |
| start of useful data More... | |
| char * | mEnd |
| end of useful data + 1 More... | |
| typedef const char* BitVector::const_iterator |
| typedef char* BitVector::iterator |
|
inline |
|
inline |
References VECTORDEBUG.
|
inlineexplicit |
|
inline |
Build a BitVector by concatenation.
| BitVector::BitVector | ( | const char * | valString | ) |
Construct from a string of "0" and "1".
|
inline |
References Generator::size().
|
inline |
Index a single bit.
|
inline |
References VectorBase< T >::clone().
| void BitVector::copyPunctured | ( | BitVector & | dst, |
| const unsigned * | puncture, | ||
| const size_t | plth | ||
| ) |
Copy to dst, not including those indexed in puncture.
|
inline |
References VectorBase< T >::mStart.
|
inline |
References VectorBase< T >::mStart.
| void BitVector::fillField | ( | size_t | writeIndex, |
| uint64_t | value, | ||
| unsigned | length | ||
| ) |
| void BitVector::fillFieldReversed | ( | size_t | writeIndex, |
| uint64_t | value, | ||
| unsigned | length | ||
| ) |
|
inline |
| void BitVector::hex | ( | std::ostream & | ) | const |
Make a hexdump string.
| std::string BitVector::hexstr | ( | ) | const |
| void BitVector::invert | ( | ) |
Invert 0<->1.
| void BitVector::LSB8MSB | ( | ) |
Reverse groups of 8 within the vector (byte reversal).
| void BitVector::map | ( | const unsigned * | map, |
| size_t | mapSize, | ||
| BitVector & | dest | ||
| ) | const |
Reorder bits, dest[i] = this[map[i]].
| bool BitVector::operator== | ( | const BitVector & | other | ) | const |
|
inline |
|
inline |
| void BitVector::pack | ( | unsigned char * | ) | const |
Pack into a char array.
| void BitVector::pack2 | ( | unsigned char * | ) | const |
| std::string BitVector::packToString | ( | ) | const |
| uint64_t BitVector::parity | ( | Generator & | gen | ) | const |
Calculate the parity word for the vector with the given Generator.
| uint64_t BitVector::peekField | ( | size_t | readIndex, |
| unsigned | length | ||
| ) | const |
| uint64_t BitVector::peekFieldReversed | ( | size_t | readIndex, |
| unsigned | length | ||
| ) | const |
| uint64_t BitVector::readField | ( | size_t & | readIndex, |
| unsigned | length | ||
| ) | const |
| uint64_t BitVector::readFieldReversed | ( | size_t & | readIndex, |
| unsigned | length | ||
| ) | const |
| void BitVector::reverse8 | ( | ) |
Reverse an 8-bit vector.
|
inline |
|
inline |
Set a bit
| unsigned BitVector::sum | ( | ) | const |
Sum of bits.
| uint64_t BitVector::syndrome | ( | Generator & | gen | ) | const |
Calculate the syndrome of the vector with the given Generator.
|
inline |
References Generator::size().
| bool BitVector::unhex | ( | const char * | ) |
Unpack from a hexdump string.
| void BitVector::unmap | ( | const unsigned * | map, |
| size_t | mapSize, | ||
| BitVector & | dest | ||
| ) | const |
Reorder bits, dest[map[i]] = this[i].
| void BitVector::unpack | ( | const unsigned char * | ) |
Unpack from a char array.
|
inline |
|
inline |
| void BitVector::writeField | ( | size_t & | writeIndex, |
| uint64_t | value, | ||
| unsigned | length | ||
| ) |
| void BitVector::writeFieldReversed | ( | size_t & | writeIndex, |
| uint64_t | value, | ||
| unsigned | length | ||
| ) |
|
inline |