![]() |
cacao
Release 0.1.03-dev
Compute And Control For Adaptive Optics
|
Logging of real-time streams. More...
#include <malloc.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <sys/time.h>
#include <pthread.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <ncurses.h>
#include <termios.h>
#include <fcntl.h>
#include "CommandLineInterface/CLIcore.h"
#include "00CORE/00CORE.h"
#include "COREMOD_memory/COREMOD_memory.h"
#include "COREMOD_iofits/COREMOD_iofits.h"
#include "ImageStreamIO/ImageStruct.h"
#include "AOloopControl/AOloopControl.h"
Macros | |
#define | _GNU_SOURCE |
Functions | |
errno_t | AOloopControl_RTstreamLOG_init (int loop) |
errno_t | AOloopControl_RTstreamLOG_setup (long loop, long rtlindex, char *streamname) |
void | AOloopControl_RTstreamLOG_update (long loop, long rtlindex, struct timespec tnow) |
int | AOloopControl_RTstreamLOG_printstatus (int loop) |
static int | print_header_line (const char *str, char c, int wcol) |
int | AOloopControl_RTstreamLOG_GUI (int loop) |
int | AOloopControl_RTstreamLOG_set_saveON (int loop, int rtlindex) |
int | AOloopControl_RTstreamLOG_set_saveOFF (int loop, int rtlindex) |
int | AOloopControl_RTstreamLOG_set_ON (int loop, int rtlindex) |
int | AOloopControl_RTstreamLOG_set_OFF (int loop, int rtlindex) |
int | AOloopControl_RTstreamLOG_saveloop (int loop, char *dirname) |
Variables | |
AOLOOPCONTROL_CONF * | AOconf |
CLI function for AOloopControl_setframesAve. More... | |
AOloopControl_var | aoloopcontrol_var |
Logging of real-time streams.
Real-time stream logging
#define _GNU_SOURCE |
int AOloopControl_RTstreamLOG_GUI | ( | int | loop | ) |
errno_t AOloopControl_RTstreamLOG_init | ( | int | loop | ) |
int AOloopControl_RTstreamLOG_printstatus | ( | int | loop | ) |
int AOloopControl_RTstreamLOG_saveloop | ( | int | loop, |
char * | dirname | ||
) |
Monitors multiple real-time AO loop buffers and saves them to disk
Loop index and save directory on disk
This function runs in a dedicated in a dedicated tmux session.
It is controlled by a ncurses-based GUI.
Each real-time process maintains, for each streams, small alternating buffers where data is written at high speed. Timing/indexing buffers are also written.
This function monitors the small buffers. When a small buffer is ready/filled, it is included in a larger buffer which can be saved to disk.
The routine is designed to only occupy two threads: one to monitor, one to save
Takes timing data from the processes that create the data to achieve high performance timing
Intialize :
int AOloopControl_RTstreamLOG_set_OFF | ( | int | loop, |
int | rtlindex | ||
) |
int AOloopControl_RTstreamLOG_set_ON | ( | int | loop, |
int | rtlindex | ||
) |
int AOloopControl_RTstreamLOG_set_saveOFF | ( | int | loop, |
int | rtlindex | ||
) |
int AOloopControl_RTstreamLOG_set_saveON | ( | int | loop, |
int | rtlindex | ||
) |
errno_t AOloopControl_RTstreamLOG_setup | ( | long | loop, |
long | rtlindex, | ||
char * | streamname | ||
) |
Setup RT stream for logging
Creates required buffers
void AOloopControl_RTstreamLOG_update | ( | long | loop, |
long | rtlindex, | ||
struct timespec | tnow | ||
) |
Write single entry in log buffer
This function is called by the process writing to the stream to minimize IPC need and reduce logging latency
|
static |
AOLOOPCONTROL_CONF* AOconf |
CLI function for AOloopControl_setframesAve.
AOloopControl_var aoloopcontrol_var |