SDDSlib
Loading...
Searching...
No Matches
SDDS_data.c File Reference

Defines global data arrays used by SDDS (Self Describing Data Sets) routines. More...

#include "SDDS.h"
#include "SDDS_internal.h"
#include <stddef.h>

Go to the source code of this file.

Variables

char * SDDS_data_mode [SDDS_NUM_DATA_MODES]
 Array of supported data modes.
 
char * SDDS_type_name [SDDS_NUM_TYPES]
 Array of supported data type names.
 
int32_t SDDS_type_size [SDDS_NUM_TYPES]
 Array of sizes for each supported data type.
 
char * SDDS_command [SDDS_NUM_COMMANDS]
 Array of supported SDDS command names.
 
SDDS_FIELD_INFORMATION SDDS_DescriptionFieldInformation [SDDS_DESCRIPTION_FIELDS]
 Field information for SDDS layout descriptions.
 
SDDS_ENUM_PAIR dataModeEnumPair [3]
 Enumeration pairs for data modes.
 
SDDS_ENUM_PAIR dataEndianEnumPair [3]
 Enumeration pairs for data endianness.
 
SDDS_ENUM_PAIR typeEnumPair [SDDS_NUM_TYPES+1]
 Enumeration pairs for data types.
 
SDDS_FIELD_INFORMATION SDDS_DataFieldInformation [SDDS_DATA_FIELDS]
 Field information for data mode settings.
 
SDDS_FIELD_INFORMATION SDDS_ArrayFieldInformation [SDDS_ARRAY_FIELDS]
 Field information for array definitions.
 
SDDS_FIELD_INFORMATION SDDS_ColumnFieldInformation [SDDS_COLUMN_FIELDS]
 Field information for column definitions.
 
SDDS_FIELD_INFORMATION SDDS_ParameterFieldInformation [SDDS_PARAMETER_FIELDS]
 Field information for parameter definitions.
 
SDDS_FIELD_INFORMATION SDDS_AssociateFieldInformation [SDDS_ASSOCIATE_FIELDS]
 Field information for associate definitions.
 
SDDS_FIELD_INFORMATION SDDS_IncludeFieldInformation [SDDS_INCLUDE_FIELDS]
 Field information for include directives.
 

Detailed Description

Defines global data arrays used by SDDS (Self Describing Data Sets) routines.

This file declares and initializes global data arrays utilized by the SDDS library's various routines. These arrays include data mode identifiers, type names and sizes, command names, and field information structures for descriptions, data modes, arrays, columns, parameters, associates, and includes.

License
This file is distributed under the terms of the Software License Agreement found in the file LICENSE included with this distribution.
Authors
M. Borland, C. Saunders, R. Soliday

Definition in file SDDS_data.c.

Variable Documentation

◆ dataEndianEnumPair

SDDS_ENUM_PAIR dataEndianEnumPair[3]
Initial value:
= {
{"big", SDDS_BIGENDIAN},
{"little", SDDS_LITTLEENDIAN},
{NULL, 0},
}

Enumeration pairs for data endianness.

Associates string representations of endianness with their corresponding SDDS enumeration values.

Definition at line 128 of file SDDS_data.c.

128 {
129 {"big", SDDS_BIGENDIAN},
130 {"little", SDDS_LITTLEENDIAN},
131 {NULL, 0},
132};

◆ dataModeEnumPair

SDDS_ENUM_PAIR dataModeEnumPair[3]
Initial value:
= {
{"binary", SDDS_BINARY},
{"ascii", SDDS_ASCII},
{NULL, 0},
}

Enumeration pairs for data modes.

Associates string representations of data modes with their corresponding SDDS enumeration values.

Definition at line 117 of file SDDS_data.c.

117 {
118 {"binary", SDDS_BINARY},
119 {"ascii", SDDS_ASCII},
120 {NULL, 0},
121};

◆ SDDS_ArrayFieldInformation

