aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetIOStreamedHDF5/src/CarpetIOStreamedHDF5.hh
blob: 9f8038e2bd4ce9f652c52067d2e64619d26557a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef CARPETIOSTREAMEDHDF5_HH
#define CARPETIOSTREAMEDHDF5_HH

#include "CarpetIOHDF5.hh"
#include "SocketUtils.h"


// CarpetIOStreamed GH extension structure
typedef struct
{
  // port for clients to connect to
  unsigned int port;

  // socket to stream data over a TCP connection
  SOCKET socket;

  // default number of times to output
  int out_every_default;

  // the last iteration output for each variable
  vector<int> out_last;

  // list of variables to output
  char *out_vars;

  // stop on I/O parameter parsing errors ?
  int stop_on_parse_errors;

  // I/O request description list (for all variables)
  vector<ioRequest*> requests;

} CarpetIOStreamedHDF5GH;


namespace CarpetIOStreamedHDF5
{ 
  // scheduled routines (must be declared as C according to schedule.ccl)
  extern "C" {

    void CarpetIOStreamedHDF5_Startup (void);
    void CarpetIOStreamedHDF5_Init (const cGH* const);
    void CarpetIOStreamedHDF5_Terminate (const cGH* const);

  } // extern "C"

} // namespace CarpetIOStreamedHDF5

#endif // !defined(CARPETIOSTREAMEDHDF5_HH)