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

Example program demonstrating how to write data to an SDDS file using various data types. More...

#include <stdio.h>
#include "SDDS.h"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 Main function to write data to an SDDS file.
 

Detailed Description

Example program demonstrating how to write data to an SDDS file using various data types.

This program initializes an SDDS table, defines parameters, arrays, and columns with different data types, writes two pages of data, and then terminates the SDDS table.

Definition in file sdds_write_demo.c.

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Main function to write data to an SDDS file.

Parameters
argcArgument count.
argvArgument vector.
Returns
Returns 0 on success, 1 on failure.

< SDDS table structure for data output.

Initialize SDDS output

Define parameters for the SDDS table.

Parameters are scalar values associated with each page.

Define arrays for the SDDS table.

Arrays are multidimensional data structures associated with each page.

Define columns for the SDDS table.

Columns are data structures associated with each row of data.

Write the layout (definitions) to the SDDS file

Start the first page with 5 rows

Set parameters for the first page.

Parameters are scalar values that apply to the entire page.

Data for arrays on the first page.

Arrays can have multiple dimensions and are associated with each page.

< Dimensions for 1D arrays

< Dimensions for 2D arrays

Set arrays for the first page

Data for columns on the first page.

Columns represent data for each row.

< Number of rows in the first page

Set columns for the first page

Write the first page to the SDDS file

Start the second page with 3 rows

Set parameters for the second page.

Data for arrays on the second page.

< Update dimensions for 1D arrays

< Update dimensions for 2D arrays

Set arrays for the second page

Data for columns on the second page.

< Number of rows in the second page

Set columns for the second page

Write the second page to the SDDS file

Terminate the SDDS table

Definition at line 19 of file sdds_write_demo.c.

