GNU Radio 3.5.3.2 C++ API
|
Finite State Machine Specification class. More...
#include <fsm.h>
Public Member Functions | |
fsm () | |
Constructor to create an uninitialized FSMS. | |
fsm (const fsm &FSM) | |
Constructor to copy an FSMS. | |
fsm (int I, int S, int O, const std::vector< int > &NS, const std::vector< int > &OS) | |
Constructor to to create an FSMS. | |
fsm (const char *name) | |
Constructor to create an FSMS from file contents. | |
fsm (int k, int n, const std::vector< int > &G) | |
Creates an FSMS from the generator matrix of a (n, k) binary convolutional code. | |
fsm (int mod_size, int ch_length) | |
Creates an FSMS describing ISI. | |
fsm (int P, int M, int L) | |
Creates an FSMS describing the trellis for a CPM. | |
fsm (const fsm &FSM1, const fsm &FSM2) | |
Creates an FSMS describing the joint trellis of two FSMs. | |
fsm (const fsm &FSM, int n) | |
Creates an FSMS representing n stages through the originial FSM (AKA radix-n FSM). | |
int | I () const |
int | S () const |
int | O () const |
const std::vector< int > & | NS () const |
const std::vector< int > & | OS () const |
const std::vector< std::vector < int > > & | PS () const |
const std::vector< std::vector < int > > & | PI () const |
const std::vector< int > & | TMi () const |
const std::vector< int > & | TMl () const |
void | write_trellis_svg (std::string filename, int number_stages) |
Creates an svg image of the trellis representation. | |
void | write_fsm_txt (std::string filename) |
Write the FSMS to a file. |
Finite State Machine Specification class.
An instance of this class represents a finite state machine specification (FSMS) rather than the FSM itself. It particular the state of the FSM is not stored within an instance of this class.
fsm::fsm | ( | ) |
Constructor to create an uninitialized FSMS.
fsm::fsm | ( | const fsm & | FSM | ) |
Constructor to copy an FSMS.
fsm::fsm | ( | int | I, |
int | S, | ||
int | O, | ||
const std::vector< int > & | NS, | ||
const std::vector< int > & | OS | ||
) |
Constructor to to create an FSMS.
I | The number of possible input symbols. |
S | The number of possible FSM states. |
O | The number of possible output symbols. |
NS | A mapping from (current state, input symbol) to next state. next_state = NS[current_state * I + input_symbol] |
OS | A mapping from (current state, input symbol) to output symbol. output_symbol = OS[current_state * I + input_symbol] |
fsm::fsm | ( | const char * | name | ) |
Constructor to create an FSMS from file contents.
name | filename |
fsm::fsm | ( | int | k, |
int | n, | ||
const std::vector< int > & | G | ||
) |
Creates an FSMS from the generator matrix of a (n, k) binary convolutional code.
k | ??? |
n | ??? |
G | ??? |
fsm::fsm | ( | int | mod_size, |
int | ch_length | ||
) |
Creates an FSMS describing ISI.
mod_size | modulation size |
ch_length | channel length |
fsm::fsm | ( | int | P, |
int | M, | ||
int | L | ||
) |
Creates an FSMS describing the trellis for a CPM.
P | ???? h=K/P (relatively prime) |
M | alphabet size |
L | pulse duration |
This FSM is based on the paper by B. Rimoldi "A decomposition approach to CPM", IEEE Trans. Info Theory, March 1988 See also my own notes at http://www.eecs.umich.edu/~anastas/docs/cpm.pdf
Creates an FSMS describing the joint trellis of two FSMs.
FSM1 | first FSMS |
FSM2 | second FSMS |
fsm::fsm | ( | const fsm & | FSM, |
int | n | ||
) |
Creates an FSMS representing n stages through the originial FSM (AKA radix-n FSM).
FSM | Original FSMs |
n | Number of stages. |
int fsm::I | ( | ) | const [inline] |
const std::vector<int>& fsm::NS | ( | ) | const [inline] |
int fsm::O | ( | ) | const [inline] |
const std::vector<int>& fsm::OS | ( | ) | const [inline] |
const std::vector< std::vector<int> >& fsm::PI | ( | ) | const [inline] |
const std::vector< std::vector<int> >& fsm::PS | ( | ) | const [inline] |
int fsm::S | ( | ) | const [inline] |
const std::vector<int>& fsm::TMi | ( | ) | const [inline] |
const std::vector<int>& fsm::TMl | ( | ) | const [inline] |
void fsm::write_fsm_txt | ( | std::string | filename | ) |
Write the FSMS to a file.
filename | filename |
void fsm::write_trellis_svg | ( | std::string | filename, |
int | number_stages | ||
) |
Creates an svg image of the trellis representation.
filename | filename |
number_stages | ???? |