SDDS_FIELD_INFORMATION SDDS_ArrayFieldInformation[SDDS_ARRAY_FIELDS]
Initial value:
= {
{"name", offsetof(ARRAY_DEFINITION, name), SDDS_STRING, NULL},
{"symbol", offsetof(ARRAY_DEFINITION, symbol), SDDS_STRING, NULL},
{"units", offsetof(ARRAY_DEFINITION, units), SDDS_STRING, NULL},
{"description", offsetof(ARRAY_DEFINITION, description), SDDS_STRING, NULL},
{"format_string", offsetof(ARRAY_DEFINITION, format_string), SDDS_STRING, NULL},
{"group_name", offsetof(ARRAY_DEFINITION, group_name), SDDS_STRING, NULL},
{"type", offsetof(ARRAY_DEFINITION, type), SDDS_LONG, typeEnumPair},
{"field_length", offsetof(ARRAY_DEFINITION, field_length), SDDS_LONG, NULL},
{"dimensions", offsetof(ARRAY_DEFINITION, dimensions), SDDS_LONG, NULL},
}
SDDS_ENUM_PAIR typeEnumPair[SDDS_NUM_TYPES+1]
Enumeration pairs for data types.
Definition SDDS_data.c:139
#define SDDS_STRING
Identifier for the string data type.
Definition SDDStypes.h:85
#define SDDS_LONG
Identifier for the signed 32-bit integer data type.
Definition SDDStypes.h:61

Field information for array definitions.

Maps each array field name to its offset within the ARRAY_DEFINITION structure, along with the corresponding data type and any associated enumeration pairs.

Definition at line 175 of file SDDS_data.c.

175 {
176 {"name", offsetof(ARRAY_DEFINITION, name), SDDS_STRING, NULL},
177 {"symbol", offsetof(ARRAY_DEFINITION, symbol), SDDS_STRING, NULL},
178 {"units", offsetof(ARRAY_DEFINITION, units), SDDS_STRING, NULL},
179 {"description", offsetof(ARRAY_DEFINITION, description), SDDS_STRING, NULL},
180 {"format_string", offsetof(ARRAY_DEFINITION, format_string), SDDS_STRING, NULL},
181 {"group_name", offsetof(ARRAY_DEFINITION, group_name), SDDS_STRING, NULL},
182 {"type", offsetof(ARRAY_DEFINITION, type), SDDS_LONG, typeEnumPair},
183 {"field_length", offsetof(ARRAY_DEFINITION, field_length), SDDS_LONG, NULL},
184 {"dimensions", offsetof(ARRAY_DEFINITION, dimensions), SDDS_LONG, NULL},
185};

◆ SDDS_AssociateFieldInformation

SDDS_FIELD_INFORMATION SDDS_AssociateFieldInformation[SDDS_ASSOCIATE_FIELDS]
Initial value:
= {
{"name", offsetof(ASSOCIATE_DEFINITION, name), SDDS_STRING},
{"filename", offsetof(ASSOCIATE_DEFINITION, filename), SDDS_STRING},
{"path", offsetof(ASSOCIATE_DEFINITION, path), SDDS_STRING},
{"description", offsetof(ASSOCIATE_DEFINITION, description), SDDS_STRING},
{"contents", offsetof(ASSOCIATE_DEFINITION, contents), SDDS_STRING},
{"sdds", offsetof(ASSOCIATE_DEFINITION, sdds), SDDS_LONG},
}

Field information for associate definitions.

Maps each associate field name to its offset within the ASSOCIATE_DEFINITION structure, along with the corresponding data type and any associated enumeration pairs.

Definition at line 225 of file SDDS_data.c.

225 {
226 {"name", offsetof(ASSOCIATE_DEFINITION, name), SDDS_STRING},
227 {"filename", offsetof(ASSOCIATE_DEFINITION, filename), SDDS_STRING},
228 {"path", offsetof(ASSOCIATE_DEFINITION, path), SDDS_STRING},
229 {"description", offsetof(ASSOCIATE_DEFINITION, description), SDDS_STRING},
230 {"contents", offsetof(ASSOCIATE_DEFINITION, contents), SDDS_STRING},
231 {"sdds", offsetof(ASSOCIATE_DEFINITION, sdds), SDDS_LONG},
232};

