summaryrefslogtreecommitdiffstats
path: root/src/roof.h
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2020-09-03 03:00:30 +0200
committerSuren A. Chilingaryan <csa@suren.me>2020-09-03 03:00:30 +0200
commit5172421d248250b4ab3b69eb57fd83656e23a4da (patch)
treea499d9f1dd0b74b754816884a59927b3171656fc /src/roof.h
parent7b2e6168b049be9e7852b2d364d897592eff69fc (diff)
downloadufo-roof-temp-master.tar.gz
ufo-roof-temp-master.tar.bz2
ufo-roof-temp-master.tar.xz
ufo-roof-temp-master.zip
This is unfinished work implemeting out-of-UFO network serversHEADmaster
Diffstat (limited to 'src/roof.h')
-rw-r--r--src/roof.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/roof.h b/src/roof.h
new file mode 100644
index 0000000..316e8ed
--- /dev/null
+++ b/src/roof.h
@@ -0,0 +1,46 @@
+#ifndef __ROOF_H
+#define __ROOF_H
+
+typedef struct _Roof Roof;
+
+#include "roof-config.h"
+#include "roof-buffer.h"
+#include "roof-read.h"
+#include "roof-thread.h"
+
+struct _Roof {
+ RoofConfig *cfg; // Parsed ROOF parameters
+ RoofBuffer *buf; // Ring buffer for incomming UDP packet
+ RoofReadInterface **rdi; // Reader interface abstraction, one per socket (no threading)
+ RoofReadContext **rdc; // Reader context: common structures, one per socket (no threading)
+ RoofThread **rdt; // Threading context: multiple reader contexts per thread
+
+ guint n_threads; // Number of schedulled threads
+ HWSched sched; // OpenMP-style thread scheduler
+
+ gboolean simulate; // Indicates if we are running in network or simulation modes
+ gchar *path; // UFO file path for simulation mode
+ guint first_file_number; // Number of a first simulated file (0 or 1)
+
+ guint max_datasets; // Number of datasets to read
+
+// guint64 announced; // For debugging
+// guint64 generated; // Total number for control
+
+// struct timespec last_fragment_timestamp;
+
+};
+
+
+Roof *roof_new(RoofConfig *cfg, GError **error);
+void roof_free(Roof *ctx);
+
+void roof_configure_simulation(Roof *ctx, const gchar *path, guint first_file_number, GError **error);
+void roof_configure_stop_mode(Roof *ctx, const gulong max, GError **error);
+//void roof_configure_writer(Roof *ctx, ...);
+//void roof_configure_filter(Roof *ctx, ...);
+void roof_setup(Roof *ctx, GError **error);
+
+void roof_read(Roof *ctx, void *buffer, GError **error);
+
+#endif \ No newline at end of file