Mark5bFile.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2016 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 #ifndef __Mark5bFile_h
10 #define __Mark5bFile_h
11 
12 #include "dsp/BlockFile.h"
13 
14 namespace dsp {
15 
17  class Mark5bFile : public BlockFile
18  {
19  public:
20 
22  Mark5bFile (const char* filename=0, const char* headername=0);
23 
25  ~Mark5bFile ();
26 
28  bool is_valid (const char* filename) const;
29 
30  protected:
31 
32  friend class Mark5bUnpacker;
33  friend class Mark5bTwoBitCorrection;
34 
36  void open_file (const char* filename);
37 
39  void reopen ();
40 
41  int64_t load_bytes (unsigned char* buffer, uint64_t nbytes);
42 
43  int64_t seek_bytes (uint64_t bytes);
44 
45  void* stream;
46 
47  uint64_t reopen_seek;
48 
49  };
50 
51 }
52 
53 #endif // !defined(__Mark5bFile_h)
unsigned resolution
Time sample resolution of the data source.
Definition: Input.h:178
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
Interface to Walter Brisken's upacker for Mark5b VLBA/Mark4 files.
Definition: Mark5bUnpacker.h:22
Mark5bFile(const char *filename=0, const char *headername=0)
Construct and open file
Definition: Mark5bFile.C:22
Loads BitSeries data from a file organized in blocks.
Definition: BlockFile.h:25
int64_t load_bytes(unsigned char *buffer, uint64_t nbytes)
Load nbyte bytes of sampled data from the device into buffer.
Definition: Mark5bFile.C:264
~Mark5bFile()
Destructor.
Definition: Mark5bFile.C:28
void open_file(const char *filename)
Open the file.
Definition: Mark5bFile.C:57
bool is_valid(const char *filename) const
Returns true if filename is a valid Mk5 file.
Definition: Mark5bFile.C:33
void reopen()
Reopen the file.
Definition: Mark5bFile.C:285
int64_t seek_bytes(uint64_t bytes)
Set the file pointer to the absolute number of sampled data bytes.
Definition: Mark5bFile.C:273

Generated using doxygen 1.8.17