/* -*- c++ -*- */ /* * Copyright 2002 Free Software Foundation, Inc. * * This file is part of GNU Radio * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include "fsm.h" fsm::fsm() { d_I=0; d_S=0; d_O=0; d_NS.resize(0); d_OS.resize(0); d_PS.resize(0); d_PI.resize(0); } fsm::fsm(const fsm &FSM) { d_I=FSM.I(); d_S=FSM.S(); d_O=FSM.O(); d_NS=FSM.NS(); d_OS=FSM.OS(); d_PS=FSM.PS(); d_PI=FSM.PI(); } fsm::fsm(const int I, const int S, const int O, const std::vector &NS, const std::vector &OS) { d_I=I; d_S=S; d_O=O; d_NS=NS; d_OS=OS; d_PS.resize(d_I*d_S); d_PI.resize(d_I*d_S); // generate the PS, PI tables for later use for(int i=0;i