/******************************************************************************* * Gen.h TMS State Table Generator * T.Barnaby, BEAM Ltd, 2007-03-15 ******************************************************************************* */ #ifndef Gen_h #define Gen_h 1 #include <BError.h> #include <BFile.h> #include <BNameValue.h> #include <SigGen.h> #include <TmsLib.h> typedef BNameValue<BString> NameValue; class NameValueList : public BNameValueList<BString> { public: BString getValue(BString name); void setValue(BString name, BString value); }; class Gen { public: Gen(BString name); virtual ~Gen(); virtual BString name(); virtual BString info(); virtual BError init(NameValueList& params); virtual void close(); virtual BError run(); virtual BError output(); protected: void outputPhaseDelay(); void outputState(int num, Tms::TmsState state, int lo0, int bunchSet0, int lo1, int bunchSet1, int capture); BString oname; BString oinfo; NameValueList oparams; NameValueList ooutput; BFile ofile; BString ofileName; double osampleRate; double ofref; int ophaseTableFile; int ouseMsbFref; int opllInitialFrequencyDelay; }; class GenBeam1 : public Gen { public: GenBeam1(); BError run(); }; class GenBeam2 : public Gen { public: GenBeam2(); BError run(); }; class GenBeam3 : public Gen { public: GenBeam3(); BError run(); }; BList<Gen*>& genInit(); #endif