Data Structures | |
struct | frame |
Defines | |
#define | COLNAME "ColName" |
Functions | |
static bool | invariant (int id) |
Structure invariant. | |
static bool | frame_is_open (int id) |
Tell if frame is open. | |
static void | frame_new_image (int id, const char *filename, uves_propertylist *header, bool need_to_save, cpl_image *image, cpl_type type, int dtype) |
Create new image frame. | |
static void | frame_new_table (int id, const char *filename, uves_propertylist *header, bool need_to_save, cpl_table *table, int maxrow, cpl_table *colnames) |
Create new table frame. | |
static void | frame_free (int id) |
Deallocate frame. | |
static bool | is_special_midas_descr (const char *descr) |
Find out if FITS descriptor has a different name from MIDAS. | |
static const char * | convert_to_fits (const char *descr, int indx) |
Map MIDAS descriptors to FITS equivalents. | |
static void | convert_to_history (uves_propertylist **header) |
Convert header for output. | |
static uves_propertylist * | load_header (const char *filename, int extension) |
Load + parse FITS header HISTORY keywords. | |
cpl_type | flames_midas_image_dtype_to_cpltype (int dtype) |
Map MIDAS dtypes to CPL types. | |
static void | load_frame_header (int id) |
Load frame FITS header if not already in memory. | |
static void | set_column_format_unit_tnull (cpl_table *t, const uves_propertylist *theader) |
CPL workaround DFS03746. | |
static void | load_frame (int id) |
Load image/table if not already in memory. | |
static cpl_property ** | create_descr (uves_propertylist *header, const char *descr, char type, int length, int nexist) |
Create descriptors. | |
static cpl_property ** | get_descr_info (int id, const char *descr, char *type, int *length, int *bytelem) |
Get descriptor information. | |
int | flames_midas_scspro (const char *name) |
Get into the MIDAS environment. | |
int | flames_midas_scsepi (void) |
Deinitialize interface. | |
int | flames_midas_error_macro (const char *file, const char *function, int line, int status) |
Print debugging info when function returns error. | |
int | flames_midas_fail_macro (const char *file, const char *function, int line) |
Deinitialize interface, cleanup and return failure. | |
int | flames_midas_sckwri (int *key, const int *values, int felem, int maxvals, int *unit) |
Write data into integer keyword. | |
int | flames_midas_sckwrd (double *key, const double *values, int felem, int maxvals, int *unit) |
Write data into double keyword. | |
int | flames_midas_sckwrc (char *key, int noelem, const char *values, int felem, int maxvals, int *unit) |
Write data into character keyword. | |
int | flames_midas_sckgetc (const char *key, int felem, int maxvals, int *actvals, char *values) |
Get data from character keyword. | |
int | flames_midas_sckgetc_fs (const cpl_frameset *key, int felem, int maxvals, int *actvals, const cpl_frameset **values) |
Get data from character keyword (catalogue). | |
int | flames_midas_sckgetc_fsp (cpl_frameset **key, int felem, int maxvals, int *actvals, cpl_frameset ***values) |
Get data from character keyword (frame set pointer). | |
int | flames_midas_sckrdd (const double *key, int felem, int maxvals, int *actvals, double *values, int *unit, int *null) |
Read data from double precision keyword. | |
int | flames_midas_sckrdr (const float *key, int felem, int maxvals, int *actvals, float *values, int *unit, int *null) |
Read data from real precision keyword. | |
int | flames_midas_sckrdi (const int *key, int felem, int maxvals, int *actvals, int *values, int *unit, int *null) |
Read data from integer keyword. | |
int | flames_midas_sckrdc (const char *key, int noelm, int felem, int maxvals, int *actvals, char *values, int *unit, int *null) |
Read data from string keyword. | |
static int | sckfnd (const char the_type, const void *key, char *type, int *noelem, int *bytelem) |
Find keyword and provide info on it. | |
int | flames_midas_sckfnd_double (const double *key, char *type, int *noelem, int *bytelem) |
int | flames_midas_sckfnd_float (const float *key, char *type, int *noelem, int *bytelem) |
int | flames_midas_sckfnd_int (const int *key, char *type, int *noelem, int *bytelem) |
int | flames_midas_sckfnd_string (const char *key, char *type, int *noelem, int *bytelem) |
int | flames_midas_sctput (const char *msg, const char *function, const char *file, int line) |
Display message. | |
int | flames_midas_scfinf (const char *name, int fno, int *ibuf) |
Open the frame and return file info in buffer up to 5 integers. | |
int | flames_midas_scfopn (const char *name, int dattype, int newopn, int filtype, int *imno) |
Open an existing image and return its internal file no. | |
int | flames_midas_scfcre (const char *name, int dattype, int iomode, int filtype, int size, int *imno) |
Create an image frame with data of given type and return its internal file no. | |
static int | frame_close (int id) |
Close a frame, save to disk if necessary. | |
int | flames_midas_scfclo (int imno) |
Close an image frame. | |
int | flames_midas_scfget (int imno, int felem, int size, int *actsize, char *bufadr) |
Read data from disk frame into memory. | |
int | flames_midas_scfput (int imno, int felem, int size, const char *bufadr) |
Write data from memory into disk frame. | |
int | flames_midas_scdfnd (int id, const char *descr, char *type, int *noelem, int *bytelem) |
Provide info about descriptor. | |
int | flames_midas_scdprs (int id, const char *descr, char *type, int *noelem, int *bytelem) |
Provide info about descriptor. | |
static int | scdrd (char expected_type, int id, const char *descr, int felem, int maxvals, int *actvals, void *values, int *unit, int *null) |
Read contents of integer descriptor. | |
int | flames_midas_scdrdi (int id, const char *descr, int felem, int maxvals, int *actvals, int *values, int *unit, int *null) |
Read contents of integer descriptor. | |
int | flames_midas_scdrdd (int id, const char *descr, int felem, int maxvals, int *actvals, double *values, int *unit, int *null) |
Read contents of double descriptor. | |
int | flames_midas_scdrdr (int id, const char *descr, int felem, int maxvals, int *actvals, float *values, int *unit, int *null) |
Read contents of double descriptor. | |
int | flames_midas_scdrdc (int id, const char *descr, int noelem, int felem, int maxvals, int *actvals, char *values, int *unit, int *null) |
Read contents of string descriptor. | |
static int | scdwr (char type_to_write, int id, const char *descr, const void *values, int felem, int nval, const int *unit) |
Write a descriptor and its data. | |
int | flames_midas_scdwri (int id, const char *descr, const int *values, int felem, int nval, const int *unit) |
Write a descriptor and its data. | |
int | flames_midas_scdwrd (int id, const char *descr, const double *values, int felem, int nval, const int *unit) |
Write a descriptor and its data. | |
int | flames_midas_scdwrr (int id, const char *descr, const float *values, int felem, int nval, const int *unit) |
Write a descriptor and its data. | |
int | flames_midas_scdwrc (int id, const char *descr, int noelm, const char *values, int felem, int nval, const int *unit) |
Write a descriptor and its data. | |
int | flames_midas_scddel (int id, const char *descr) |
Delete a descriptor. | |
static int | scdcop (int from, int to, int mask, bool copy_naxis) |
Copy descriptors from one frame to another. | |
int | flames_midas_scdcop (int from, int to, int mask) |
Copy descriptors. | |
int | flames_midas_scdcop_nonaxis (int from, int to, int mask) |
Copy descriptors. | |
int | flames_midas_sccsho (const cpl_frameset *catfile, int *noent, int *last) |
Show size and type of a catalog. | |
int | flames_midas_sccfnd (const cpl_frameset *catfile, int frmno, char *frame) |
Find corresponding frame for given entry number. | |
int | flames_midas_sccget (const cpl_frameset *catfile, int flag, char *name, char *ident, int *no) |
Get next sequential entry from frame catalogue. | |
int | flames_midas_scccre (cpl_frameset **catfile, int type, int flag) |
Create a catalog. | |
int | flames_midas_sccadd (cpl_frameset *catfile, const char *name, const char *ident) |
Add catalog entry. | |
static cpl_type | table_dtype_to_cpltype (int dtype, int alen) |
Map MIDAS dtypes to CPL types. | |
static int | sizeof_cpltype (cpl_type type) |
Get sizeof CPL types. | |
static int | table_cpltype_to_dtype (cpl_type type) |
Map CPL types to MIDAS dtypes. | |
static const char * | table_colname_from_number (int tid, int column) |
Convert table numer to name. | |
int | flames_midas_tctopn (const char *name, int mode, int allrow, int *tid) |
Open table. | |
int | flames_midas_tctclo (int tid) |
Closes a table. | |
int | flames_midas_tccser (int tid, const char *colref, int *column) |
Search column by reference. | |
int | flames_midas_tciget (int tid, int *column, int *row) |
Reads table size information. | |
int | flames_midas_tcbget (int tid, int column, int *dtype, int *items, int *bytes) |
Reads binary storage characteristics of column. | |
int | flames_midas_tcdget (int tid, int *store) |
Reads table storage format (F_TRANS or F_RECORD). | |
int | flames_midas_tcfget (int tid, int column, char *form, int *dtype) |
Reads column format. | |
int | flames_midas_tclget (int tid, int column, char *label) |
Reads column label. | |
int | flames_midas_tcuget (int tid, int column, char *unit) |
Reads column unit. | |
int | flames_midas_tclser (int tid, const char *label, int *column) |
Searches the sequential number of the column having the given label, case insensitive. | |
int | flames_midas_tccini (int tid, int dtype, int alen, const char *form, const char *unit, const char *label, int *column) |
Initializes table column. | |
static int | tcerd (cpl_type type, int tid, int row, int column, void *value, int *null) |
Reads table element. | |
int | flames_midas_tcerdc (int tid, int row, int column, char *values, int *null) |
int | flames_midas_tcerdi (int tid, int row, int column, int *value, int *null) |
int | flames_midas_tcerdr (int tid, int row, int column, float *value, int *null) |
int | flames_midas_tcerdd (int tid, int row, int column, double *value, int *null) |
static int | tcewr (cpl_type type, int tid, int row, int column, const void *value) |
Write table element. | |
int | flames_midas_tcewrc (int tid, int row, int column, const char *value) |
int | flames_midas_tcewrd (int tid, int row, int column, const double *value) |
int | flames_midas_tcewri (int tid, int row, int column, const int *value) |
int | flames_midas_tcewrr (int tid, int row, int column, const float *value) |
static int | tcard (cpl_type type, int tid, int row, int column, int index, int items, void *value) |
int | flames_midas_tcardc (int tid, int row, int col, int index, int items, char *value) |
Reads table elements as a character string. Arrays are edited with a comma between elements. | |
int | flames_midas_tcardd (int tid, int row, int col, int index, int items, double *value) |
Reads table elements as a double precision value. | |
int | flames_midas_tcardi (int tid, int row, int col, int index, int items, int *value) |
int | flames_midas_tcardr (int tid, int row, int col, int index, int items, float *value) |
static int | tcawr (cpl_type type, int tid, int row, int col, int index, int items, const void *value) |
int | flames_midas_tcawrc (int tid, int row, int col, int index, int items, const char *value) |
Writes table element, character string format. | |
int | flames_midas_tcawrd (int tid, int row, int col, int index, int items, const double *value) |
Writes table element, double precision argument. | |
int | flames_midas_tcawri (int tid, int row, int col, int index, int items, const int *value) |
int | flames_midas_tcawrr (int tid, int row, int col, int index, int items, const float *value) |
int | flames_midas_tcsget (int tid, int row, int *value) |
Reads row selection flag. | |
int | flames_midas_tcsput (int tid, int row, const int *value) |
Writes row selection flag. | |
Variables | |
struct frame | frames [MAX_OPEN] |
const char * | current_caller = NULL |
This is not intended to be a full implementation of the C->MIDAS interface, but only of the parts that are necessary for the FLAMES pipeline
Error handling: The functions in this module return an integer error code (expected by the FLAMES C-code) and set the cpl_error_code in case of an error
Bugs: 1. table column formats are not handled because CPL table i/o is broken. That is not a problem for the FLAMES code which does not depend on the actual values of the format strings. (But table column units *are* handled (by a workaround, this also didn't work in CPL))
2. There are no checks for NULL input (which is ok because the FLAMES code always provides non-null pointers)
static bool invariant | ( | int | id | ) | [static] |
Structure invariant.
id | frame id |
This function is used to detect bugs in this member functions. Typical usage:
assert( invariant );
in the beginning and end of every member function.
Definition at line 418 of file flames_midas_def.c.
Referenced by flames_midas_scddel(), flames_midas_scdfnd(), flames_midas_scdprs(), flames_midas_scfcre(), flames_midas_scfget(), flames_midas_scfput(), flames_midas_tccini(), flames_midas_tccser(), flames_midas_tciget(), flames_midas_tcsget(), flames_midas_tcsput(), flames_midas_tctopn(), frame_close(), get_descr_info(), load_frame(), load_frame_header(), scdcop(), scdrd(), scdwr(), and table_colname_from_number().
static bool frame_is_open | ( | int | id | ) | [static] |
Tell if frame is open.
Definition at line 451 of file flames_midas_def.c.
Referenced by flames_midas_scddel(), flames_midas_scfcre(), flames_midas_scfget(), flames_midas_scfopn(), flames_midas_scfput(), flames_midas_scsepi(), flames_midas_tccini(), flames_midas_tccser(), flames_midas_tciget(), flames_midas_tcsget(), flames_midas_tcsput(), flames_midas_tctopn(), frame_close(), frame_free(), get_descr_info(), load_frame(), load_frame_header(), scdcop(), scdwr(), and table_colname_from_number().
static void frame_new_image | ( | int | id, | |
const char * | filename, | |||
uves_propertylist * | header, | |||
bool | need_to_save, | |||
cpl_image * | image, | |||
cpl_type | type, | |||
int | dtype | |||
) | [static] |
Create new image frame.
id | frame id |
Definition at line 464 of file flames_midas_def.c.
Referenced by flames_midas_scfcre(), and flames_midas_scfopn().
static void frame_new_table | ( | int | id, | |
const char * | filename, | |||
uves_propertylist * | header, | |||
bool | need_to_save, | |||
cpl_table * | table, | |||
int | maxrow, | |||
cpl_table * | colnames | |||
) | [static] |
Create new table frame.
id | frame id |
Definition at line 502 of file flames_midas_def.c.
Referenced by flames_midas_tctopn().
static void frame_free | ( | int | id | ) | [static] |
Deallocate frame.
id | frame id |
Definition at line 551 of file flames_midas_def.c.
References frame_is_open().
Referenced by flames_midas_scsepi(), and frame_close().
static bool is_special_midas_descr | ( | const char * | descr | ) | [static] |
Find out if FITS descriptor has a different name from MIDAS.
descr | name |
Definition at line 577 of file flames_midas_def.c.
Referenced by load_header().
static const char* convert_to_fits | ( | const char * | descr, | |
int | indx | |||
) | [static] |
Map MIDAS descriptors to FITS equivalents.
descr | MIDAS descriptor name | |
indx | counting from 1 |
Definition at line 602 of file flames_midas_def.c.
Referenced by create_descr(), flames_midas_sccget(), flames_midas_scddel(), and get_descr_info().
static void convert_to_history | ( | uves_propertylist ** | header | ) | [static] |
Convert header for output.
header | to convert |
Sequences of properties like (LOONGNAME, value1) (LOONGNAME, value2) (LOONGNAME, value3) (LOONGNAME, value4) with name longer than 8 characters are converted to (HISTORY, "'LOONGNAME'"); (HISTORY, "value1"); (HISTORY, "value2"); (HISTORY, "value3"); (HISTORY, "value4"); (HISTORY, "");
except "ESO [something]" descriptors which should not be converted.
Also a descriptors with comment 'MIDAS_DESC' are converted, such as COEFFI, FIBREPOS
Definition at line 680 of file flames_midas_def.c.
References check_nomsg, uves_msg_debug, uves_propertylist_duplicate(), uves_propertylist_get_size(), uves_propertylist_new(), and uves_tostring_cpl_type().
Referenced by frame_close().
static uves_propertylist* load_header | ( | const char * | filename, | |
int | extension | |||
) | [static] |
Load + parse FITS header HISTORY keywords.
filename | to load | |
extension | to load |
MIDAS properties like this
(HISTORY, "'KEYWORDNAME'") (HISTORY, "value1 value2 ...") : (HISTORY, "")
are converted to properties
(KEYWORDNAME, value1) (KEYWORDNAME, value2) :
Definition at line 860 of file flames_midas_def.c.
References check, is_special_midas_descr(), uves_msg_warning, uves_propertylist_append_c_double(), uves_propertylist_append_c_float(), uves_propertylist_append_c_int(), uves_propertylist_append_c_string(), uves_propertylist_get_size(), uves_propertylist_load(), uves_propertylist_new(), and uves_tostring_cpl_type().
Referenced by load_frame_header().
cpl_type flames_midas_image_dtype_to_cpltype | ( | int | dtype | ) |
Map MIDAS dtypes to CPL types.
dtype | MIDAS type to convert |
Definition at line 980 of file flames_midas_def.c.
Referenced by flames_midas_scfcre(), and flames_midas_scfopn().
static void load_frame_header | ( | int | id | ) | [static] |
Load frame FITS header if not already in memory.
id | frame id |
The image/table must already be open (i.e. have legal filename)
Definition at line 1011 of file flames_midas_def.c.
References check, frame_is_open(), invariant(), load_header(), passure, uves_msg_debug, and uves_propertylist_get_size().
Referenced by frame_close(), get_descr_info(), and scdcop().
static void set_column_format_unit_tnull | ( | cpl_table * | t, | |
const uves_propertylist * | theader | |||
) | [static] |
CPL workaround DFS03746.
t | table to update | |
colname | name of column to update | |
theader | table extension header, which contains unit/format info |
Definition at line 1047 of file flames_midas_def.c.
References check_nomsg, uves_propertylist_contains(), uves_propertylist_get_int(), and uves_propertylist_get_string().
Referenced by load_frame().
static void load_frame | ( | int | id | ) | [static] |
Load image/table if not already in memory.
id | frame id |
Definition at line 1152 of file flames_midas_def.c.
References check, frame_is_open(), invariant(), passure, set_column_format_unit_tnull(), uves_msg_debug, uves_propertylist_load(), and uves_tostring_cpl_type().
Referenced by flames_midas_scfget(), flames_midas_scfput(), flames_midas_tccini(), flames_midas_tccser(), flames_midas_tciget(), flames_midas_tcsget(), flames_midas_tcsput(), frame_close(), scdcop(), scdwr(), and table_colname_from_number().
static cpl_property** create_descr | ( | uves_propertylist * | header, | |
const char * | descr, | |||
char | type, | |||
int | length, | |||
int | nexist | |||
) | [static] |
Create descriptors.
header | add new descriptors here | |
descr | descriptor name | |
type | descriptor type | |
length | number of descriptors to create. If type is 'C' only one property is created | |
nexist | number of already existing descriptors with this name |
Definition at line 1298 of file flames_midas_def.c.
References check, convert_to_fits(), passure, uves_msg_debug, uves_propertylist_append_c_double(), uves_propertylist_append_c_float(), uves_propertylist_append_c_int(), and uves_propertylist_append_c_string().
Referenced by scdwr().
static cpl_property** get_descr_info | ( | int | id, | |
const char * | descr, | |||
char * | type, | |||
int * | length, | |||
int * | bytelem | |||
) | [static] |
Get descriptor information.
id | frame number | |
descr | descriptor name | |
type | (output) descriptor type | |
length | (output) descriptor length, if type string the string length | |
bytelem | (output) bytes per element |
The special MIDAS descriptor arrays are handled, e.g. STEP is mapped to to CRVAL1, not CRVAL2, CRVAL3...
If the descriptor does not exist, NULL is returned but no error is set
Definition at line 1422 of file flames_midas_def.c.
References assure_mem, check, convert_to_fits(), frame_is_open(), invariant(), load_frame_header(), passure, and uves_msg_debug.
Referenced by flames_midas_scddel(), flames_midas_scdfnd(), flames_midas_scdprs(), frame_close(), scdrd(), and scdwr().
int flames_midas_scspro | ( | const char * | name | ) |
Get into the MIDAS environment.
name | name of calling program |
Read keywords database, Initialize file control table, Open logfile
Definition at line 1531 of file flames_midas_def.c.
References uves_msg_debug.
int flames_midas_scsepi | ( | void | ) |
Deinitialize interface.
Definition at line 1561 of file flames_midas_def.c.
References frame_free(), frame_is_open(), uves_msg_debug, and uves_msg_warning.
Referenced by flames_midas_fail_macro().
int flames_midas_error_macro | ( | const char * | file, | |
const char * | function, | |||
int | line, | |||
int | status | |||
) |
Print debugging info when function returns error.
status | to be returned |
In the original FLAMES C code, low level function failure return statements like
"return MAREMMA;"
are replaced with
"return flames_midas_error(MAREMMA)"
to allow tracking the errors
Definition at line 1609 of file flames_midas_def.c.
References uves_msg_debug.
int flames_midas_fail_macro | ( | const char * | file, | |
const char * | function, | |||
int | line | |||
) |
Deinitialize interface, cleanup and return failure.
This function replaces the "exit(1)" calls in the original MIDAS source code
Definition at line 1628 of file flames_midas_def.c.
References flames_midas_scsepi(), uves_msg_debug, and uves_msg_error.
int flames_midas_sckwri | ( | int * | key, | |
const int * | values, | |||
int | felem, | |||
int | maxvals, | |||
int * | unit | |||
) |
Write data into integer keyword.
key | address of keyword | |
values | buffer with data values | |
felem | position of 1st element to be written (numbered from 1) | |
maxvals | max no. of elements to write | |
unit | unit pointer |
Definition at line 1655 of file flames_midas_def.c.
References assure_nomsg, and uves_msg_debug.
int flames_midas_sckwrd | ( | double * | key, | |
const double * | values, | |||
int | felem, | |||
int | maxvals, | |||
int * | unit | |||
) |
Write data into double keyword.
key | address of keyword | |
values | buffer with data values | |
felem | position of 1st element to be written (numbered from 1) | |
maxvals | max no. of elements to write | |
unit | unit pointer |
Definition at line 1684 of file flames_midas_def.c.
References assure_nomsg, and uves_msg_debug.
int flames_midas_sckwrc | ( | char * | key, | |
int | noelem, | |||
const char * | values, | |||
int | felem, | |||
int | maxvals, | |||
int * | unit | |||
) |
Write data into character keyword.
key | address of keyword | |
noelem | number of bytes per data value | |
values | buffer with data values | |
felem | position of 1st element to be written (numbered from 1) | |
maxvals | max no. of elements to write | |
unit | unit pointer |
Definition at line 1717 of file flames_midas_def.c.
References assure_nomsg, and uves_msg_debug.
int flames_midas_sckgetc | ( | const char * | key, | |
int | felem, | |||
int | maxvals, | |||
int * | actvals, | |||
char * | values | |||
) |
Get data from character keyword.
key | keyword name (max 8 characters) | |
felem | position of 1st element (numbered from 1) | |
maxvals | max no. of characters to be returned (buffer size including terminating 0) | |
actvals | (output) actual number of characters returned | |
values | (output) buffer for data values |
Definition at line 1745 of file flames_midas_def.c.
References assure_nomsg.
int flames_midas_sckgetc_fs | ( | const cpl_frameset * | key, | |
int | felem, | |||
int | maxvals, | |||
int * | actvals, | |||
const cpl_frameset ** | values | |||
) |
Get data from character keyword (catalogue).
key | input catalogue | |
felem | position of 1st element (must be 1) | |
maxvals | max no. of characters to be returned | |
actvals | (output) actual number of characters returned | |
values | (output) same as input |
Definition at line 1779 of file flames_midas_def.c.
References assure_nomsg.
int flames_midas_sckgetc_fsp | ( | cpl_frameset ** | key, | |
int | felem, | |||
int | maxvals, | |||
int * | actvals, | |||
cpl_frameset *** | values | |||
) |
Get data from character keyword (frame set pointer).
key | input catalogue | |
felem | position of 1st element (must be 1) | |
maxvals | max no. of characters to be returned | |
actvals | (output) actual number of characters returned | |
values | (output) same as input |
Definition at line 1807 of file flames_midas_def.c.
References assure_nomsg.
int flames_midas_sckrdd | ( | const double * | key, | |
int | felem, | |||
int | maxvals, | |||
int * | actvals, | |||
double * | values, | |||
int * | unit, | |||
int * | null | |||
) |
Read data from double precision keyword.
key | keyword array | |
felem | first data item to be read | |
maxvals | no. of elements to get | |
actvals | (output) actual number of elements returned | |
values | (output) buffer for data values | |
unit | (output) address of unit pointer | |
null | (output) no. of null values in keyword |
Definition at line 1837 of file flames_midas_def.c.
References assure_nomsg.
int flames_midas_sckrdr | ( | const float * | key, | |
int | felem, | |||
int | maxvals, | |||
int * | actvals, | |||
float * | values, | |||
int * | unit, | |||
int * | null | |||
) |
Read data from real precision keyword.
key | keyword array | |
felem | first data item to be read | |
maxvals | no. of elements to get | |
actvals | (output) actual number of elements returned | |
values | (output) buffer for data values | |
unit | (output) address of unit pointer | |
null | (output) no. of null values in keyword |
Definition at line 1872 of file flames_midas_def.c.
References assure_nomsg.
int flames_midas_sckrdi | ( | const int * | key, | |
int | felem, | |||
int | maxvals, | |||
int * | actvals, | |||
int * | values, | |||
int * | unit, | |||
int * | null | |||
) |
Read data from integer keyword.
key | keyword array | |
felem | first data item to be read | |
maxvals | no. of elements to get | |
actvals | (output) actual number of elements returned | |
values | (output) buffer for data values | |
unit | (output) address of unit pointer | |
null | (output) no. of null values in keyword |
Definition at line 1907 of file flames_midas_def.c.
int flames_midas_sckrdc | ( | const char * | key, | |
int | noelm, | |||
int | felem, | |||
int | maxvals, | |||
int * | actvals, | |||
char * | values, | |||
int * | unit, | |||
int * | null | |||
) |
Read data from string keyword.
key | keyword array | |
noelm | no. of bytes per data values | |
felem | first data item to be read | |
maxvals | no. of elements to get | |
actvals | (output) actual number of elements returned | |
values | (output) buffer for data values | |
unit | (output) address of unit pointer | |
null | (output) no. of null values in keyword |
Definition at line 1941 of file flames_midas_def.c.
static int sckfnd | ( | const char | the_type, | |
const void * | key, | |||
char * | type, | |||
int * | noelem, | |||
int * | bytelem | |||
) | [static] |
Find keyword and provide info on it.
key | keyword array | |
type | (output) keyword type | |
noelem | (output) no. of elements | |
bytelem | (output) no. of bytes per element |
If keyword not found, type is ' ', and no error is set.
Definition at line 1978 of file flames_midas_def.c.
References uves_msg_debug.
Referenced by flames_midas_sckfnd_double(), flames_midas_sckfnd_float(), flames_midas_sckfnd_int(), and flames_midas_sckfnd_string().
int flames_midas_sckfnd_double | ( | const double * | key, | |
char * | type, | |||
int * | noelem, | |||
int * | bytelem | |||
) |
int flames_midas_sckfnd_float | ( | const float * | key, | |
char * | type, | |||
int * | noelem, | |||
int * | bytelem | |||
) |
int flames_midas_sckfnd_int | ( | const int * | key, | |
char * | type, | |||
int * | noelem, | |||
int * | bytelem | |||
) |
int flames_midas_sckfnd_string | ( | const char * | key, | |
char * | type, | |||
int * | noelem, | |||
int * | bytelem | |||
) |
int flames_midas_sctput | ( | const char * | msg, | |
const char * | function, | |||
const char * | file, | |||
int | line | |||
) |
Display message.
msg | message to display |
Definition at line 2044 of file flames_midas_def.c.
References uves_msg_error, uves_msg_low, and uves_msg_warning.
int flames_midas_scfinf | ( | const char * | name, | |
int | fno, | |||
int * | ibuf | |||
) |
Open the frame and return file info in buffer up to 5 integers.
name | name of data frame | |
fno | flag for requested info | |
ibuf | (output) buffer with requested info |
fno = 0 for getting the file id (imno) of 'name', i.e. check if the frame has been opened already
fno = 1 for getting version no., file_type, short int, int and floating format
fno = 2 for getting no_bytes_per_pixel, format, pixels_per_block, startblock and lastblock
fno = 3 for getting file_type, format, file_protect, file_compress
fno = 4 for getting no_bytes_per_pixel, format, file_type
fno = 99 to find out if file 'name' exists, no buffer is returned instead the status is set to 0 (o.k. = file exists) or not
The FLAMES code uses only fno = 3, 4, 99
Definition at line 2094 of file flames_midas_def.c.
References check, uves_msg_debug, uves_pfits_get_bitpix(), and uves_propertylist_load().
int flames_midas_scfopn | ( | const char * | name, | |
int | dattype, | |||
int | newopn, | |||
int | filtype, | |||
int * | imno | |||
) |
Open an existing image and return its internal file no.
name | name of data frame | |
dattype | data types as defined below | |
newopn | new open flag. 0: open normally. 1: open same file again | |
filtype | file type as defined below | |
imno | (output) file id of frame |
Definition at line 2175 of file flames_midas_def.c.
References flames_midas_image_dtype_to_cpltype(), frame_is_open(), frame_new_image(), uves_msg_debug, and uves_tostring_cpl_type().
int flames_midas_scfcre | ( | const char * | name, | |
int | dattype, | |||
int | iomode, | |||
int | filtype, | |||
int | size, | |||
int * | imno | |||
) |
Create an image frame with data of given type and return its internal file no.
name | name of data frame | |
dattype | data type | |
iomode | opening mode | |
filtype | file type number | |
size | size of frame (number of values in file). Images: number of pixels | |
imno | (output) file id of frame |
Definition at line 2241 of file flames_midas_def.c.
References flames_midas_image_dtype_to_cpltype(), frame_is_open(), frame_new_image(), invariant(), passure, uves_msg_debug, and uves_propertylist_new().
static int frame_close | ( | int | id | ) | [static] |
Close a frame, save to disk if necessary.
id | frame number |
Definition at line 2304 of file flames_midas_def.c.
References check, convert_to_history(), flames_midas_scdrdi(), frame_free(), frame_is_open(), get_descr_info(), invariant(), load_frame(), load_frame_header(), passure, uves_msg_debug, and uves_msg_warning.
Referenced by flames_midas_scfclo(), and flames_midas_tctclo().
int flames_midas_scfclo | ( | int | imno | ) |
Close an image frame.
imno | file id of data frame |
Definition at line 2470 of file flames_midas_def.c.
References frame_close().
int flames_midas_scfget | ( | int | imno, | |
int | felem, | |||
int | size, | |||
int * | actsize, | |||
char * | bufadr | |||
) |
Read data from disk frame into memory.
imno | file id of data frame | |
felem | 1st pixel to be accessed in data space | |
size | number of data values (pixels) to be read | |
*actsize | (output) actual number of pixels read | |
bufadr | (output) data buffer (really a void pointer but implemented as a char pointer) |
Definition at line 2488 of file flames_midas_def.c.
References assure_nomsg, check, frame_is_open(), invariant(), load_frame(), passure, and uves_tostring_cpl_type().
int flames_midas_scfput | ( | int | imno, | |
int | felem, | |||
int | size, | |||
const char * | bufadr | |||
) |
Write data from memory into disk frame.
imno | file id of data frame | |
felem | 1st pixel to be accessed in data space | |
size | number of data values (pixels) to be written | |
bufadr | data buffer (void pointer) |
Definition at line 2577 of file flames_midas_def.c.
References assure_nomsg, check, frame_is_open(), invariant(), load_frame(), passure, uves_msg_debug, and uves_tostring_cpl_type().
int flames_midas_scdfnd | ( | int | id, | |
const char * | descr, | |||
char * | type, | |||
int * | noelem, | |||
int * | bytelem | |||
) |
Provide info about descriptor.
id | file id of data frame | |
descr | descriptor name (max 15 chars) | |
type | (output) type of descriptor: 'I', 'R', 'C', 'D' or ' ' (a blank) | |
noelem | (output) number of elements | |
bytelem | (output) number of bytes per element |
Search descriptor directory, if 'descr' not found, *type is set to blank
Definition at line 2683 of file flames_midas_def.c.
References assure_nomsg, check, flames_midas_scdfnd(), get_descr_info(), invariant(), passure, and uves_msg_debug.
Referenced by flames_midas_scdfnd(), and flames_midas_scdprs().
int flames_midas_scdprs | ( | int | id, | |
const char * | descr, | |||
char * | type, | |||
int * | noelem, | |||
int * | bytelem | |||
) |
Provide info about descriptor.
id | file id of data frame | |
descr | descriptor name (max 15 chars) | |
type | (output) type of descriptor: 'I', 'R', 'C', 'D' or ' ' (a blank) | |
noelem | (output) number of elements | |
bytelem | (output) number of bytes per element |
Search descriptor directory, if 'descr' not found, *type is set to blank
Definition at line 2766 of file flames_midas_def.c.
References assure_nomsg, check, flames_midas_scdfnd(), get_descr_info(), invariant(), passure, and uves_msg_debug.
static int scdrd | ( | char | expected_type, | |
int | id, | |||
const char * | descr, | |||
int | felem, | |||
int | maxvals, | |||
int * | actvals, | |||
void * | values, | |||
int * | unit, | |||
int * | null | |||
) | [static] |
Read contents of integer descriptor.
id | file id of data frame | |
descr | descriptor name (max 15 chars) | |
felem | position of 1st element | |
maxvals | max no. of elements to be returned | |
actvals | (output) actual number of values returned | |
values | (output) array for descriptor data | |
unit | (output) address of unit pointer | |
null | (output) no. of null values in data |
actvals will be the actual number of values returned
Definition at line 2851 of file flames_midas_def.c.
References check, get_descr_info(), invariant(), passure, and uves_msg_debug.
Referenced by flames_midas_scdrdc(), flames_midas_scdrdd(), flames_midas_scdrdi(), and flames_midas_scdrdr().
int flames_midas_scdrdi | ( | int | id, | |
const char * | descr, | |||
int | felem, | |||
int | maxvals, | |||
int * | actvals, | |||
int * | values, | |||
int * | unit, | |||
int * | null | |||
) |
Read contents of integer descriptor.
Definition at line 2954 of file flames_midas_def.c.
References assure_mem, check, and scdrd().
Referenced by frame_close().
int flames_midas_scdrdd | ( | int | id, | |
const char * | descr, | |||
int | felem, | |||
int | maxvals, | |||
int * | actvals, | |||
double * | values, | |||
int * | unit, | |||
int * | null | |||
) |
Read contents of double descriptor.
Definition at line 3005 of file flames_midas_def.c.
References scdrd().
Referenced by flames_midas_scdrdr().
int flames_midas_scdrdr | ( | int | id, | |
const char * | descr, | |||
int | felem, | |||
int | maxvals, | |||
int * | actvals, | |||
float * | values, | |||
int * | unit, | |||
int * | null | |||
) |
Read contents of double descriptor.
Definition at line 3020 of file flames_midas_def.c.
References flames_midas_scdrdd(), scdrd(), and uves_msg_debug.
int flames_midas_scdrdc | ( | int | id, | |
const char * | descr, | |||
int | noelem, | |||
int | felem, | |||
int | maxvals, | |||
int * | actvals, | |||
char * | values, | |||
int * | unit, | |||
int * | null | |||
) |
Read contents of string descriptor.
noelem | no. of bytes per data value |
Note: maxvals in the number of characters, excluding the final terminating '', i.e. maxvals should usually be one less than the buffer size
Definition at line 3080 of file flames_midas_def.c.
References scdrd().
static int scdwr | ( | char | type_to_write, | |
int | id, | |||
const char * | descr, | |||
const void * | values, | |||
int | felem, | |||
int | nval, | |||
const int * | unit | |||
) | [static] |
Write a descriptor and its data.
type_to_write | type | |
id | file id of data frame | |
descr | descriptor name (max 15 chars) | |
values | buffer with descriptor data | |
felem | position of 1st descriptor value to be accessed | |
nval | no. of data values to write | |
unit | unit-pointer |
A new descriptor is added to the descriptor area, or data of an existing descriptor is modified and extended, if necessary.
If felem = -1 descriptor values are appended to existing ones
Definition at line 3119 of file flames_midas_def.c.
References check, create_descr(), frame_is_open(), get_descr_info(), invariant(), load_frame(), passure, and uves_msg_debug.
Referenced by flames_midas_scdwrc(), flames_midas_scdwrd(), flames_midas_scdwri(), and flames_midas_scdwrr().
int flames_midas_scdwri | ( | int | id, | |
const char * | descr, | |||
const int * | values, | |||
int | felem, | |||
int | nval, | |||
const int * | unit | |||
) |
Write a descriptor and its data.
See scdwr
Definition at line 3253 of file flames_midas_def.c.
References passure, scdwr(), uves_msg_debug, and uves_tostring_cpl_type().
Referenced by scdcop().
int flames_midas_scdwrd | ( | int | id, | |
const char * | descr, | |||
const double * | values, | |||
int | felem, | |||
int | nval, | |||
const int * | unit | |||
) |
Write a descriptor and its data.
Definition at line 3353 of file flames_midas_def.c.
References flames_midas_scdwrd(), and scdwr().
Referenced by flames_midas_scdwrd(), and flames_midas_scdwrr().
int flames_midas_scdwrr | ( | int | id, | |
const char * | descr, | |||
const float * | values, | |||
int | felem, | |||
int | nval, | |||
const int * | unit | |||
) |
Write a descriptor and its data.
Definition at line 3384 of file flames_midas_def.c.
References flames_midas_scdwrd(), scdwr(), and uves_msg_debug.
int flames_midas_scdwrc | ( | int | id, | |
const char * | descr, | |||
int | noelm, | |||
const char * | values, | |||
int | felem, | |||
int | nval, | |||
const int * | unit | |||
) |
Write a descriptor and its data.
noelm | no. of bytes per data value |
'noelm' larger than 1 enables you to use character arrays, where each data values is in effect a char. string of 'noelm' bytes
Definition at line 3435 of file flames_midas_def.c.
References flames_midas_scdwrc(), and scdwr().
Referenced by flames_midas_scdwrc().
int flames_midas_scddel | ( | int | id, | |
const char * | descr | |||
) |
Delete a descriptor.
id | frame number | |
descr | descriptor name |
Definition at line 3517 of file flames_midas_def.c.
References check, convert_to_fits(), frame_is_open(), get_descr_info(), invariant(), passure, and uves_propertylist_erase_regexp().
static int scdcop | ( | int | from, | |
int | to, | |||
int | mask, | |||
bool | copy_naxis | |||
) | [static] |
Copy descriptors from one frame to another.
from | file id of source frame | |
to | file id of destination frame | |
mask | copy_mask | |
copy_naxis | whether or not to propagate NAXIS keywords |
Depending on 'mask' the relevant descriptors are read from the source frame and written to the destination frame
1 - copy all descriptors 2 - copy only standard descriptors (see MIDAS env appendix E) 3 - copy all but standard descriptors 4 - copy single descriptor specified by parameter dsc 5 - copy all but extended list of standard descriptors
The FLAMES code uses only modes 1 and 3
Definition at line 3589 of file flames_midas_def.c.
References check, check_nomsg, flames_midas_scdwri(), frame_is_open(), invariant(), load_frame(), load_frame_header(), passure, uves_msg_debug, uves_propertylist_append(), uves_propertylist_copy_property_regexp(), uves_propertylist_get_int(), and uves_propertylist_get_size().
Referenced by flames_midas_scdcop(), and flames_midas_scdcop_nonaxis().
int flames_midas_scdcop | ( | int | from, | |
int | to, | |||
int | mask | |||
) |
Copy descriptors.
See scdcop()
Definition at line 3683 of file flames_midas_def.c.
References scdcop().
int flames_midas_scdcop_nonaxis | ( | int | from, | |
int | to, | |||
int | mask | |||
) |
Copy descriptors.
See scdcop()
Definition at line 3696 of file flames_midas_def.c.
References scdcop().
int flames_midas_sccsho | ( | const cpl_frameset * | catfile, | |
int * | noent, | |||
int * | last | |||
) |
Show size and type of a catalog.
catfile | catalog file | |
noent | (output) number of entries | |
last | (output) last entry no. |
Read and count active entries of catalog
Definition at line 3713 of file flames_midas_def.c.
References assure_nomsg.
int flames_midas_sccfnd | ( | const cpl_frameset * | catfile, | |
int | frmno, | |||
char * | frame | |||
) |
Find corresponding frame for given entry number.
catfile | catalog file | |
frmno | (output) frame number counting from 1 | |
frame | (output) frame filename |
Definition at line 3739 of file flames_midas_def.c.
References assure_nomsg, check, and uves_msg_debug.
int flames_midas_sccget | ( | const cpl_frameset * | catfile, | |
int | flag, | |||
char * | name, | |||
char * | ident, | |||
int * | no | |||
) |
Get next sequential entry from frame catalogue.
catfile | catalog file | |
flag | 0 for name only, 1 for name and identifier (tag) | |
name | (output) name of frame in next entry of catalog | |
ident | (output) identifier of that frame | |
no | (output) current/next entry number as input/output |
Return name and identifier of next entry in catalog; return a blank in name[0] if end of frameset.
Parameter 'no' has to be set to 0 in the first call of the routine.
Note: The returned ident string always has length 40
Definition at line 3777 of file flames_midas_def.c.
References assure_nomsg, check, check_nomsg, convert_to_fits(), uves_msg_debug, uves_propertylist_contains(), uves_propertylist_get_string(), and uves_propertylist_load().
int flames_midas_scccre | ( | cpl_frameset ** | catfile, | |
int | type, | |||
int | flag | |||
) |
Create a catalog.
catfile | (output) catalog. Must be deallocated by caller | |
type | type of files to use | |
flag | = 1 if file dirfile.cat exists |
Add an entry with given name and identification field to the catalog
If flag = 1, read each filename from ASCII file 'dirfile.dat', else create an empty catalog
Definition at line 3874 of file flames_midas_def.c.
References assure_nomsg.
int flames_midas_sccadd | ( | cpl_frameset * | catfile, | |
const char * | name, | |||
const char * | ident | |||
) |
Add catalog entry.
catfile | catalog file | |
name | name of frame to be added | |
ident | IDENT info of frame to be added |
Add an entry with given name and identification field to the catalog
If flag = 1, read each filename from ASCII file 'dirfile.dat', else create an empty catalog
Definition at line 3906 of file flames_midas_def.c.
References assure_nomsg.
static cpl_type table_dtype_to_cpltype | ( | int | dtype, | |
int | alen | |||
) | [static] |
Map MIDAS dtypes to CPL types.
dtype | MIDAS type to convert | |
alen | number of array elements |
Definition at line 3954 of file flames_midas_def.c.
References passure.
Referenced by flames_midas_tcbget(), and flames_midas_tccini().
static int sizeof_cpltype | ( | cpl_type | type | ) | [static] |
Get sizeof CPL types.
type | CPL type |
Definition at line 3991 of file flames_midas_def.c.
References uves_tostring_cpl_type().
Referenced by flames_midas_tcbget().
static int table_cpltype_to_dtype | ( | cpl_type | type | ) | [static] |
Map CPL types to MIDAS dtypes.
type | CPL type to convert |
Definition at line 4017 of file flames_midas_def.c.
References uves_tostring_cpl_type().
Referenced by flames_midas_tcbget(), and flames_midas_tcfget().
static const char* table_colname_from_number | ( | int | tid, | |
int | column | |||
) | [static] |
Convert table numer to name.
tid | table id | |
column | column by number (counting from 1) |
Definition at line 4045 of file flames_midas_def.c.
References check, frame_is_open(), invariant(), load_frame(), and passure.
Referenced by flames_midas_tcbget(), flames_midas_tcfget(), flames_midas_tclget(), flames_midas_tcuget(), tcerd(), and tcewr().
int flames_midas_tctopn | ( | const char * | name, | |
int | mode, | |||
int | allrow, | |||
int * | tid | |||
) |
Open table.
name | table name | |
mode | opening mode | |
allrow | number of rows to allocate, only for F_O_MODE | |
tid | (output) table identifier (try to keep it) |
Opens table file according to the desired mode. The opening mode can be F_I_MODE for input, F_D_MODE for descriptors only, F_IO_MODE for update.
Open mode can also be F_O_MODE for output.
Definition at line 4083 of file flames_midas_def.c.
References frame_is_open(), frame_new_table(), invariant(), passure, uves_msg_debug, and uves_propertylist_new().
int flames_midas_tctclo | ( | int | tid | ) |
Closes a table.
tid | table identifier |
Definition at line 4144 of file flames_midas_def.c.
References frame_close().
int flames_midas_tccser | ( | int | tid, | |
const char * | colref, | |||
int * | column | |||
) |
Search column by reference.
tid | table id | |
colref | column reference | |
column | (output) column number |
The column may *not* be designated as number or :name, only name.
Sequential search for the column label. The routine returns the column number as the last argument or -1 if the column is not found.
Definition at line 4164 of file flames_midas_def.c.
References check, frame_is_open(), invariant(), load_frame(), passure, and uves_msg_warning.
Referenced by flames_midas_tclser().
int flames_midas_tciget | ( | int | tid, | |
int * | column, | |||
int * | row | |||
) |
Reads table size information.
tid | table id | |
column | (output) number of columns | |
row | (output) number of rows |
Definition at line 4216 of file flames_midas_def.c.
References check, frame_is_open(), invariant(), load_frame(), and passure.
int flames_midas_tcbget | ( | int | tid, | |
int | column, | |||
int * | dtype, | |||
int * | items, | |||
int * | bytes | |||
) |
Reads binary storage characteristics of column.
tid | table id | |
column | column number | |
dtype | (output) datatype | |
items | (output) array size bytes (output) storage required |
The routine returns the datatype (one of the D_xx_FORMAT), the number of items (arrays), and the number of bytes required for the binary storage.
Definition at line 4252 of file flames_midas_def.c.
References check_nomsg, sizeof_cpltype(), table_colname_from_number(), table_cpltype_to_dtype(), and table_dtype_to_cpltype().
int flames_midas_tcdget | ( | int | tid, | |
int * | store | |||
) |
Reads table storage format (F_TRANS or F_RECORD).
tid | table id | |
store | (output) physical format on disk |
Definition at line 4292 of file flames_midas_def.c.
int flames_midas_tcfget | ( | int | tid, | |
int | column, | |||
char * | form, | |||
int * | dtype | |||
) |
Reads column format.
tid | table id | |
column | column number | |
form | (output) column format | |
dtype | (output) data type |
Definition at line 4310 of file flames_midas_def.c.
References check_nomsg, table_colname_from_number(), and table_cpltype_to_dtype().
int flames_midas_tclget | ( | int | tid, | |
int | column, | |||
char * | label | |||
) |
Reads column label.
tid | table id | |
column | column number | |
label | (output) label name |
Definition at line 4337 of file flames_midas_def.c.
References check_nomsg, and table_colname_from_number().
int flames_midas_tcuget | ( | int | tid, | |
int | column, | |||
char * | unit | |||
) |
Reads column unit.
tid | table id | |
column | column number | |
unit | (output) unit name |
Definition at line 4360 of file flames_midas_def.c.
References check_nomsg, and table_colname_from_number().
int flames_midas_tclser | ( | int | tid, | |
const char * | label, | |||
int * | column | |||
) |
Searches the sequential number of the column having the given label, case insensitive.
tid | table id | |
label | (output) label name | |
column | (output) column number (-1 if column not found) |
Definition at line 4386 of file flames_midas_def.c.
References flames_midas_tccser().
int flames_midas_tccini | ( | int | tid, | |
int | dtype, | |||
int | alen, | |||
const char * | form, | |||
const char * | unit, | |||
const char * | label, | |||
int * | column | |||
) |
Initializes table column.
tid | table id | |
dtype | column data type (one of the D_xx_FORMAT) | |
alen | number of array elements | |
form | column format (is not used by FLAMES code) | |
unit | column unit | |
label | column label | |
column | (output) column number |
Elements in the column are initialized as undefined (null values).
Checks if column has been already defined, otherwise add the new column descriptors. The routine provides an overflow mechanism when the new column exceeds the allocated space
Definition at line 4417 of file flames_midas_def.c.
References check, check_nomsg, frame_is_open(), invariant(), load_frame(), passure, table_dtype_to_cpltype(), and uves_msg_debug.
static int tcerd | ( | cpl_type | type, | |
int | tid, | |||
int | row, | |||
int | column, | |||
void * | value, | |||
int * | null | |||
) | [static] |
Reads table element.
type | column type | |
tid | table id | |
row | row number counting from 1 | |
column | column number | |
value | (output) actual values | |
null | (output) if non-NULL, null flag |
Finds the element position and convert data type if required. Only the FIRST value is read for arrays
Definition at line 4485 of file flames_midas_def.c.
References check_nomsg, table_colname_from_number(), and uves_tostring_cpl_type().
Referenced by flames_midas_tcerdc(), flames_midas_tcerdd(), flames_midas_tcerdi(), flames_midas_tcerdr(), and tcard().
int flames_midas_tcerdc | ( | int | tid, | |
int | row, | |||
int | column, | |||
char * | values, | |||
int * | null | |||
) |
Finds the element position and convert data type if required. Arrays are edited with a comma between elements.
Definition at line 4552 of file flames_midas_def.c.
References tcerd().
int flames_midas_tcerdi | ( | int | tid, | |
int | row, | |||
int | column, | |||
int * | value, | |||
int * | null | |||
) |
int flames_midas_tcerdr | ( | int | tid, | |
int | row, | |||
int | column, | |||
float * | value, | |||
int * | null | |||
) |
int flames_midas_tcerdd | ( | int | tid, | |
int | row, | |||
int | column, | |||
double * | value, | |||
int * | null | |||
) |
static int tcewr | ( | cpl_type | type, | |
int | tid, | |||
int | row, | |||
int | column, | |||
const void * | value | |||
) | [static] |
Write table element.
type | column type | |
tid | table id | |
row | row number | |
column | column number | |
value | actual value |
Finds the element position and convert data type if required. Only the FIRST value is written for arrays
Definition at line 4601 of file flames_midas_def.c.
References check_nomsg, table_colname_from_number(), and uves_tostring_cpl_type().
Referenced by flames_midas_tcewrc(), flames_midas_tcewrd(), flames_midas_tcewri(), flames_midas_tcewrr(), and tcawr().
int flames_midas_tcewrc | ( | int | tid, | |
int | row, | |||
int | column, | |||
const char * | value | |||
) |
Finds the element position and convert data type if required. Element in an array must be separated by comma
Definition at line 4653 of file flames_midas_def.c.
References tcewr().
int flames_midas_tcewrd | ( | int | tid, | |
int | row, | |||
int | column, | |||
const double * | value | |||
) |
int flames_midas_tcewri | ( | int | tid, | |
int | row, | |||
int | column, | |||
const int * | value | |||
) |
int flames_midas_tcewrr | ( | int | tid, | |
int | row, | |||
int | column, | |||
const float * | value | |||
) |
static int tcard | ( | cpl_type | type, | |
int | tid, | |||
int | row, | |||
int | column, | |||
int | index, | |||
int | items, | |||
void * | value | |||
) | [static] |
Definition at line 4694 of file flames_midas_def.c.
References tcerd().
Referenced by flames_midas_tcardc(), flames_midas_tcardd(), flames_midas_tcardi(), and flames_midas_tcardr().
int flames_midas_tcardc | ( | int | tid, | |
int | row, | |||
int | col, | |||
int | index, | |||
int | items, | |||
char * | value | |||
) |
Reads table elements as a character string. Arrays are edited with a comma between elements.
tid | table id | |
row | row number | |
col | column number | |
index | index number | |
items | how many | |
value | (out) actual values |
Definition at line 4722 of file flames_midas_def.c.
References tcard().
int flames_midas_tcardd | ( | int | tid, | |
int | row, | |||
int | col, | |||
int | index, | |||
int | items, | |||
double * | value | |||
) |
Reads table elements as a double precision value.
tid | table id | |
row | row number | |
col | column number | |
index | index number | |
items | how many | |
value | (out) actual values |
Definition at line 4739 of file flames_midas_def.c.
References tcard().
int flames_midas_tcardi | ( | int | tid, | |
int | row, | |||
int | col, | |||
int | index, | |||
int | items, | |||
int * | value | |||
) |
int flames_midas_tcardr | ( | int | tid, | |
int | row, | |||
int | col, | |||
int | index, | |||
int | items, | |||
float * | value | |||
) |
static int tcawr | ( | cpl_type | type, | |
int | tid, | |||
int | row, | |||
int | col, | |||
int | index, | |||
int | items, | |||
const void * | value | |||
) | [static] |
Definition at line 4771 of file flames_midas_def.c.
References tcewr().
Referenced by flames_midas_tcawrc(), flames_midas_tcawrd(), flames_midas_tcawri(), and flames_midas_tcawrr().
int flames_midas_tcawrc | ( | int | tid, | |
int | row, | |||
int | col, | |||
int | index, | |||
int | items, | |||
const char * | value | |||
) |
Writes table element, character string format.
tid | table id | |
row | row number | |
col | column number | |
index | index number | |
items | how many | |
value | (out) actual value |
Definition at line 4797 of file flames_midas_def.c.
References tcawr().
int flames_midas_tcawrd | ( | int | tid, | |
int | row, | |||
int | col, | |||
int | index, | |||
int | items, | |||
const double * | value | |||
) |
Writes table element, double precision argument.
tid | table id | |
row | row number | |
col | column number | |
index | index number | |
items | how many | |
value | (out) actual value |
Definition at line 4813 of file flames_midas_def.c.
References tcawr().
int flames_midas_tcawri | ( | int | tid, | |
int | row, | |||
int | col, | |||
int | index, | |||
int | items, | |||
const int * | value | |||
) |
int flames_midas_tcawrr | ( | int | tid, | |
int | row, | |||
int | col, | |||
int | index, | |||
int | items, | |||
const float * | value | |||
) |
int flames_midas_tcsget | ( | int | tid, | |
int | row, | |||
int * | value | |||
) |
Reads row selection flag.
tid | table id | |
row | row number | |
value | (output) selection flag (1 if selected) |
Definition at line 4846 of file flames_midas_def.c.
References check, frame_is_open(), invariant(), load_frame(), and passure.
int flames_midas_tcsput | ( | int | tid, | |
int | row, | |||
const int * | value | |||
) |
Writes row selection flag.
tid | table id | |
row | row number | |
value | selection flag (1 if selected) |
Definition at line 4878 of file flames_midas_def.c.
References check, frame_is_open(), invariant(), load_frame(), and passure.