diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2019-11-17 09:16:57 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2019-11-17 09:16:57 +0100 |
commit | 3d93df54d024f49895db6277e873dccd10b5baec (patch) | |
tree | c664797c69e4b4680d04aee7669da03e452e0c5d /src/ufo-roof-config.h | |
download | ufo-roof-3d93df54d024f49895db6277e873dccd10b5baec.tar.gz ufo-roof-3d93df54d024f49895db6277e873dccd10b5baec.tar.bz2 ufo-roof-3d93df54d024f49895db6277e873dccd10b5baec.tar.xz ufo-roof-3d93df54d024f49895db6277e873dccd10b5baec.zip |
The first test (file file-base simmulation)
Diffstat (limited to 'src/ufo-roof-config.h')
-rw-r--r-- | src/ufo-roof-config.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/ufo-roof-config.h b/src/ufo-roof-config.h new file mode 100644 index 0000000..a22c84f --- /dev/null +++ b/src/ufo-roof-config.h @@ -0,0 +1,37 @@ +#ifndef __UFO_ROOF_CONFIG_H +#define __UFO_ROOF_CONFIG_H + +#include <glib.h> + +typedef struct { + gchar *path; // Location of data files for simmulation purposes (i.e. reading a sequence of files instead listening on the corresponding ports) + guint first_file_number; // Indicates if the numbering of files starts at 0 or 1 + gchar *protocol; // Protocols: tcp, udp, tcp6, udp6, ... + guint port; // First port + guint n_streams; // Number of independent data streams (expected on sequential ports) + guint header_size; // Expected size of the packet header, for dgram protocols we need at least 32-bit sequence number. Defaults to uint32_t for udp* and 0 - otherwise + guint payload_size; // Expected size of TCP/UDP packet (without header) + guint dataset_size; // Size of a single dataset (image, sinogram, etc.). This is real size in bytes, excluding all technical headers used in communication protocol. + +//? + + +/* + guint pixels_per_module; + guint planes_per_module; + guint samples_per_dataset; +*/ + + guint max_packets; // limits maximum number of packets which are read at once + guint max_packet_size; // payload_size + header_size + ...? + guint buffer_size; // How many datasets we can buffer. There is no sense to have more than 2 for odered protocols (default), but having larger number could help for UDP if significant order disturbances are expected + guint network_timeout; // Maximum time (us) to wait for data on the socket + + + +} UfoRoofConfig; + +UfoRoofConfig *ufo_roof_config_new(const char *config, GError **error); +void ufo_roof_config_free(UfoRoofConfig *cfg); + +#endif /* __UFO_ROOF_CONFIG_H */ |