GUPPIBuffer.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2011 by Paul Demorest
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 #ifndef __GUPPIBuffer_h
10 #define __GUPPIBuffer_h
11 
12 #include "dsp/GUPPIBlockFile.h"
13 #include "guppi_databuf.h"
14 
15 namespace dsp {
16 
18  class GUPPIBuffer : public GUPPIBlockFile
19  {
20  public:
21 
23  GUPPIBuffer (const char* filename=0);
24 
26  ~GUPPIBuffer ();
27 
29  bool is_valid (const char* filename) const;
30 
31  protected:
32 
34  void open_file (const char* filename);
35 
37  void set_total_samples () { };
38 
40  int64_t seek_bytes (uint64_t bytes);
41 
43  int load_next_block ();
44 
46  int databuf_id;
47 
49  int curblock;
50 
52  struct guppi_databuf *databuf;
53 
55  bool got_stt_valid;
56 
57  };
58 
59 }
60 
61 #endif // !defined(__GUPPIBuffer_h)
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
int curblock
Current data block.
Definition: GUPPIBuffer.h:59
~GUPPIBuffer()
Destructor.
Definition: GUPPIBuffer.C:37
Loads BitSeries data from GUPPI data blocks.
Definition: GUPPIBlockFile.h:27
void open_file(const char *filename)
Open the file.
Definition: GUPPIBuffer.C:76
bool is_valid(const char *filename) const
Returns true if filename is a valid GUPPI buffer description.
Definition: GUPPIBuffer.C:43
GUPPIBuffer(const char *filename=0)
Construct and open file
Definition: GUPPIBuffer.C:28
int64_t seek_bytes(uint64_t bytes)
Seek to a location.
Definition: GUPPIBuffer.C:145
int load_next_block()
Load the next hdr/data block.
Definition: GUPPIBuffer.C:107
void set_total_samples()
Override file-base size setting.
Definition: GUPPIBuffer.h:47
int databuf_id
Databuf id number.
Definition: GUPPIBuffer.h:56
bool got_stt_valid
Has a valid start time been received.
Definition: GUPPIBuffer.h:65
struct guppi_databuf * databuf
databuf struct
Definition: GUPPIBuffer.h:62

Generated using doxygen 1.8.17