SDDSlib
|
Converts numeric columns, parameters, or arrays in SDDS files from one datatype to another. More...
Go to the source code of this file.
Classes | |
struct | CAST_NAME |
struct | CAST_REQUEST |
Macros | |
#define | COLUMN_MODE 0 |
#define | PARAMETER_MODE 1 |
#define | ARRAY_MODE 2 |
#define | MODES 3 |
#define | CLO_SHORT 0 |
#define | CLO_USHORT 1 |
#define | CLO_LONG 2 |
#define | CLO_ULONG 3 |
#define | CLO_LONG64 4 |
#define | CLO_ULONG64 5 |
#define | CLO_FLOAT 6 |
#define | CLO_DOUBLE 7 |
#define | CLO_LONGDOUBLE 8 |
#define | TYPES 9 |
Enumerations | |
enum | option_type { SET_CAST , SET_NOWARNINGS , SET_PIPE , SET_MAJOR_ORDER , N_OPTIONS } |
Functions | |
void | process_cast_columns (SDDS_DATASET *SDDS_input, CAST_NAME *column_cast, CAST_REQUEST *col_request, long col_requests, long noWarnings) |
void | process_cast_parameters (SDDS_DATASET *SDDS_input, CAST_NAME *parameter_cast, CAST_REQUEST *par_request, long par_requests, long noWarnings) |
void | process_cast_arrays (SDDS_DATASET *SDDS_input, CAST_NAME *array_cast, CAST_REQUEST *array_request, long array_requests, long noWarnings) |
long | add_casts (char *old_type, long sdds_type, CAST_NAME *cast_name, char *add_name, char *new_type, long index, long noWarnings) |
void | cleanUpCast (CAST_NAME *cast_name) |
int | main (int argc, char **argv) |
Variables | |
static char * | mode_name [MODES] |
char * | option [N_OPTIONS] |
char * | types [TYPES] |
char * | USAGE |
Converts numeric columns, parameters, or arrays in SDDS files from one datatype to another.
This program allows users to cast the data types of columns, parameters, or arrays within SDDS (Self Describing Data Sets) files. It supports various numeric types and provides options for handling warnings, piping input/output, and setting data ordering.
<source-file>
: Path to the input SDDS file. If omitted, standard input is used.<target-file>
: Path to the output SDDS file. If omitted, standard output is used.-pipe=<input>,<output>
: Specify input and/or output pipes.-noWarnings
: Suppress warning messages.-cast=<mode>,<columnNames>,<typeNames>,<newType>
:<mode>
: One of column
, parameter
, or array
.<columnNames>
: Comma-separated list of column/parameter/array names, optionally with wildcards or enclosed in parentheses.<typeNames>
: Comma-separated list of current types corresponding to <columnNames>
. Supports types like long
, ulong
, long64
, ulong64
, short
, ushort
, longdouble
, double
, float
, or *
for any type.<newType>
: The target datatype. Must be one of long
, ulong
, long64
, ulong64
, short
, ushort
, longdouble
, double
, or float
.double
: <newType>
is compatible with the original datatype to prevent data loss or corruption.Definition in file sddscast.c.
#define ARRAY_MODE 2 |
Definition at line 57 of file sddscast.c.
#define CLO_DOUBLE 7 |
Definition at line 89 of file sddscast.c.
#define CLO_FLOAT 6 |
Definition at line 88 of file sddscast.c.
#define CLO_LONG 2 |
Definition at line 84 of file sddscast.c.
#define CLO_LONG64 4 |
Definition at line 86 of file sddscast.c.
#define CLO_LONGDOUBLE 8 |
Definition at line 90 of file sddscast.c.
#define CLO_SHORT 0 |
Definition at line 82 of file sddscast.c.
#define CLO_ULONG 3 |
Definition at line 85 of file sddscast.c.
#define CLO_ULONG64 5 |
Definition at line 87 of file sddscast.c.
#define CLO_USHORT 1 |
Definition at line 83 of file sddscast.c.
#define COLUMN_MODE 0 |
Definition at line 55 of file sddscast.c.
#define MODES 3 |
Definition at line 58 of file sddscast.c.
#define PARAMETER_MODE 1 |
Definition at line 56 of file sddscast.c.
#define TYPES 9 |
Definition at line 91 of file sddscast.c.
enum option_type |
Definition at line 67 of file sddscast.c.
long add_casts | ( | char * | old_type, |
long | sdds_type, | ||
CAST_NAME * | cast_name, | ||
char * | add_name, | ||
char * | new_type, | ||
long | index, | ||
long | noWarnings ) |
Definition at line 552 of file sddscast.c.
void cleanUpCast | ( | CAST_NAME * | cast_name | ) |
Definition at line 316 of file sddscast.c.
int main | ( | int | argc, |
char ** | argv ) |
Definition at line 144 of file sddscast.c.
void process_cast_arrays | ( | SDDS_DATASET * | SDDS_input, |
CAST_NAME * | array_cast, | ||
CAST_REQUEST * | array_request, | ||
long | array_requests, | ||
long | noWarnings ) |
Definition at line 481 of file sddscast.c.
void process_cast_columns | ( | SDDS_DATASET * | SDDS_input, |
CAST_NAME * | column_cast, | ||
CAST_REQUEST * | col_request, | ||
long | col_requests, | ||
long | noWarnings ) |
Definition at line 332 of file sddscast.c.
void process_cast_parameters | ( | SDDS_DATASET * | SDDS_input, |
CAST_NAME * | parameter_cast, | ||
CAST_REQUEST * | par_request, | ||
long | par_requests, | ||
long | noWarnings ) |
Definition at line 404 of file sddscast.c.
|
static |
Definition at line 60 of file sddscast.c.
char* option[N_OPTIONS] |
Definition at line 75 of file sddscast.c.
char* types[TYPES] |
Definition at line 93 of file sddscast.c.
char* USAGE |
Definition at line 118 of file sddscast.c.