CODIFFile.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2017 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 #ifndef __CODIFFile_h
10 #define __CODIFFile_h
11 
12 #include "dsp/BlockFile.h"
13 
14 namespace dsp {
15 
17 
19  class CODIFFile : public BlockFile
20  {
21  public:
22 
24  CODIFFile (const char* filename=0, const char* headername=0);
25 
27  ~CODIFFile ();
28 
30  bool is_valid (const char* filename) const;
31 
32  protected:
33 
34  friend class CODIFUnpacker;
35 
37  void open_file (const char* filename);
38 
40  void reopen ();
41 
42  //int64_t seek_bytes (uint64_t bytes);
43 
44  void* stream;
45 
46  uint64_t reopen_seek;
47 
48  char datafile[256];
49 
50  };
51 
52 }
53 
54 #endif // !defined(__CODIFFile_h)
void open_file(const char *filename)
Open the file.
Definition: CODIFFile.C:114
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
Loads BitSeries data from a file organized in blocks.
Definition: BlockFile.h:25
void set_required(std::string key, bool required=true)
Set/unset a required keyword.
Definition: ASCIIObservation.C:53
void reopen()
Reopen the file.
Definition: CODIFFile.C:272
~CODIFFile()
Destructor.
Definition: CODIFFile.C:37
bool is_valid(const char *filename) const
Returns true if file starts with a valid CODIF packet header.
Definition: CODIFFile.C:41
CODIFFile(const char *filename=0, const char *headername=0)
Construct and open file
Definition: CODIFFile.C:30
void load(const char *header)
Read the ASCII header block.
Definition: ASCIIObservation.C:88
Parses Observation attributes from an ASCII header.
Definition: ASCIIObservation.h:29

Generated using doxygen 1.8.17