LOFAR_DALFile.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2005 by Haydon Knight
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 #ifndef __LOFAR_DALFile_h
10 #define __LOFAR_DALFile_h
11 
12 #include "dsp/File.h"
13 
14 namespace dsp {
15 
17  class LOFAR_DALFile : public File
18  {
19  public:
20 
22  LOFAR_DALFile (const char* project_id=0);
23 
25  ~LOFAR_DALFile ();
26 
28  bool is_valid (const char* filename) const;
29 
30  protected:
31 
32  void open_file (const char* filename);
33 
34  void close ();
35  void rewind ();
36  int64_t load_bytes (unsigned char* buffer, uint64_t bytes);
37  int64_t seek_bytes (uint64_t bytes);
38 
39  class Handle;
40  Handle* handle;
41 
42  };
43 
44 }
45 
46 #endif // !defined(__LOFAR_DALFile_h)
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
~LOFAR_DALFile()
Destructor.
Definition: LOFAR_DALFile.C:33
void open_file(const char *filename)
Open the file specified by filename for reading.
Definition: LOFAR_DALFile.C:55
Loads BitSeries data from file.
Definition: File.h:38
bool is_valid(const char *filename) const
Returns true if filename is a valid LOFAR beam-formed file.
Definition: LOFAR_DALFile.C:38
void rewind()
Rewind to the start of the data.
Definition: LOFAR_DALFile.C:467
void close()
Close the file.
Definition: LOFAR_DALFile.C:461
int64_t seek_bytes(uint64_t bytes)
Adjust the shared memory pointer.
Definition: LOFAR_DALFile.C:506
LOFAR_DALFile(const char *project_id=0)
Construct and open file
Definition: LOFAR_DALFile.C:28
int64_t load_bytes(unsigned char *buffer, uint64_t bytes)
Load bytes from shared memory.
Definition: LOFAR_DALFile.C:480

Generated using doxygen 1.8.17