◆ SDDS_ColumnFieldInformation

SDDS_FIELD_INFORMATION SDDS_ColumnFieldInformation[SDDS_COLUMN_FIELDS]
Initial value:
= {
{"name", offsetof(COLUMN_DEFINITION, name), SDDS_STRING},
{"symbol", offsetof(COLUMN_DEFINITION, symbol), SDDS_STRING},
{"units", offsetof(COLUMN_DEFINITION, units), SDDS_STRING},
{"description", offsetof(COLUMN_DEFINITION, description), SDDS_STRING},
{"format_string", offsetof(COLUMN_DEFINITION, format_string), SDDS_STRING},
{"type", offsetof(COLUMN_DEFINITION, type), SDDS_LONG, typeEnumPair},
{"field_length", offsetof(COLUMN_DEFINITION, field_length), SDDS_LONG},
}

Field information for column definitions.

Maps each column field name to its offset within the COLUMN_DEFINITION structure, along with the corresponding data type and any associated enumeration pairs.

Definition at line 193 of file SDDS_data.c.

193 {
194 {"name", offsetof(COLUMN_DEFINITION, name), SDDS_STRING},
195 {"symbol", offsetof(COLUMN_DEFINITION, symbol), SDDS_STRING},
196 {"units", offsetof(COLUMN_DEFINITION, units), SDDS_STRING},
197 {"description", offsetof(COLUMN_DEFINITION, description), SDDS_STRING},
198 {"format_string", offsetof(COLUMN_DEFINITION, format_string), SDDS_STRING},
199 {"type", offsetof(COLUMN_DEFINITION, type), SDDS_LONG, typeEnumPair},
200 {"field_length", offsetof(COLUMN_DEFINITION, field_length), SDDS_LONG},
201};

◆ SDDS_command

char* SDDS_command[SDDS_NUM_COMMANDS]
Initial value:
= {
"description",
"column",
"parameter",
"associate",
"data",
"include",
"array",
}

Array of supported SDDS command names.

Lists the command strings that can be used within SDDS files to define structure and data.

Definition at line 81 of file SDDS_data.c.

81 {
82 "description",
83 "column",
84 "parameter",
85 "associate",
86 "data",
87 "include",
88 "array",
89};

◆ SDDS_data_mode

char* SDDS_data_mode[SDDS_NUM_DATA_MODES]
Initial value:
= {
"binary",
"ascii"
}

Array of supported data modes.

Contains the string representations of the different data modes supported by SDDS, such as "binary" and "ascii".

Definition at line 33 of file SDDS_data.c.

33 {
34 "binary",
35 "ascii"
36};

◆ SDDS_DataFieldInformation

SDDS_FIELD_INFORMATION SDDS_DataFieldInformation[SDDS_DATA_FIELDS]
Initial value:
= {
{"mode", offsetof(DATA_MODE, mode), SDDS_LONG, dataModeEnumPair},
{"lines_per_row", offsetof(DATA_MODE, lines_per_row), SDDS_LONG, NULL},
{"no_row_counts", offsetof(DATA_MODE, no_row_counts), SDDS_LONG, NULL},
{"fixed_row_count", offsetof(DATA_MODE, fixed_row_count), SDDS_LONG, NULL},
{"additional_header_lines", offsetof(DATA_MODE, additional_header_lines), SDDS_LONG, NULL},
{"column_major_order", offsetof(DATA_MODE, column_major), SDDS_SHORT, NULL},
{"endian", offsetof(DATA_MODE, endian), SDDS_LONG, dataEndianEnumPair},
}
SDDS_ENUM_PAIR dataModeEnumPair[3]
Enumeration pairs for data modes.
Definition SDDS_data.c:117
SDDS_ENUM_PAIR dataEndianEnumPair[3]
Enumeration pairs for data endianness.
Definition SDDS_data.c:128
#define SDDS_SHORT
Identifier for the signed short integer data type.
Definition SDDStypes.h:73

