Classes/dsp/DummyFile.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2010 by Paul Demorest
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 #ifndef __DummyFile_h
10 #define __DummyFile_h
11 
12 #include "dsp/BlockFile.h"
13 
14 namespace dsp {
15 
17  class DummyFile : public File
18  {
19  public:
20 
22  DummyFile (const char* filename=0, const char* headername=0);
23 
25  ~DummyFile ();
26 
28  bool is_valid (const char* filename) const;
29 
30  protected:
31 
33  void open_file (const char* filename);
34 
36  void close();
37 
39  int64_t load_bytes (unsigned char *buffer, uint64_t bytes);
40 
42  int64_t seek_bytes(uint64_t bytes);
43 
44  void set_total_samples();
45  };
46 }
47 
48 #endif // !defined(__DummyFile_h)
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
uint64_t max_bytes
Number of bytes to stop after.
Definition: Formats/dummy/dsp/DummyFile.h:72
Loads BitSeries data from file.
Definition: File.h:38
void close()
close
Definition: Classes/DummyFile.C:78
~DummyFile()
Destructor.
Definition: Classes/DummyFile.C:26
int64_t load_bytes(unsigned char *buffer, uint64_t bytes)
load bytes
Definition: Classes/DummyFile.C:82
void open_file(const char *filename)
Open the file.
Definition: Classes/DummyFile.C:52
bool is_valid(const char *filename) const
Returns true if filename is a valid Mk5 file.
Definition: Classes/DummyFile.C:30
int64_t seek_bytes(uint64_t bytes)
seek bytes
Definition: Classes/DummyFile.C:90
void set_total_samples()
Calculates the total number of samples in the file, based on its size.
Definition: Classes/DummyFile.C:97
Parses Observation attributes from an ASCII header.
Definition: ASCIIObservation.h:29
DummyFile(const char *filename=0, const char *headername=0)
Construct and open file
Definition: Classes/DummyFile.C:21

Generated using doxygen 1.8.17