Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

SPUC::max_pn Class Reference
[Miscellaneous functions]

Maximal Length Pseudorandom sequence generator. More...

#include <max_pn.h>

List of all members.

Public Member Functions

 max_pn (int g=0x006d, int len=63, int init=-1)
 Constructor.
void reset ()
 Reset.
signed char out ()
 Get output (fast method).
bool get_bit ()
 Fast method.
signed char out1 ()
 Get output (alternative method).
int state ()

Protected Attributes

int lenp1
int gen
int u


Detailed Description

Maximal Length Pseudorandom sequence generator.

: Simple implementation of a maximal length pseudorandom sequence used for spread spectrum PN generation, BER testing etc. G is the generator Len is the PN length (must be 2^N - 1) Init is an initialization seed Two methods supported out : exclusive or (XOR) shift register with Generator out1 : feedback with XOR reduction Note: G, LEN must be correct (need to get from book).


Constructor & Destructor Documentation

SPUC::max_pn::max_pn int  g = 0x006d,
int  len = 63,
int  init = -1
[inline]
 

Constructor.


Member Function Documentation

bool SPUC::max_pn::get_bit  ) 
 

Fast method.

signed char SPUC::max_pn::out  ) 
 

Get output (fast method).

signed char SPUC::max_pn::out1  ) 
 

Get output (alternative method).

returns {0,1} instead of {-1,1}

void SPUC::max_pn::reset void   )  [inline]
 

Reset.

int SPUC::max_pn::state  )  [inline]
 


Member Data Documentation

int SPUC::max_pn::gen [protected]
 

int SPUC::max_pn::lenp1 [protected]
 

int SPUC::max_pn::u [protected]
 


The documentation for this class was generated from the following files:
Generated on Fri Sep 16 11:09:05 2005 for spuc by  doxygen 1.4.4