Airframe Application Utilities
libairframe 2.12.0 API documentation

Data Structures | Typedefs | Functions
mio_sink_file.h File Reference

MIO file sink initializers. More...

#include <airframe/mio.h>

Go to the source code of this file.

Data Structures

struct  _MIOSinkFileConfig
 File sink configuration context. More...
 

Typedefs

typedef struct _MIOSinkFileConfig MIOSinkFileConfig
 File sink configuration context. More...
 

Functions

gboolean mio_sink_init_file_single (MIOSink *sink, const char *spec, MIOType vsp_type, void *cfg, GError **err)
 Initialize a file sink for writing to a single file. More...
 
gboolean mio_sink_init_file_pattern (MIOSink *sink, const char *spec, MIOType vsp_type, void *cfg, GError **err)
 Initialize a file sink for writing to a multiple files based upon a pattern. More...
 

Detailed Description

MIO file sink initializers.

Most applications should use the interface in mio_config.h to access these initializers.

Typedef Documentation

◆ MIOSinkFileConfig

File sink configuration context.

Pass as the cfg argument to any file sink initializer.

Function Documentation

◆ mio_sink_init_file_pattern()

gboolean mio_sink_init_file_pattern ( MIOSink sink,
const char *  spec,
MIOType  vsp_type,
void *  cfg,
GError **  err 
)

Initialize a file sink for writing to a multiple files based upon a pattern.

Fails over to mio_sink_file_single() if specifier does not have any pattern variables.

The following pattern variables are supported:

  • T timestamp at sink open in YYYYMMDDHHMMSS format
  • S serial number (from cfg) in decimal
  • X serial number (from cfg) in hex
  • d dirname of source active at sink open
  • s basename of source active at sink open
  • e extension of source active at sink open
Parameters
sinkpointer to MIOSink to initialize. This MIOSink will be overwritten.
specinput specifier to initialize MIOSink with. Must be a filename.
vsp_typerequested sink pointer type, or MIO_T_ANY for default.
cfgpointer to configuration context. Must be a pointer to an MIOSinkFileConfig.
errAn error description pointer.
Returns
TRUE if the MIOSink was successfully initialized.

◆ mio_sink_init_file_single()

gboolean mio_sink_init_file_single ( MIOSink sink,
const char *  spec,
MIOType  vsp_type,
void *  cfg,
GError **  err 
)

Initialize a file sink for writing to a single file.

Fails over to mio_sink_init_stdout() if specifier is the special string "-".

Parameters
sinkpointer to MIOSink to initialize. This MIOSink will be overwritten.
specinput specifier to initialize MIOSink with. Must be a filename.
vsp_typerequested sink pointer type, or MIO_T_ANY for default.
cfgpointer to configuration context. Must be a pointer to an MIOSinkFileConfig.
errAn error description pointer.
Returns
TRUE if the MIOSink was successfully initialized.