Mercurial > hg > aimc
comparison trunk/src/Modules/Output/FileOutputAIMC.h @ 614:b5dca605c3d5
Add option to dump strobes
author | tomwalters@google.com |
---|---|
date | Tue, 07 May 2013 14:24:33 +0000 |
parents | 99f9bf0f7798 |
children |
comparison
equal
deleted
inserted
replaced
613:c14c83f3d5d6 | 614:b5dca605c3d5 |
---|---|
38 public: | 38 public: |
39 /*! \brief Create a new file output for an AIMC format file. | 39 /*! \brief Create a new file output for an AIMC format file. |
40 */ | 40 */ |
41 explicit FileOutputAIMC(Parameters *pParam); | 41 explicit FileOutputAIMC(Parameters *pParam); |
42 ~FileOutputAIMC(); | 42 ~FileOutputAIMC(); |
43 | 43 virtual void Process(const SignalBank &input); |
44 /*! \brief Initialize the output to AIMC. | 44 private: |
45 /*! \brief Initialize the output to AIMC. | |
45 * \param *filename Filename of the ouptut file to be created. | 46 * \param *filename Filename of the ouptut file to be created. |
46 * If the file exists it will be overwritten | 47 * If the file exists it will be overwritten |
47 * \return Returns true on success of initialization. | 48 * \return Returns true on success of initialization. |
48 */ | 49 */ |
49 bool OpenFile(string &filename); | 50 bool OpenFile(string &filename); |
50 bool CloseFile(); | 51 bool CloseFile(); |
51 virtual void Process(const SignalBank &input); | 52 bool OpenStrobesFile(string &filename); |
52 private: | 53 bool CloseStrobesFile(); |
54 | |
53 virtual bool InitializeInternal(const SignalBank &input); | 55 virtual bool InitializeInternal(const SignalBank &input); |
54 virtual void ResetInternal(); | 56 virtual void ResetInternal(); |
55 | 57 |
56 void WriteHeader(); | 58 void WriteHeader(); |
57 | 59 |
60 bool header_written_; | 62 bool header_written_; |
61 | 63 |
62 /*! \brief Internal pointer to the output file | 64 /*! \brief Internal pointer to the output file |
63 */ | 65 */ |
64 FILE *file_handle_; | 66 FILE *file_handle_; |
67 FILE *strobes_file_handle_; | |
65 | 68 |
66 /*! \brief Count of the number of samples in the file, written on close | 69 /*! \brief Count of the number of samples in the file, written on close |
67 */ | 70 */ |
68 int frame_count_; | 71 int frame_count_; |
69 | 72 |
70 int channel_count_; | 73 int channel_count_; |
71 int buffer_length_; | 74 int buffer_length_; |
72 float sample_rate_; | 75 float sample_rate_; |
73 float frame_period_ms_; | 76 float frame_period_ms_; |
74 string file_suffix_; | 77 string file_suffix_; |
78 bool dump_strobes_; | |
79 string strobes_file_suffix_; | |
75 }; | 80 }; |
76 } // namespace aimc | 81 } // namespace aimc |
77 | 82 |
78 #endif // AIMC_MODULES_OUTPUT_AIMC_H_ | 83 #endif // AIMC_MODULES_OUTPUT_AIMC_H_ |
79 | 84 |