Field information for data mode settings.

Maps each data mode field name to its offset within the DATA_MODE structure, along with the corresponding data type and any associated enumeration pairs.

Definition at line 159 of file SDDS_data.c.

159 {
160 {"mode", offsetof(DATA_MODE, mode), SDDS_LONG, dataModeEnumPair},
161 {"lines_per_row", offsetof(DATA_MODE, lines_per_row), SDDS_LONG, NULL},
162 {"no_row_counts", offsetof(DATA_MODE, no_row_counts), SDDS_LONG, NULL},
163 {"fixed_row_count", offsetof(DATA_MODE, fixed_row_count), SDDS_LONG, NULL},
164 {"additional_header_lines", offsetof(DATA_MODE, additional_header_lines), SDDS_LONG, NULL},
165 {"column_major_order", offsetof(DATA_MODE, column_major), SDDS_SHORT, NULL},
166 {"endian", offsetof(DATA_MODE, endian), SDDS_LONG, dataEndianEnumPair},
167};

◆ SDDS_DescriptionFieldInformation

SDDS_FIELD_INFORMATION SDDS_DescriptionFieldInformation[SDDS_DESCRIPTION_FIELDS]
Initial value:
= {
{"text", offsetof(SDDS_LAYOUT, description), SDDS_STRING, NULL},
{"contents", offsetof(SDDS_LAYOUT, contents), SDDS_STRING, NULL},
}

Field information for SDDS layout descriptions.

Maps each description field name to its offset within the SDDS_LAYOUT structure, along with the corresponding data type and any associated enumeration pairs.

Definition at line 107 of file SDDS_data.c.

107 {
108 {"text", offsetof(SDDS_LAYOUT, description), SDDS_STRING, NULL},
109 {"contents", offsetof(SDDS_LAYOUT, contents), SDDS_STRING, NULL},
110};

◆ SDDS_IncludeFieldInformation

SDDS_FIELD_INFORMATION SDDS_IncludeFieldInformation[SDDS_INCLUDE_FIELDS]
Initial value:
= {
{"filename", 0, SDDS_STRING},
}

Field information for include directives.

Maps each include field name to its offset within the INCLUDE_DEFINITION structure, along with the corresponding data type.

Definition at line 240 of file SDDS_data.c.

240 {
241 {"filename", 0, SDDS_STRING},
242};

◆ SDDS_ParameterFieldInformation

SDDS_FIELD_INFORMATION SDDS_ParameterFieldInformation[SDDS_PARAMETER_FIELDS]
Initial value:
= {
{"name", offsetof(PARAMETER_DEFINITION, name), SDDS_STRING},
{"symbol", offsetof(PARAMETER_DEFINITION, symbol), SDDS_STRING},
{"units", offsetof(PARAMETER_DEFINITION, units), SDDS_STRING},
{"description", offsetof(PARAMETER_DEFINITION, description), SDDS_STRING},
{"format_string", offsetof(PARAMETER_DEFINITION, format_string), SDDS_STRING},
{"type", offsetof(PARAMETER_DEFINITION, type), SDDS_LONG, typeEnumPair},
{"fixed_value", offsetof(PARAMETER_DEFINITION, fixed_value), SDDS_STRING},
}

Field information for parameter definitions.

Maps each parameter field name to its offset within the PARAMETER_DEFINITION structure, along with the corresponding data type and any associated enumeration pairs.

Definition at line 209 of file SDDS_data.c.

209 {
210 {"name", offsetof(PARAMETER_DEFINITION, name), SDDS_STRING},
211 {"symbol", offsetof(PARAMETER_DEFINITION, symbol), SDDS_STRING},
212 {"units", offsetof(PARAMETER_DEFINITION, units), SDDS_STRING},
213 {"description", offsetof(PARAMETER_DEFINITION, description), SDDS_STRING},
214 {"format_string", offsetof(PARAMETER_DEFINITION, format_string), SDDS_STRING},
215 {"type", offsetof(PARAMETER_DEFINITION, type), SDDS_LONG, typeEnumPair},
216 {"fixed_value", offsetof(PARAMETER_DEFINITION, fixed_value), SDDS_STRING},
217};

