C-Munipack 1.2 / Application programming interface / API reference

Functions for making read-all files.

cmpack_readall.h

Type definitions

CmpackReadAllRead-all configuration context.

Functions

cmpack_readall_initMake new configuration context for the Read-all tool.
cmpack_readall_set_consoleAttach console to the context.
cmpack_readall_set_apertureSet aperture index.
cmpack_readall_get_apertureGet aperture index.
cmpack_readall_openOpen output read-all file.
cmpack_readall_readAdd a frame to the read-all file.
cmpack_readall_closeClose read-all file.

Description

Set of functions defined in this module allows user to make read-all file from a set of photometry files.

CmpackReadAll (data type)

Read-all configuration context.

Synopsis

typedef struct _CmpackReadAll CmpackReadAll

Description

This private data structure holds the parameters for making read-all file.

cmpack_readall_init (function)

Make new configuration context for the Read-all tool.

Synopsis

CmpackReadAll * cmpack_readall_init (void)

Description

The reference counter is set to one. The caller is responsible to call cmpack_unref() when it is no longer needed.

Return value

pointer to context or zero on failure

cmpack_readall_set_console (function)

Attach console to the context.

Synopsis

void cmpack_readall_set_console (CmpackReadAll * ctx, CmpackConsole * con)

Description

Increment console's reference counter. Only one console can be attached to a single context. If another console is attached, by calling this function dettaches it. Set console to NULL to dettach the current console.

Parameters

ctx[in] air-mass computation context
con[in] console context

cmpack_readall_set_aperture (function)

Set aperture index.

Synopsis

int cmpack_readall_set_aperture (CmpackReadAll * ctx, int index)

Parameters

ctx[in] listing context
index[in] aperture index (starts by 1)

Return value

zero on success or error code on failure

cmpack_readall_get_aperture (function)

Get aperture index.

Synopsis

int cmpack_readall_get_aperture (CmpackReadAll * ctx, int * index)

Parameters

ctx[in] listing context
index[out] aperture index (starts by 1)

Return value

zero on success or error code on failure

cmpack_readall_open (function)

Open output read-all file.

Synopsis

int cmpack_readall_open (CmpackReadAll * ctx, CmpackAllFile * file)

Description

Opens new read-all file and returns its context structure. The caller is responsible to close the file and free the allocated memory by calling the cmpack_readall_close() function.

Parameters

ctx[in] configuration context
file[in] output file path + name

Return value

zero on success or error code on failure.

cmpack_readall_read (function)

Add a frame to the read-all file.

Synopsis

int cmpack_readall_read (CmpackReadAll * ctx, CmpackPhtFile * file)

Description

The function reads data from specified photometry file into memory.

Parameters

ctx[in] output file context
file[in] input file path + name

Return value

zero on success or error code on failure.

cmpack_readall_close (function)

Close read-all file.

Synopsis

int cmpack_readall_close (CmpackReadAll * ctx)

Description

The function closes the output file and frees allocated data.

Parameters

ctx[in] output file context

Return value

zero on success or error code on failure.