19 {
20 SDDS_TABLE SDDS_table; /**< SDDS table structure for data output. */
21
22 /** Initialize SDDS output */
23 if (!SDDS_InitializeOutput(&SDDS_table, SDDS_BINARY, 1, "Example SDDS Output",
24 "SDDS Example", "example.sdds")) {
25 fprintf(stderr, "Error initializing SDDS output.\n");
26 return 1;
27 }
28
29 /**
30 * Define parameters for the SDDS table.
31 *
32 * Parameters are scalar values associated with each page.
33 */
34 if (
35 SDDS_DefineParameter(&SDDS_table, "shortParam", NULL, NULL, NULL, NULL, SDDS_SHORT, NULL) == -1 ||
36 SDDS_DefineParameter(&SDDS_table, "ushortParam", NULL, NULL, NULL, NULL, SDDS_USHORT, NULL) == -1 ||
37 SDDS_DefineParameter(&SDDS_table, "longParam", NULL, NULL, NULL, NULL, SDDS_LONG, NULL) == -1 ||
38 SDDS_DefineParameter(&SDDS_table, "ulongParam", NULL, NULL, NULL, NULL, SDDS_ULONG, NULL) == -1 ||
39 SDDS_DefineParameter(&SDDS_table, "long64Param", NULL, NULL, NULL, NULL, SDDS_LONG64, NULL) == -1 ||
40 SDDS_DefineParameter(&SDDS_table, "ulong64Param", NULL, NULL, NULL, NULL, SDDS_ULONG64, NULL) == -1 ||
41 SDDS_DefineParameter(&SDDS_table, "floatParam", NULL, NULL, NULL, NULL, SDDS_FLOAT, NULL) == -1 ||
42 SDDS_DefineParameter(&SDDS_table, "doubleParam", NULL, NULL, NULL, NULL, SDDS_DOUBLE, NULL) == -1 ||
43 SDDS_DefineParameter(&SDDS_table, "longdoubleParam", NULL, NULL, NULL, NULL, SDDS_LONGDOUBLE, NULL) == -1 ||
44 SDDS_DefineParameter(&SDDS_table, "stringParam", NULL, NULL, NULL, NULL, SDDS_STRING, NULL) == -1 ||
45 SDDS_DefineParameter(&SDDS_table, "charParam", NULL, NULL, NULL, NULL, SDDS_CHARACTER, NULL) == -1
46 ) {
47 SDDS_PrintErrors(stderr, SDDS_VERBOSE_PrintErrors);
48 return 1;
49 }
50
51 /**
52 * Define arrays for the SDDS table.
53 *
54 * Arrays are multidimensional data structures associated with each page.
55 */
56 if (
57 SDDS_DefineArray(&SDDS_table, "shortArray", NULL, NULL, NULL, NULL, SDDS_SHORT, 0, 1, NULL) == -1 ||
58 SDDS_DefineArray(&SDDS_table, "ushortArray", NULL, NULL, NULL, NULL, SDDS_USHORT, 0, 1, NULL) == -1 ||
59 SDDS_DefineArray(&SDDS_table, "longArray", NULL, NULL, NULL, NULL, SDDS_LONG, 0, 1, NULL) == -1 ||
60 SDDS_DefineArray(&SDDS_table, "ulongArray", NULL, NULL, NULL, NULL, SDDS_ULONG, 0, 1, NULL) == -1 ||
61 SDDS_DefineArray(&SDDS_table, "long64Array", NULL, NULL, NULL, NULL, SDDS_LONG64, 0, 2, NULL) == -1 ||
62 SDDS_DefineArray(&SDDS_table, "ulong64Array", NULL, NULL, NULL, NULL, SDDS_ULONG64, 0, 2, NULL) == -1 ||
63 SDDS_DefineArray(&SDDS_table, "floatArray", NULL, NULL, NULL, NULL, SDDS_FLOAT, 0, 2, NULL) == -1 ||
64 SDDS_DefineArray(&SDDS_table, "doubleArray", NULL, NULL, NULL, NULL, SDDS_DOUBLE, 0, 2, NULL) == -1 ||
65 SDDS_DefineArray(&SDDS_table, "longdoubleArray", NULL, NULL, NULL, NULL, SDDS_LONGDOUBLE, 0, 2, NULL) == -1 ||
66 SDDS_DefineArray(&SDDS_table, "stringArray", NULL, NULL, NULL, NULL, SDDS_STRING, 0, 2, NULL) == -1 ||
67 SDDS_DefineArray(&SDDS_table, "charArray", NULL, NULL, NULL, NULL, SDDS_CHARACTER, 0, 2, NULL) == -1
68 ) {
69 SDDS_PrintErrors(stderr, SDDS_VERBOSE_PrintErrors);
70 return 1;
71 }
72
73 /**
74 * Define columns for the SDDS table.
75 *
76 * Columns are data structures associated with each row of data.
77 */
78 if (
79 SDDS_DefineColumn(&SDDS_table, "shortCol", NULL, NULL, NULL, NULL, SDDS_SHORT, 0) == -1 ||
80 SDDS_DefineColumn(&SDDS_table, "ushortCol", NULL, NULL, NULL, NULL, SDDS_USHORT, 0) == -1 ||
81 SDDS_DefineColumn(&SDDS_table, "longCol", NULL, NULL, NULL, NULL, SDDS_LONG, 0) == -1 ||
82 SDDS_DefineColumn(&SDDS_table, "ulongCol", NULL, NULL, NULL, NULL, SDDS_ULONG, 0) == -1 ||
83 SDDS_DefineColumn(&SDDS_table, "long64Col", NULL, NULL, NULL, NULL, SDDS_LONG64, 0) == -1 ||
84 SDDS_DefineColumn(&SDDS_table, "ulong64Col", NULL, NULL, NULL, NULL, SDDS_ULONG64, 0) == -1 ||
85 SDDS_DefineColumn(&SDDS_table, "floatCol", NULL, NULL, NULL, NULL, SDDS_FLOAT, 0) == -1 ||
86 SDDS_DefineColumn(&SDDS_table, "doubleCol", NULL, NULL, NULL, NULL, SDDS_DOUBLE, 0) == -1 ||
87 SDDS_DefineColumn(&SDDS_table, "longdoubleCol", NULL, NULL, NULL, NULL, SDDS_LONGDOUBLE, 0) == -1 ||
88 SDDS_DefineColumn(&SDDS_table, "stringCol", NULL, NULL, NULL, NULL, SDDS_STRING, 0) == -1 ||
89 SDDS_DefineColumn(&SDDS_table, "charCol", NULL, NULL, NULL, NULL, SDDS_CHARACTER, 0) == -1
90 ) {
91 SDDS_PrintErrors(stderr, SDDS_VERBOSE_PrintErrors);
92 return 1;
93 }
94
95 /** Write the layout (definitions) to the SDDS file */
96 if (!SDDS_WriteLayout(&SDDS_table)) {
97 SDDS_PrintErrors(stderr, SDDS_VERBOSE_PrintErrors);
98 return 1;
99 }
100
101 /** Start the first page with 5 rows */
102 if (!SDDS_StartPage(&SDDS_table, 5)) {
103 SDDS_PrintErrors(stderr, SDDS_VERBOSE_PrintErrors);
104 return 1;
105 }
106
107 /**
108 * Set parameters for the first page.
109 *
110 * Parameters are scalar values that apply to the entire page.
111 */
112 if (!SDDS_SetParameters(&SDDS_table, SDDS_SET_BY_NAME | SDDS_PASS_BY_VALUE,
113 "shortParam", (short)10,
114 "ushortParam", (unsigned short)11,
115 "longParam", (int32_t)1000,
116 "ulongParam", (uint32_t)1001,
117 "long64Param", (int64_t)1002,
118 "ulong64Param", (uint64_t)1003,
119 "floatParam", (float)3.14f,
120 "doubleParam", (double)2.71828,
121 "longdoubleParam", (long double)1.1L,
122 "stringParam", "FirstPage",
123 "charParam", 'A',
124 NULL)) {
125 SDDS_PrintErrors(stderr, SDDS_VERBOSE_PrintErrors);
126 return 1;
127 }
128
129 /**
130 * Data for arrays on the first page.
131 *
132 * Arrays can have multiple dimensions and are associated with each page.
133 */
134 int32_t dimension[1] = {3}; /**< Dimensions for 1D arrays */
135 int32_t dimensionB[2] = {4, 2}; /**< Dimensions for 2D arrays */
136 short shortArrayData[3] = {1, 2, 3};
137 unsigned short ushortArrayData[3] = {4, 5, 6};
138 int32_t longArrayData[3] = {1000, 2000, 3000};
139 uint32_t ulongArrayData[3] = {1001, 2001, 3001};
140 int64_t long64ArrayData[8] = {1002, 2002, 3002, 4002, 5002, 6002, 7002, 8002};
141 uint64_t ulong64ArrayData[8] = {1003, 2003, 3003, 4003, 5003, 6003, 7003, 8003};
142 float floatArrayData[8] = {1.1f, 1.2f, 1.3f, 1.4f, 1.5f, 1.6f, 1.7f, 1.8f};
143 double doubleArrayData[8] = {1.2, 2.2, 3.2, 4.2, 5.2, 6.2, 7.2, 8.2};
144 long double longdoubleArrayData[8] = {1.3L, 2.3L, 3.3L, 4.3L, 5.3L, 6.3L, 7.3L, 8.3L};
145 char *stringArrayData[8] = {"one", "two", "three", "four", "five", "six", "seven", "eight"};
146 char charArrayData[8] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'};
147
148 /** Set arrays for the first page */
149 if (
150 !SDDS_SetArray(&SDDS_table, "shortArray", SDDS_CONTIGUOUS_DATA, shortArrayData, dimension) ||
151 !SDDS_SetArray(&SDDS_table, "ushortArray", SDDS_CONTIGUOUS_DATA, ushortArrayData, dimension) ||
152 !SDDS_SetArray(&SDDS_table, "longArray", SDDS_CONTIGUOUS_DATA, longArrayData, dimension) ||
153 !SDDS_SetArray(&SDDS_table, "ulongArray", SDDS_CONTIGUOUS_DATA, ulongArrayData, dimension) ||
154 !SDDS_SetArray(&SDDS_table, "long64Array", SDDS_CONTIGUOUS_DATA, long64ArrayData, dimensionB) ||
155 !SDDS_SetArray(&SDDS_table, "ulong64Array", SDDS_CONTIGUOUS_DATA, ulong64ArrayData, dimensionB) ||
156 !SDDS_SetArray(&SDDS_table, "floatArray", SDDS_CONTIGUOUS_DATA, floatArrayData, dimensionB) ||
157 !SDDS_SetArray(&SDDS_table, "doubleArray", SDDS_CONTIGUOUS_DATA, doubleArrayData, dimensionB) ||
158 !SDDS_SetArray(&SDDS_table, "longdoubleArray", SDDS_CONTIGUOUS_DATA, longdoubleArrayData, dimensionB) ||
159 !SDDS_SetArray(&SDDS_table, "stringArray", SDDS_CONTIGUOUS_DATA, stringArrayData, dimensionB) ||
160 !SDDS_SetArray(&SDDS_table, "charArray", SDDS_CONTIGUOUS_DATA, charArrayData, dimensionB)
161 ) {
162 SDDS_PrintErrors(stderr, SDDS_VERBOSE_PrintErrors);
163 return 1;
164 }
165
166 /**
167 * Data for columns on the first page.
168 *
169 * Columns represent data for each row.
170 */
171 int64_t rows = 5; /**< Number of rows in the first page */
172 short shortColData[5] = {1, 2, 3, 4, 5};
173 unsigned short ushortColData[5] = {1, 2, 3, 4, 5};
174 int32_t longColData[5] = {100, 200, 300, 400, 500};
175 uint32_t ulongColData[5] = {100, 200, 300, 400, 500};
176 int64_t long64ColData[5] = {100, 200, 300, 400, 500};
177 uint64_t ulong64ColData[5] = {100, 200, 300, 400, 500};
178 float floatColData[5] = {1.1f, 2.2f, 3.3f, 4.4f, 5.5f};
179 double doubleColData[5] = {10.01, 20.02, 30.03, 40.04, 50.05};
180 long double longdoubleColData[5] = {10.01L, 20.02L, 30.03L, 40.04L, 50.05L};
181 char *stringColData[5] = {"one", "two", "three", "four", "five"};
182 char charColData[5] = {'a', 'b', 'c', 'd', 'e'};
183
184 /** Set columns for the first page */
185 if (
186 !SDDS_SetColumn(&SDDS_table, SDDS_SET_BY_NAME, shortColData, rows, "shortCol") ||
187 !SDDS_SetColumn(&SDDS_table, SDDS_SET_BY_NAME, ushortColData, rows, "ushortCol") ||
188 !SDDS_SetColumn(&SDDS_table, SDDS_SET_BY_NAME, longColData, rows, "longCol") ||
189 !SDDS_SetColumn(&SDDS_table, SDDS_SET_BY_NAME, ulongColData, rows, "ulongCol") ||
190 !SDDS_SetColumn(&SDDS_table, SDDS_SET_BY_NAME, long64ColData, rows, "long64Col") ||
191 !SDDS_SetColumn(&SDDS_table, SDDS_SET_BY_NAME, ulong64ColData, rows, "ulong64Col") ||
192 !SDDS_SetColumn(&SDDS_table, SDDS_SET_BY_NAME, floatColData, rows, "floatCol") ||
193 !SDDS_SetColumn(&SDDS_table, SDDS_SET_BY_NAME, doubleColData, rows, "doubleCol") ||
194 !SDDS_SetColumn(&SDDS_table, SDDS_SET_BY_NAME, longdoubleColData, rows, "longdoubleCol") ||
195 !SDDS_SetColumn(&SDDS_table, SDDS_SET_BY_NAME, stringColData, rows, "stringCol") ||
196 !SDDS_SetColumn(&SDDS_table, SDDS_SET_BY_NAME, charColData, rows, "charCol")
197 ) {
198 SDDS_PrintErrors(stderr, SDDS_VERBOSE_PrintErrors);
199 return 1;
200 }
201
202 /** Write the first page to the SDDS file */
203 if (!SDDS_WritePage(&SDDS_table)) {
204 SDDS_PrintErrors(stderr, SDDS_VERBOSE_PrintErrors);
205 return 1;
206 }
207
208 /** Start the second page with 3 rows */
209 if (!SDDS_StartPage(&SDDS_table, 3)) {
210 SDDS_PrintErrors(stderr, SDDS_VERBOSE_PrintErrors);
211 return 1;
212 }
213
214 /**
215 * Set parameters for the second page.
216 */
217 if (!SDDS_SetParameters(&SDDS_table, SDDS_SET_BY_NAME | SDDS_PASS_BY_VALUE,
218 "shortParam", (short)20,
219 "ushortParam", (unsigned short)21,
220 "longParam", (int32_t)2000,
221 "ulongParam", (uint32_t)2001,
222 "long64Param", (int64_t)2002,
223 "ulong64Param", (uint64_t)2003,
224 "floatParam", (float)6.28f,
225 "doubleParam", (double)1.41421,
226 "longdoubleParam", (long double)2.2L,
227 "stringParam", "SecondPage",
228 "charParam", 'B',
229 NULL)) {
230 SDDS_PrintErrors(stderr, SDDS_VERBOSE_PrintErrors);
231 return 1;
232 }
233
234 /**
235 * Data for arrays on the second page.
236 */
237 dimension[0] = 2; /**< Update dimensions for 1D arrays */
238 dimensionB[0] = 2; /**< Update dimensions for 2D arrays */
239 dimensionB[1] = 2;
240 short shortArrayData2[2] = {7, 8};
241 unsigned short ushortArrayData2[2] = {9, 10};
242 int32_t longArrayData2[2] = {4000, 5000};
243 uint32_t ulongArrayData2[2] = {4001, 5001};
244 int64_t long64ArrayData2[4] = {4002, 5002, 6002, 7002};
245 uint64_t ulong64ArrayData2[4] = {4003, 5003, 6003, 7003};
246 float floatArrayData2[4] = {11.11f, 22.22f, 33.33f, 44.44f};
247 double doubleArrayData2[4] = {33.33, 44.44, 55.55, 66.66};
248 long double longdoubleArrayData2[4] = {55.55L, 66.66L, 77.77L, 88.88L};
249 char *stringArrayData2[4] = {"blue", "red", "yellow", "gold"};
250 char charArrayData2[4] = {'W', 'X', 'Y', 'Z'};
251
252 /** Set arrays for the second page */
253 if (
254 !SDDS_SetArray(&SDDS_table, "shortArray", SDDS_CONTIGUOUS_DATA, shortArrayData2, dimension) ||
255 !SDDS_SetArray(&SDDS_table, "ushortArray", SDDS_CONTIGUOUS_DATA, ushortArrayData2, dimension) ||
256 !SDDS_SetArray(&SDDS_table, "longArray", SDDS_CONTIGUOUS_DATA, longArrayData2, dimension) ||
257 !SDDS_SetArray(&SDDS_table, "ulongArray", SDDS_CONTIGUOUS_DATA, ulongArrayData2, dimension) ||
258 !SDDS_SetArray(&SDDS_table, "long64Array", SDDS_CONTIGUOUS_DATA, long64ArrayData2, dimensionB) ||
259 !SDDS_SetArray(&SDDS_table, "ulong64Array", SDDS_CONTIGUOUS_DATA, ulong64ArrayData2, dimensionB) ||
260 !SDDS_SetArray(&SDDS_table, "floatArray", SDDS_CONTIGUOUS_DATA, floatArrayData2, dimensionB) ||
261 !SDDS_SetArray(&SDDS_table, "doubleArray", SDDS_CONTIGUOUS_DATA, doubleArrayData2, dimensionB) ||
262 !SDDS_SetArray(&SDDS_table, "longdoubleArray", SDDS_CONTIGUOUS_DATA, longdoubleArrayData2, dimensionB) ||
263 !SDDS_SetArray(&SDDS_table, "stringArray", SDDS_CONTIGUOUS_DATA, stringArrayData2, dimensionB) ||
264 !SDDS_SetArray(&SDDS_table, "charArray", SDDS_CONTIGUOUS_DATA, charArrayData2, dimensionB)
265 ) {
266 SDDS_PrintErrors(stderr, SDDS_VERBOSE_PrintErrors);
267 return 1;
268 }
269
270 /**
271 * Data for columns on the second page.
272 */
273 rows = 3; /**< Number of rows in the second page */
274 short shortColData2[3] = {6, 7, 8};
275 unsigned short ushortColData2[3] = {6, 7, 8};
276 int32_t longColData2[3] = {600, 700, 800};
277 uint32_t ulongColData2[3] = {600, 700, 800};
278 int64_t long64ColData2[3] = {600, 700, 800};
279 uint64_t ulong64ColData2[3] = {600, 700, 800};
280 float floatColData2[3] = {6.6f, 7.7f, 8.8f};
281 double doubleColData2[3] = {60.06, 70.07, 80.08};
282 long double longdoubleColData2[3] = {60.06L, 70.07L, 80.08L};
283 char *stringColData2[3] = {"six", "seven", "eight"};
284 char charColData2[3] = {'f', 'g', 'h'};
285
286 /** Set columns for the second page */
287 if (
288 !SDDS_SetColumn(&SDDS_table, SDDS_SET_BY_NAME, shortColData2, rows, "shortCol") ||
289 !SDDS_SetColumn(&SDDS_table, SDDS_SET_BY_NAME, ushortColData2, rows, "ushortCol") ||
290 !SDDS_SetColumn(&SDDS_table, SDDS_SET_BY_NAME, longColData2, rows, "longCol") ||
291 !SDDS_SetColumn(&SDDS_table, SDDS_SET_BY_NAME, ulongColData2, rows, "ulongCol") ||
292 !SDDS_SetColumn(&SDDS_table, SDDS_SET_BY_NAME, long64ColData2, rows, "long64Col") ||
293 !SDDS_SetColumn(&SDDS_table, SDDS_SET_BY_NAME, ulong64ColData2, rows, "ulong64Col") ||
294 !SDDS_SetColumn(&SDDS_table, SDDS_SET_BY_NAME, floatColData2, rows, "floatCol") ||
295 !SDDS_SetColumn(&SDDS_table, SDDS_SET_BY_NAME, doubleColData2, rows, "doubleCol") ||
296 !SDDS_SetColumn(&SDDS_table, SDDS_SET_BY_NAME, longdoubleColData2, rows, "longdoubleCol") ||
297 !SDDS_SetColumn(&SDDS_table, SDDS_SET_BY_NAME, stringColData2, rows, "stringCol") ||
298 !SDDS_SetColumn(&SDDS_table, SDDS_SET_BY_NAME, charColData2, rows, "charCol")
299 ) {
300 SDDS_PrintErrors(stderr, SDDS_VERBOSE_PrintErrors);
301 return 1;
302 }
303
304 /** Write the second page to the SDDS file */
305 if (!SDDS_WritePage(&SDDS_table)) {
306 SDDS_PrintErrors(stderr, SDDS_VERBOSE_PrintErrors);
307 return 1;
308 }
309
310 /** Terminate the SDDS table */
311 SDDS_Terminate(&SDDS_table);
312
313 return 0;
314}
int32_t SDDS_StartPage(SDDS_DATASET *SDDS_dataset, int64_t expected_n_rows)
int32_t SDDS_SetParameters(SDDS_DATASET *SDDS_dataset, int32_t mode,...)
int32_t SDDS_SetColumn(SDDS_DATASET *SDDS_dataset, int32_t mode, void *data, int64_t rows,...)
Sets the values for one data column in the current data table of an SDDS dataset.
int32_t SDDS_SetArray(SDDS_DATASET *SDDS_dataset, char *array_name, int32_t mode, void *data_pointer, int32_t *dimension)
Sets the values of an array variable in the SDDS dataset using specified dimensions.
int32_t SDDS_Terminate(SDDS_DATASET *SDDS_dataset)
int32_t SDDS_InitializeOutput(SDDS_DATASET *SDDS_dataset, int32_t data_mode, int32_t lines_per_row, const char *description, const char *contents, const char *filename)
Initializes the SDDS output dataset.
int32_t SDDS_DefineArray(SDDS_DATASET *SDDS_dataset, const char *name, const char *symbol, const char *units, const char *description, const char *format_string, int32_t type, int32_t field_length, int32_t dimensions, const char *group_name)
Defines a data array within the SDDS dataset.
int32_t SDDS_WritePage(SDDS_DATASET *SDDS_dataset)
Writes the current data table to the output file.
int32_t SDDS_DefineColumn(SDDS_DATASET *SDDS_dataset, const char *name, const char *symbol, const char *units, const char *description, const char *format_string, int32_t type, int32_t field_length)
Defines a data column within the SDDS dataset.
int32_t SDDS_WriteLayout(SDDS_DATASET *SDDS_dataset)
Writes the SDDS layout header to the output file.
int32_t SDDS_DefineParameter(SDDS_DATASET *SDDS_dataset, const char *name, const char *symbol, const char *units, const char *description, const char *format_string, int32_t type, char *fixed_value)
Defines a data parameter with a fixed string value.
void SDDS_PrintErrors(FILE *fp, int32_t mode)
Prints recorded error messages to a specified file stream.
Definition SDDS_utils.c:432
#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_STRING
Identifier for the string data type.
Definition SDDStypes.h:85
#define SDDS_ULONG64
Identifier for the unsigned 64-bit integer data type.
Definition SDDStypes.h:55
#define SDDS_LONG
Identifier for the signed 32-bit integer data type.
Definition SDDStypes.h:61
#define SDDS_SHORT
Identifier for the signed short integer data type.
Definition SDDStypes.h:73
#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