◆ SDDS_type_name

char* SDDS_type_name[SDDS_NUM_TYPES]
Initial value:
= {
"longdouble",
"double",
"float",
"long64",
"ulong64",
"long",
"ulong",
"short",
"ushort",
"string",
"character"
}

Array of supported data type names.

Lists the string names corresponding to each data type supported by SDDS.

Definition at line 43 of file SDDS_data.c.

43 {
44 "longdouble",
45 "double",
46 "float",
47 "long64",
48 "ulong64",
49 "long",
50 "ulong",
51 "short",
52 "ushort",
53 "string",
54 "character"
55};

◆ SDDS_type_size

int32_t SDDS_type_size[SDDS_NUM_TYPES]
Initial value:
= {
sizeof(long double),
sizeof(double),
sizeof(float),
sizeof(int64_t),
sizeof(uint64_t),
sizeof(int32_t),
sizeof(uint32_t),
sizeof(short),
sizeof(unsigned short),
sizeof(char *),
sizeof(char)
}

Array of sizes for each supported data type.

Stores the size in bytes for each data type defined in SDDS_TYPE.

Definition at line 62 of file SDDS_data.c.

62 {
63 sizeof(long double),
64 sizeof(double),
65 sizeof(float),
66 sizeof(int64_t),
67 sizeof(uint64_t),
68 sizeof(int32_t),
69 sizeof(uint32_t),
70 sizeof(short),
71 sizeof(unsigned short),
72 sizeof(char *),
73 sizeof(char)
74};

◆ typeEnumPair

SDDS_ENUM_PAIR typeEnumPair[SDDS_NUM_TYPES+1]
Initial value:
= {
{"longdouble", SDDS_LONGDOUBLE},
{"double", SDDS_DOUBLE},
{"float", SDDS_FLOAT},
{"long64", SDDS_LONG64},
{"ulong64", SDDS_ULONG64},
{"long", SDDS_LONG},
{"ulong", SDDS_ULONG},
{"short", SDDS_SHORT},
{"ushort", SDDS_USHORT},
{"string", SDDS_STRING},
{"character", SDDS_CHARACTER},
{NULL, 0}}
#define SDDS_ULONG
Identifier for the unsigned 32-bit integer data type.
Definition SDDStypes.h:67
#define SDDS_FLOAT
Identifier for the float data type.
Definition SDDStypes.h:43
#define SDDS_ULONG64
Identifier for the unsigned 64-bit integer data type.
Definition SDDStypes.h:55
#define SDDS_CHARACTER
Identifier for the character data type.
Definition SDDStypes.h:91
#define SDDS_USHORT
Identifier for the unsigned short integer data type.
Definition SDDStypes.h:79
#define SDDS_DOUBLE
Identifier for the double data type.
Definition SDDStypes.h:37
#define SDDS_LONGDOUBLE
Identifier for the long double data type.
Definition SDDStypes.h:31
#define SDDS_LONG64
Identifier for the signed 64-bit integer data type.
Definition SDDStypes.h:49

Enumeration pairs for data types.

Associates string representations of data types with their corresponding SDDS enumeration values.

Definition at line 139 of file SDDS_data.c.

139 {
140 {"longdouble", SDDS_LONGDOUBLE},
141 {"double", SDDS_DOUBLE},
142 {"float", SDDS_FLOAT},
143 {"long64", SDDS_LONG64},
144 {"ulong64", SDDS_ULONG64},
145 {"long", SDDS_LONG},
146 {"ulong", SDDS_ULONG},
147 {"short", SDDS_SHORT},
148 {"ushort", SDDS_USHORT},
149 {"string", SDDS_STRING},
150 {"character", SDDS_CHARACTER},
151 {NULL, 0}};