#include <trellis.h>
Inheritance diagram for simthlib::ConvCodeTrellis:
Public Types | |
enum | StartingMode { FREE, ZERO, AMBIGOUS } |
Public Member Functions | |
ConvCodeTrellis (int states, int inbits, int outbits, StartingMode startingMode) | |
virtual | ~ConvCodeTrellis () |
Destructor. | |
void | printStateDiagram (std::ostream &os) const |
virtual simth::BitSeq * | Encode (const simth::BitSeq &) const |
encodes a bit sequence | |
virtual void | Encode (const simth::BitSeq &bsin, simth::BitSeq *bsout) const |
Protected Member Functions | |
virtual int | getNextState (int state, int input, size_t step, size_t path_length) const |
virtual int | getNextOut (int state, int input, size_t step, size_t path_length) const |
virtual int | getPrevState (int state, int index, size_t step, size_t path_length) const |
virtual int | getPrevOut (int state, int index, size_t step, size_t path_length) const |
virtual int | getPrevIn (int state, int index, size_t step, size_t path_length) const |
virtual const Trellis::TrellisStatesArray & | getPrevTrellisArray (size_t time_step, size_t path_length) const |
ConvCodeTrellis::StartingMode | startingMode () const |
virtual bool | isPossibleStartingState (int state) const =0 |
virtual int | terminationInput (int state) const |
Protected Attributes | |
Trellis::TrellisStatesArray | forward |
branches of the code trellis (forward) | |
Trellis::TrellisStatesArray | back |
branches of the code trellis (back) | |
simth::Array< int > | terminationInput_ |
Trellis::TrellisStatesArray | terminationForward |
Trellis::TrellisStatesArray | terminationBack |
|
Starting mode of the trellis: ZERO should be used for a conventional convolutional code, AMBIGOUS should be used for a differential code. |
|
Constructor to build a trellis with the given number of states, input and output bits and the specified starting mode. The starting mode defines, which states are allowed starting states, e.g. ZERO means that each path starts from the all-zero-state.
|
|
Destructor.
|
|
|
|
encodes a bit sequence
|
|
Returns the coder output according to a given previous state and input for the given coding step. Implements simthlib::Trellis. |
|
Returns the next coder state according to a given previous state and input for the given coding step. The parameter step is required because of the corresponding virtual function in Trellis. However, the result is independent of step here. Implements simthlib::Trellis. |
|
Returns the previous coder input according to a given current state and number of the trellis branch leading to this state in the previous coding step. Implements simthlib::Trellis. |
|
Returns the previous coder output according to a given current state and number of the trellis branch leading to this state in the previous coding step. Implements simthlib::Trellis. |
|
Returns the previous coder state according to a given current state and number of the trellis branch leading to this state in the previous coding step. Implements simthlib::Trellis. |
|
Returns the argument to getPrevArray_state() according to the given time step and path length. Implements simthlib::Trellis. |
|
Returns true if the given state is a possible starting state. The result depends on the starting mode set by the constructor argument. Implements simthlib::Trellis. Implemented in simthlib::ConvCodeTrellisShiftRegister, and simthlib::ConvCodeTrellisExplicit. |
|
Reimplemented from simthlib::Trellis. |
|
|
|
Returns in order to a definite state of the trellis the termination input. If the recursive polynom is zero, the termination input is zero independend from the state of the trellis. Implements simthlib::Trellis. |
|
branches of the code trellis (back)
|
|
branches of the code trellis (forward)
|
|
|
|
|
|
|