SDDSlib
Loading...
Searching...
No Matches
SDDS.h
Go to the documentation of this file.
1/**
2 * @file SDDS.h
3 * @brief SDDS (Self Describing Data Set) Data Types Definitions and Function Prototypes
4 *
5 * This header file defines the data types, macros, structures, and function prototypes
6 * used for handling SDDS files. SDDS is a file protocol designed to store and transfer
7 * scientific data efficiently.
8 *
9 * @copyright
10 * - (c) 2002 The University of Chicago, as Operator of Argonne National Laboratory.
11 * - (c) 2002 The Regents of the University of California, as Operator of Los Alamos National Laboratory.
12 *
13 * @license This file is distributed under the terms of the Software License Agreement
14 * found in the file LICENSE included with this distribution.
15 *
16 * @authors
17 * M. Borland,
18 * C. Saunders,
19 * R. Soliday,
20 * H. Shang
21 *
22 */
23
24#if !defined(_SDDS_)
25#include <stdio.h>
26#include <stdarg.h>
27#include <stdlib.h>
28
29#define SDDS_READMODE 1
30#define SDDS_WRITEMODE 2
31#define SDDS_MEMMODE 3
32
33#define SDDS_MPI_READ_ONLY 0x0001UL
34#define SDDS_MPI_WRITE_ONLY 0x0002UL
35#define SDDS_MPI_READ_WRITE 0x0004UL
36#define SDDS_MPI_STRING_COLUMN_LEN 16
37
38#define SDDS_COLUMN_MAJOR_ORDER 0x0001UL
39#define SDDS_ROW_MAJOR_ORDER 0x0002UL
40
41#if SDDS_MPI_IO
42#include "mpi.h"
43#include "mdb.h"
44
45extern char SDDS_mpi_error_str[MPI_MAX_ERROR_STRING];
46extern int32_t SDDS_mpi_error_str_len;
47extern char *SDDS_MPI_FILE_TYPE[];
48
49typedef struct {
50 MPI_File MPI_file; /*MPIO file handle */
51 MPI_Comm comm; /*communicator */
52 MPI_Info File_info; /*file information */
53 int32_t myid; /* This process's rank */
54 int32_t n_processors; /* Total number of processes */
55 MPI_Offset file_offset, file_size, column_offset; /* number of bytes in one row for row major order*/
56 short collective_io;
57 int32_t n_page; /* index of current page*/
58 int64_t n_rows; /* number of rows that current processor holds */
59 int64_t total_rows; /* the total number of rows that all processor hold*/
60 int32_t end_of_file; /* flag for end of MPI_file */
61 int32_t master_read; /*determine if master processor read the page data or not*/
62 int64_t start_row, end_row; /* the start row and end row that current processor's data that is going to be written to output or read from input */
63 FILE *fpdeb;
64} MPI_DATASET;
65#endif
66
67#if defined(zLib)
68#include "zlib.h"
69#endif
70
71#ifdef __cplusplus
72extern "C" {
73#endif
74
75
76#define _SDDS_ 1
77
78#define SDDS_VERSION 5
79
80#ifndef SVN_VERSION
81#define SVN_VERSION "unknown"
82#endif
83
84#include "SDDStypes.h"
85#if defined(_WIN32) && !defined(_MINGW)
86 typedef __int32 int32_t;
87 typedef unsigned __int32 uint32_t;
88 typedef __int64 int64_t;
89 typedef unsigned __int64 uint64_t;
90#define PRId32 "ld"
91#define SCNd32 "ld"
92#define PRIu32 "lu"
93#define SCNu32 "lu"
94#define PRId64 "I64d"
95#define SCNd64 "I64d"
96#define PRIu64 "I64u"
97#define SCNu64 "I64u"
98#if !defined(INT32_MAX)
99#define INT32_MAX 2147483647i32
100#endif
101#if !defined(INT32_MIN)
102#define INT32_MIN (-2147483647i32 - 1)
103#endif
104#if !defined(INT64_MAX)
105#define INT64_MAX 9223372036854775807i64
106#endif
107#else
108#if defined(vxWorks)
109#define PRId32 "ld"
110#define SCNd32 "ld"
111#define PRIu32 "lu"
112#define SCNu32 "lu"
113#define PRId64 "lld"
114#define SCNd64 "lld"
115#define PRIu64 "llu"
116#define SCNu64 "llu"
117#define INT32_MAX (2147483647)
118#define INT32_MAX (-2147483647 - 1)
119#else
120#include <inttypes.h>
121#endif
122#endif
123
124#undef epicsShareFuncSDDS
125#undef epicsShareExtern
126#if (defined(_WIN32) && !defined(__CYGWIN32__)) || (defined(__BORLANDC__) && defined(__linux__))
127#if defined(EXPORT_SDDS)
128#define epicsShareFuncSDDS __declspec(dllexport)
129#define epicsShareExtern extern __declspec(dllexport)
130#else
131#define epicsShareFuncSDDS
132#define epicsShareExtern extern __declspec(dllimport)
133#endif
134#else
135#define epicsShareFuncSDDS
136#define epicsShareExtern extern
137#endif
138
139
140#define RW_ASSOCIATES 0
141
142#define SDDS_BINARY 1
143#define SDDS_ASCII 2
144#define SDDS_PARALLEL 3
145#define SDDS_NUM_DATA_MODES 2
146
147 /*
148 extern char *SDDS_type_name[SDDS_NUM_TYPES];
149 extern int32_t SDDS_type_size[SDDS_NUM_TYPES];
150 extern char *SDDS_data_mode[SDDS_NUM_DATA_MODES];
151 */
152
153 epicsShareExtern char *SDDS_type_name[SDDS_NUM_TYPES];
154 epicsShareExtern int32_t SDDS_type_size[SDDS_NUM_TYPES];
155 extern char *SDDS_data_mode[SDDS_NUM_DATA_MODES];
156
157 /* this shouldn't be changed without changing buffer sizes in namelist routines: */
158#define SDDS_MAXLINE 1024
159
160#define SDDS_PRINT_BUFLEN 16834
161
162#define SDDS_NORMAL_DEFINITION 0
163#define SDDS_WRITEONLY_DEFINITION 1
164
165 typedef struct {
166 char *name, *text;
168
169 typedef struct {
170 char *name, *symbol, *units, *description, *format_string;
171 int32_t type;
172 char *fixed_value;
173 /* these are used internally and are not set by the user: */
174 int32_t definition_mode, memory_number;
176#define SDDS_PARAMETER_FIELDS 7
177
178 typedef struct {
179 char *name, *symbol, *units, *description, *format_string;
180 int32_t type, field_length;
181 /* these are used internally and are not set by the user: */
182 int32_t definition_mode, memory_number, pointer_number;
184#define SDDS_COLUMN_FIELDS 7
185
186 typedef struct {
187 char *name, *symbol, *units, *description, *format_string, *group_name;
188 int32_t type, field_length, dimensions;
190#define SDDS_ARRAY_FIELDS 9
191
192 typedef struct {
193 char *name, *filename, *path, *description, *contents;
194 int32_t sdds;
196#define SDDS_ASSOCIATE_FIELDS 6
197
198 typedef struct {
199 int32_t index;
200 char *name;
201 } SORTED_INDEX;
202 int SDDS_CompareIndexedNames(const void *s1, const void *s2);
203 int SDDS_CompareIndexedNamesPtr(const void *s1, const void *s2);
204
205 typedef struct {
206 int32_t mode, lines_per_row, no_row_counts, fixed_row_count, fixed_row_increment, fsync_data;
207 int32_t additional_header_lines, endian;
208 short column_major, column_memory_mode;
209 } DATA_MODE;
210
211#if !defined(zLib)
212 typedef void *voidp;
213 typedef voidp gzFile;
214#endif
215
216#if !defined(LZMA_BUF_SIZE)
217#include <lzma.h>
218#define LZMA_BUF_SIZE 40960
219 struct lzmafile {
220 lzma_stream str; /* codec stream descriptor */
221 FILE *fp; /* backing file descriptor */
222 char mode; /* access mode ('r' or 'w') */
223 unsigned char rdbuf[LZMA_BUF_SIZE]; /* read buffer used by lzmaRead */
224 };
225#endif
226
227 typedef struct {
228 char *name;
229 int32_t value;
231
232
233#define SDDS_DESCRIPTION_FIELDS 2
234#define SDDS_DATA_FIELDS 7
235#define SDDS_INCLUDE_FIELDS 1
236
237 typedef struct {
238 char *name;
239 int32_t offset;
240 int32_t type;
241 SDDS_ENUM_PAIR *enumPair;
243
244 extern SDDS_FIELD_INFORMATION SDDS_ArrayFieldInformation[SDDS_ARRAY_FIELDS];
245 extern SDDS_FIELD_INFORMATION SDDS_ColumnFieldInformation[SDDS_COLUMN_FIELDS];
246 extern SDDS_FIELD_INFORMATION SDDS_ParameterFieldInformation[SDDS_PARAMETER_FIELDS];
247 extern SDDS_FIELD_INFORMATION SDDS_AssociateFieldInformation[SDDS_ASSOCIATE_FIELDS];
248 extern SDDS_FIELD_INFORMATION SDDS_DescriptionFieldInformation[SDDS_DESCRIPTION_FIELDS];
249 extern SDDS_FIELD_INFORMATION SDDS_IncludeFieldInformation[SDDS_INCLUDE_FIELDS];
250 extern SDDS_FIELD_INFORMATION SDDS_DataFieldInformation[SDDS_DATA_FIELDS];
251
252 typedef struct {
253 int32_t n_columns, n_parameters, n_associates, n_arrays;
254
255 char *description;
256 char *contents;
257 int32_t version;
258 short layout_written;
259
260 DATA_MODE data_mode;
261 COLUMN_DEFINITION *column_definition;
262 PARAMETER_DEFINITION *parameter_definition;
263 ARRAY_DEFINITION *array_definition;
264 ASSOCIATE_DEFINITION *associate_definition;
265 SORTED_INDEX **column_index, **parameter_index, **array_index;
266
267 char *filename;
268 FILE *fp;
269 gzFile gzfp;
270 struct lzmafile* lzmafp;
271 short disconnected;
272 short gzipFile;
273 short lzmaFile;
274 short popenUsed;
275 uint32_t byteOrderDeclared;
276
277 /*SDDS_ReadLayout*/
278 char s[SDDS_MAXLINE];
279 int32_t depth;
280 int32_t data_command_seen;
281
282 uint32_t commentFlags;
283 } SDDS_LAYOUT;
284
285 typedef struct {
286 ARRAY_DEFINITION *definition;
287 int32_t *dimension, elements;
288 /* Address of array of data values, stored contiguously.
289 * For STRING data, the "data values" are actually the addresses of the individual strings.
290 */
291 void *data;
292 void *pointer;
293 } SDDS_ARRAY;
294
295 typedef struct {
296 char *data, *buffer;
297 int64_t bytesLeft;
298 int64_t bufferSize;
300
301#define SDDS_FILEBUFFER_SIZE 262144
302
303 typedef struct {
304 SDDS_LAYOUT layout, original_layout;
305 short swapByteOrder;
306 SDDS_FILEBUFFER fBuffer;
307 SDDS_FILEBUFFER titleBuffer;
308 int32_t page_number;
309
310 short mode; /*file mode*/
311 short page_started; /*0 or 1 for page not started or already started*/
312 int32_t pages_read; /*the number of pages read so far*/
313 int64_t endOfFile_offset;/*the offset in the end of the file*/
314 int64_t *pagecount_offset; /*the offset of each read page */
315 int64_t rowcount_offset; /* ftell() position of row count */
316 int64_t n_rows_written; /* number of tabular data rows written to disk */
317 int64_t last_row_written; /* virtual index of last row written */
318 int64_t first_row_in_mem; /* virtual index of first row in memory */
319 short writing_page; /* 1/0 for writing/not-writing page */
320 int64_t n_rows_allocated; /* number of tabular data rows for which space is alloc'd */
321 int64_t n_rows; /* number of rows stored in memory */
322 int32_t *row_flag; /* accept/reject flags for rows stored in memory */
323 short file_had_data; /* indicates that file being appended to already had some data in it (i.e.,
324 * more than just a header. Affects no_row_counts=1 output.
325 */
326 short autoRecover;
327 short autoRecovered;
328 short parallel_io; /*flag for parallel SDDS */
329 int32_t n_of_interest; /* number of columns of interest */
330 int32_t *column_order; /* column_order[i] = internal index of user's ith column */
331 int32_t *column_flag; /* column_flag[i] indicates whether internal ith column has been selected */
332 short *column_track_memory; /*indecates if the column memory should be tracked and eventually freed */
333
334 int32_t readRecoveryPossible;
335 int32_t deferSavingLayout;
336 /* array of SDDS_ARRAY structures for storing array data */
337 SDDS_ARRAY *array;
338
339 /* array for parameter data. The address of the data for the ith parameter
340 * is parameter[i]. So *(<type-name> *)parameter[i] gives the data itself. For type
341 * SDDS_STRING the "data itself" is actually the address of the string, and the type-name
342 * is "char *".
343 */
344 void **parameter;
345
346 /* array for tabular data. The starting address for the data for the ith column
347 * is data[i]. So ((<type-name> *)data[i])[j] gives the jth data value.
348 * For type SDDS_STRING the "data value" is actually the address of the string, and
349 * the type-name is "char *".
350 */
351 void **data;
352#if SDDS_MPI_IO
353 MPI_DATASET *MPI_dataset;
354#endif
355 } SDDS_DATASET;
356
357 typedef SDDS_DATASET SDDS_TABLE;
358
359 /* prototypes for routines to prepare and write SDDS files */
360 epicsShareFuncSDDS extern int32_t SDDS_InitializeOutput(SDDS_DATASET *SDDS_dataset, int32_t data_mode,
361 int32_t lines_per_row, const char *description,
362 const char *contents, const char *filename);
363 epicsShareFuncSDDS extern int32_t SDDS_Parallel_InitializeOutput(SDDS_DATASET *SDDS_dataset, const char *description,
364 const char *contents, const char *filename);
365 epicsShareFuncSDDS extern int32_t SDDS_InitializeAppend(SDDS_DATASET *SDDS_dataset, const char *filename);
366 epicsShareFuncSDDS extern int32_t SDDS_InitializeAppendToPage(SDDS_DATASET *SDDS_dataset, const char *filename,
367 int64_t updateInterval,
368 int64_t *rowsPresentReturn);
369 epicsShareFuncSDDS extern int32_t SDDS_DisconnectFile(SDDS_DATASET *SDDS_dataset);
370 epicsShareFuncSDDS extern int32_t SDDS_ReconnectFile(SDDS_DATASET *SDDS_dataset);
371#define SDDS_IsDisconnected(SDDSptr) ((SDDSptr)->layout.disconnected)
372 epicsShareFuncSDDS extern long SDDS_DisconnectInputFile(SDDS_DATASET *SDDS_dataset);
373 epicsShareFuncSDDS extern int32_t SDDS_ReconnectInputFile(SDDS_DATASET *SDDS_dataset, long position);
374 epicsShareFuncSDDS extern int32_t SDDS_ReadNewBinaryRows(SDDS_DATASET *SDDS_dataset);
375 epicsShareFuncSDDS extern int32_t SDDS_FreeStringData(SDDS_DATASET *SDDS_dataset);
376 epicsShareFuncSDDS extern int32_t SDDS_Terminate(SDDS_DATASET *SDDS_dataset);
377 epicsShareFuncSDDS extern void SDDS_SetTerminateMode(uint32_t mode);
378#define TERMINATE_DONT_FREE_TABLE_STRINGS 0x0001
379#define TERMINATE_DONT_FREE_ARRAY_STRINGS 0x0002
380 epicsShareFuncSDDS extern void SDDS_SetColumnMemoryMode(SDDS_DATASET *SDDS_dataset, uint32_t mode);
381 epicsShareFuncSDDS extern int32_t SDDS_GetColumnMemoryMode(SDDS_DATASET *SDDS_dataset);
382#define DEFAULT_COLUMN_MEMORY_MODE 0
383#define DONT_TRACK_COLUMN_MEMORY_AFTER_ACCESS 1
384 epicsShareFuncSDDS extern int32_t SDDS_SetRowCountMode(SDDS_DATASET *SDDS_dataset, uint32_t mode);
385#define SDDS_VARIABLEROWCOUNT 0x0001UL
386#define SDDS_FIXEDROWCOUNT 0x0002UL
387#define SDDS_NOROWCOUNT 0x0004UL
388 epicsShareFuncSDDS extern int32_t SDDS_SetAutoReadRecovery(SDDS_DATASET *SDDS_dataset, uint32_t mode);
389#define SDDS_NOAUTOREADRECOVER 0x0001UL
390#define SDDS_AUTOREADRECOVER 0x0002UL
391 epicsShareFuncSDDS extern int32_t SDDS_UpdateRowCount(SDDS_DATASET *SDDS_dataset);
392 epicsShareFuncSDDS extern void SDDS_DisableFSync(SDDS_DATASET *SDDS_dataset);
393 epicsShareFuncSDDS extern void SDDS_EnableFSync(SDDS_DATASET *SDDS_dataset);
394 epicsShareFuncSDDS extern int32_t SDDS_DoFSync(SDDS_DATASET *SDDS_dataset);
395 epicsShareFuncSDDS extern int32_t SDDS_DefineParameter(SDDS_DATASET *SDDS_dataset, const char *name, const char *symbol, const char *units, const char *description,
396 const char *format_string, int32_t type, char *fixed_value);
397 epicsShareFuncSDDS extern int32_t SDDS_DefineParameter1(SDDS_DATASET *SDDS_dataset, const char *name, const char *symbol, const char *units, const char *description,
398 const char *format_string, int32_t type, void *fixed_value);
399 epicsShareFuncSDDS extern int32_t SDDS_DefineColumn(SDDS_DATASET *SDDS_dataset, const char *name, const char *symbol, const char *units, const char *description,
400 const char *format_string, int32_t type, int32_t field_length);
401 epicsShareFuncSDDS extern int32_t SDDS_DefineArray(SDDS_DATASET *SDDS_dataset, const char *name, const char *symbol, const char *units, const char *description,
402 const char *format_string, int32_t type, int32_t field_length, int32_t dimensions, const char *group_name);
403 epicsShareFuncSDDS extern int32_t SDDS_DefineAssociate(SDDS_DATASET *SDDS_dataset, const char *name,
404 const char *filename, const char *path, const char *description, const char *contents, int32_t sdds);
405 epicsShareFuncSDDS extern int32_t SDDS_IsValidName(const char *name, const char *dataClass);
406 epicsShareFuncSDDS extern int32_t SDDS_SetNameValidityFlags(uint32_t flags);
407#define SDDS_ALLOW_ANY_NAME 0x0001UL
408#define SDDS_ALLOW_V15_NAME 0x0002UL
409 epicsShareFuncSDDS extern int32_t SDDS_DefineSimpleColumn(SDDS_DATASET *SDDS_dataset, const char *name, const char *unit, int32_t type);
410 epicsShareFuncSDDS extern int32_t SDDS_DefineSimpleParameter(SDDS_DATASET *SDDS_dataset, const char *name, const char *unit, int32_t type);
411 epicsShareFuncSDDS extern int32_t SDDS_DefineSimpleColumns(SDDS_DATASET *SDDS_dataset, int32_t number, char **name, char **unit, int32_t type);
412 epicsShareFuncSDDS extern int32_t SDDS_DefineSimpleParameters(SDDS_DATASET *SDDS_dataset, int32_t number, char **name, char **unit, int32_t type);
413 epicsShareFuncSDDS extern int32_t SDDS_SetNoRowCounts(SDDS_DATASET *SDDS_dataset, int32_t value);
414 epicsShareFuncSDDS extern int32_t SDDS_WriteLayout(SDDS_DATASET *SDDS_dataset);
415#define SDDS_LayoutWritten(SDDSptr) ((SDDSptr)->layout.layout_written)
416 epicsShareFuncSDDS extern int32_t SDDS_EraseData(SDDS_DATASET *SDDS_dataset);
417
418 epicsShareFuncSDDS extern int32_t SDDS_ProcessColumnString(SDDS_DATASET *SDDS_dataset, char *string, int32_t mode);
419 epicsShareFuncSDDS extern int32_t SDDS_ProcessParameterString(SDDS_DATASET *SDDS_dataset, char *string, int32_t mode);
420 epicsShareFuncSDDS extern int32_t SDDS_ProcessArrayString(SDDS_DATASET *SDDS_dataset, char *string);
421 epicsShareFuncSDDS extern int32_t SDDS_ProcessAssociateString(SDDS_DATASET *SDDS_dataset, char *string);
422
423 epicsShareFuncSDDS extern int32_t SDDS_InitializeCopy(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source, char *filename, char *filemode);
424 epicsShareFuncSDDS extern int32_t SDDS_CopyLayout(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source);
425 epicsShareFuncSDDS extern int32_t SDDS_AppendLayout(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source, uint32_t mode);
426 epicsShareFuncSDDS extern int32_t SDDS_CopyPage(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source);
427#define SDDS_CopyTable(a, b) SDDS_CopyPage(a, b)
428 epicsShareFuncSDDS extern int32_t SDDS_CopyParameters(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source);
429 epicsShareFuncSDDS extern int32_t SDDS_CopyArrays(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source);
430 epicsShareFuncSDDS extern int32_t SDDS_CopyColumns(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source);
431 epicsShareFuncSDDS extern int32_t SDDS_CopyRowsOfInterest(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source);
432 epicsShareFuncSDDS extern int32_t SDDS_CopyRow(SDDS_DATASET *SDDS_target, int64_t target_row, SDDS_DATASET *SDDS_source, int64_t source_srow);
433 epicsShareFuncSDDS extern int32_t SDDS_CopyRowDirect(SDDS_DATASET *SDDS_target, int64_t target_row, SDDS_DATASET *SDDS_source, int64_t source_row);
434 epicsShareFuncSDDS extern int32_t SDDS_CopyAdditionalRows(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source);
435 epicsShareFuncSDDS extern int32_t SDDS_CopyRows(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source, int64_t firstRow, int64_t lastRow);
436
437 epicsShareFuncSDDS extern void SDDS_DeferSavingLayout(SDDS_DATASET *SDDS_dataset, int32_t mode);
438 epicsShareFuncSDDS extern int32_t SDDS_SaveLayout(SDDS_DATASET *SDDS_dataset);
439 epicsShareFuncSDDS extern int32_t SDDS_RestoreLayout(SDDS_DATASET *SDDS_dataset);
440
441#define SDDS_BY_INDEX 1
442#define SDDS_BY_NAME 2
443
444 epicsShareFuncSDDS extern int32_t SDDS_StartPage(SDDS_DATASET *SDDS_dataset, int64_t expected_n_rows);
445#define SDDS_StartTable(a, b) SDDS_StartPage(a, b)
446 epicsShareFuncSDDS extern int32_t SDDS_ClearPage(SDDS_DATASET *SDDS_dataset);
447 epicsShareFuncSDDS extern int32_t SDDS_LengthenTable(SDDS_DATASET *SDDS_dataset, int64_t n_additional_rows);
448 epicsShareFuncSDDS extern int32_t SDDS_ShortenTable(SDDS_DATASET *SDDS_dataset, int64_t rows);
449#define SDDS_SET_BY_INDEX SDDS_BY_INDEX
450#define SDDS_SET_BY_NAME SDDS_BY_NAME
451#define SDDS_PASS_BY_VALUE 4
452#define SDDS_PASS_BY_REFERENCE 8
453#define SDDS_PASS_BY_STRING 16
454 epicsShareFuncSDDS extern int32_t SDDS_SetParameters(SDDS_DATASET *SDDS_dataset, int32_t mode, ...);
455 epicsShareFuncSDDS extern int32_t SDDS_SetParameter(SDDS_DATASET *SDDS_dataset, int32_t mode, ...);
456 epicsShareFuncSDDS extern int32_t SDDS_SetRowValues(SDDS_DATASET *SDDS_dataset, int32_t mode, int64_t row, ...);
457 epicsShareFuncSDDS extern int32_t SDDS_WritePage(SDDS_DATASET *SDDS_dataset);
458#define SDDS_WriteTable(a) SDDS_WritePage(a)
459 epicsShareFuncSDDS extern int32_t SDDS_UpdatePage(SDDS_DATASET *SDDS_dataset, uint32_t mode);
460#define FLUSH_TABLE 0x1UL
461#define SDDS_UpdateTable(a) SDDS_UpdatePage(a, 0)
462 epicsShareFuncSDDS extern int32_t SDDS_SyncDataSet(SDDS_DATASET *SDDS_dataset);
463 epicsShareFuncSDDS extern int32_t SDDS_SetColumn(SDDS_DATASET *SDDS_dataset, int32_t mode, void *data, int64_t rows, ...);
464 epicsShareFuncSDDS extern int32_t SDDS_SetColumnFromDoubles(SDDS_DATASET *SDDS_dataset, int32_t mode, double *data, int64_t rows, ...);
465 epicsShareFuncSDDS extern int32_t SDDS_SetColumnFromFloats(SDDS_DATASET *SDDS_dataset, int32_t mode, float *data, int64_t rows, ...);
466 epicsShareFuncSDDS extern int32_t SDDS_SetColumnFromLongs(SDDS_DATASET *SDDS_dataset, int32_t mode, int32_t *data, int64_t rows, ...);
467 epicsShareFuncSDDS extern int32_t SDDS_SetParametersFromDoubles(SDDS_DATASET *SDDS_dataset, int32_t mode, ...);
468
469#define SDDS_GET_BY_INDEX SDDS_BY_INDEX
470#define SDDS_GET_BY_NAME SDDS_BY_NAME
471 epicsShareFuncSDDS extern int32_t SDDS_GetColumnInformation(SDDS_DATASET *SDDS_dataset, char *field_name, void *memory, int32_t mode, ...);
472 epicsShareFuncSDDS extern int32_t SDDS_GetParameterInformation(SDDS_DATASET *SDDS_dataset, char *field_name, void *memory, int32_t mode, ...);
473 epicsShareFuncSDDS extern int32_t SDDS_GetArrayInformation(SDDS_DATASET *SDDS_dataset, char *field_name, void *memory, int32_t mode, ...);
474 epicsShareFuncSDDS extern int32_t SDDS_GetAssociateInformation(SDDS_DATASET *SDDS_dataset, char *field_name, void *memory, int32_t mode, ...);
475 epicsShareFuncSDDS extern int32_t SDDS_ChangeColumnInformation(SDDS_DATASET *SDDS_dataset, char *field_name, void *memory, int32_t mode, ...);
476 epicsShareFuncSDDS extern int32_t SDDS_ChangeParameterInformation(SDDS_DATASET *SDDS_dataset, char *field_name, void *memory, int32_t mode, ...);
477 epicsShareFuncSDDS extern int32_t SDDS_ChangeArrayInformation(SDDS_DATASET *SDDS_dataset, char *field_name, void *memory, int32_t mode, ...);
478
479 epicsShareFuncSDDS extern void SDDS_SetReadRecoveryMode(SDDS_DATASET *SDDS_dataset, int32_t mode);
480 epicsShareFuncSDDS extern int32_t SDDS_SetDefaultIOBufferSize(int32_t bufferSize);
481
482 /* prototypes for routines to read and use SDDS files */
483 epicsShareFuncSDDS extern int32_t SDDS_InitializeInputFromSearchPath(SDDS_DATASET *SDDSin, char *file);
484 epicsShareFuncSDDS extern int32_t SDDS_InitializeInput(SDDS_DATASET *SDDS_dataset, char *filename);
485 epicsShareFuncSDDS extern int32_t SDDS_ReadLayout(SDDS_DATASET *SDDS_dataset, FILE *fp);
486 epicsShareFuncSDDS extern int32_t SDDS_InitializeHeaderlessInput(SDDS_DATASET *SDDS_dataset, char *filename);
487 epicsShareFuncSDDS extern int64_t SDDS_GetRowLimit();
488 epicsShareFuncSDDS extern int64_t SDDS_SetRowLimit(int64_t limit);
489 epicsShareFuncSDDS extern int32_t SDDS_GotoPage(SDDS_DATASET *SDDS_dataset,int32_t page_number);
490 epicsShareFuncSDDS extern int32_t SDDS_CheckEndOfFile(SDDS_DATASET *SDDS_dataset);
491 epicsShareFuncSDDS extern int32_t SDDS_ReadPage(SDDS_DATASET *SDDS_dataset);
492 epicsShareFuncSDDS extern int32_t SDDS_ReadPageSparse(SDDS_DATASET *SDDS_dataset, uint32_t mode,
493 int64_t sparse_interval,
494 int64_t sparse_offset, int32_t sparse_statistics);
495 epicsShareFuncSDDS extern int32_t SDDS_ReadPageLastRows(SDDS_DATASET *SDDS_dataset, int64_t last_rows);
496#define SDDS_ReadTable(a) SDDS_ReadPage(a)
497 epicsShareFuncSDDS extern int32_t SDDS_ReadAsciiPage(SDDS_DATASET *SDDS_dataset, int64_t sparse_interval,
498 int64_t sparse_offset, int32_t sparse_statistics);
499 epicsShareFuncSDDS extern int32_t SDDS_ReadRecoveryPossible(SDDS_DATASET *SDDS_dataset);
500
501 epicsShareFuncSDDS extern int32_t SDDS_SetColumnFlags(SDDS_DATASET *SDDS_dataset, int32_t column_flag_value);
502 epicsShareFuncSDDS extern int32_t SDDS_SetRowFlags(SDDS_DATASET *SDDS_dataset, int32_t row_flag_value);
503 epicsShareFuncSDDS extern int32_t SDDS_GetRowFlag(SDDS_DATASET *SDDS_dataset, int64_t row);
504 epicsShareFuncSDDS extern int32_t SDDS_GetRowFlags(SDDS_DATASET *SDDS_dataset, int32_t *flag, int64_t rows);
505 epicsShareFuncSDDS extern int32_t SDDS_BufferedRead(void *target, int64_t targetSize, FILE *fp, SDDS_FILEBUFFER *fBuffer, int32_t type, int32_t byteOrder);
506#if defined(zLib)
507 epicsShareFuncSDDS extern int32_t SDDS_GZipBufferedRead(void *target, int64_t targetSize, gzFile gzfp, SDDS_FILEBUFFER *fBuffer, int32_t type, int32_t byteOrder);
508#endif
509
510 /* logic flags for SDDS_AssertRowFlags and SDDS_AssertColumnFlags */
511#define SDDS_FLAG_ARRAY 0x001UL
512#define SDDS_INDEX_LIMITS 0x002UL
513 epicsShareFuncSDDS extern int32_t SDDS_AssertRowFlags(SDDS_DATASET *SDDS_dataset, uint32_t mode, ...);
514 /* modes for SDDS_SetColumnsOfInterest and SDDS_SetRowsOfInterest: */
515#define SDDS_NAME_ARRAY 1
516#define SDDS_NAMES_STRING 2
517#define SDDS_NAME_STRINGS 3
518#define SDDS_MATCH_STRING 4
519#define SDDS_MATCH_EXCLUDE_STRING 5
520#define SDDS_CI_NAME_ARRAY 6
521#define SDDS_CI_NAMES_STRING 7
522#define SDDS_CI_NAME_STRINGS 8
523#define SDDS_CI_MATCH_STRING 9
524#define SDDS_CI_MATCH_EXCLUDE_STRING 10
525
526 /* logic flags for SDDS_SetColumnsOfInterest, SDDS_SetRowsOfInterest, and SDDS_MatchRowsOfInterest: */
527#define SDDS_AND 0x0001UL
528#define SDDS_OR 0x0002UL
529#define SDDS_NEGATE_MATCH 0x0004UL
530#define SDDS_NEGATE_PREVIOUS 0x0008UL
531#define SDDS_NEGATE_EXPRESSION 0x0010UL
532#define SDDS_INDIRECT_MATCH 0x0020UL
533#define SDDS_1_PREVIOUS 0x0040UL
534#define SDDS_0_PREVIOUS 0x0080UL
535 /* used by MatchRowsOfInterest only at this point: */
536#define SDDS_NOCASE_COMPARE 0x0100UL
537
538 epicsShareFuncSDDS extern int32_t SDDS_MatchColumns(SDDS_DATASET *SDDS_dataset, char ***match, int32_t matchMode, int32_t typeMode, ... );
539 epicsShareFuncSDDS extern int32_t SDDS_MatchParameters(SDDS_DATASET *SDDS_dataset, char ***match, int32_t matchMode, int32_t typeMode, ... );
540 epicsShareFuncSDDS extern int32_t SDDS_MatchArrays(SDDS_DATASET *SDDS_dataset, char ***match, int32_t matchMode, int32_t typeMode, ... );
541 epicsShareFuncSDDS extern int32_t SDDS_Logic(int32_t previous, int32_t match, uint32_t logic);
542 epicsShareFuncSDDS extern int32_t SDDS_SetColumnsOfInterest(SDDS_DATASET *SDDS_dataset, int32_t mode, ...);
543 epicsShareFuncSDDS extern int32_t SDDS_AssertColumnFlags(SDDS_DATASET *SDDS_dataset, uint32_t mode, ...);
544 epicsShareFuncSDDS extern int64_t SDDS_SetRowsOfInterest(SDDS_DATASET *SDDS_dataset, char *selection_column, int32_t mode, ...);
545 epicsShareFuncSDDS extern int64_t SDDS_MatchRowsOfInterest(SDDS_DATASET *SDDS_dataset, char *selection_column, char *label_to_match, int32_t logic);
546 epicsShareFuncSDDS extern int32_t SDDS_DeleteColumn(SDDS_DATASET *SDDS_dataset, char *column_name);
547 epicsShareFuncSDDS extern int32_t SDDS_DeleteParameter(SDDS_DATASET *SDDS_dataset, char *parameter_name);
548 epicsShareFuncSDDS extern int32_t SDDS_DeleteUnsetColumns(SDDS_DATASET *SDDS_dataset);
549 epicsShareFuncSDDS extern int32_t SDDS_CountColumnsOfInterest(SDDS_DATASET *SDDS_dataset);
550 epicsShareFuncSDDS extern int32_t SDDS_ColumnIsOfInterest(SDDS_DATASET *SDDS_dataset, char *name);
551 epicsShareFuncSDDS extern int32_t SDDS_ColumnCount(SDDS_DATASET *dataset);
552 epicsShareFuncSDDS extern int32_t SDDS_ParameterCount(SDDS_DATASET *dataset);
553 epicsShareFuncSDDS extern int32_t SDDS_ArrayCount(SDDS_DATASET *dataset);
554 epicsShareFuncSDDS extern int64_t SDDS_CountRowsOfInterest(SDDS_DATASET *SDDS_dataset);
555#define SDDS_RowCount(SDDS_dataset) ((SDDS_dataset)->n_rows)
556 epicsShareFuncSDDS extern int32_t SDDS_DeleteUnsetRows(SDDS_DATASET *SDDS_dataset);
557 epicsShareFuncSDDS extern int64_t SDDS_FilterRowsOfInterest(SDDS_DATASET *SDDS_dataset, char *filter_column, double lower, double upper, int32_t logic);
558 epicsShareFuncSDDS extern int32_t SDDS_ItemInsideWindow(void *data, int64_t index, int32_t type, double lower_limit, double upper_limit);
559 epicsShareFuncSDDS extern int64_t SDDS_FilterRowsByNumScan(SDDS_DATASET *SDDS_dataset, char *filter_column, uint32_t mode);
560#define NUMSCANFILTER_INVERT 0x0001UL
561#define NUMSCANFILTER_STRICT 0x0002UL
562
563 epicsShareFuncSDDS extern void *SDDS_GetColumn(SDDS_DATASET *SDDS_dataset, char *column_name);
564 epicsShareFuncSDDS extern void *SDDS_GetInternalColumn(SDDS_DATASET *SDDS_dataset, char *column_name);
565 epicsShareFuncSDDS extern double *SDDS_GetColumnInDoubles(SDDS_DATASET *SDDS_dataset, char *column_name);
566 epicsShareFuncSDDS extern float *SDDS_GetColumnInFloats(SDDS_DATASET *SDDS_dataset, char *column_name);
567 epicsShareFuncSDDS extern int32_t *SDDS_GetColumnInLong(SDDS_DATASET *SDDS_dataset, char *column_name);
568 epicsShareFuncSDDS extern short *SDDS_GetColumnInShort(SDDS_DATASET *SDDS_dataset, char *column_name);
569 epicsShareFuncSDDS extern char **SDDS_GetColumnInString(SDDS_DATASET *SDDS_dataset, char *column_name);
570 epicsShareFuncSDDS extern void *SDDS_GetNumericColumn(SDDS_DATASET *SDDS_dataset, char *column_name, int32_t desiredType);
571 epicsShareFuncSDDS extern void *SDDS_GetRow(SDDS_DATASET *SDDS_dataset, int64_t srow_index, void *memory);
572 epicsShareFuncSDDS extern void *SDDS_GetValue(SDDS_DATASET *SDDS_dataset, char *column_name, int64_t srow_index, void *memory);
573 epicsShareFuncSDDS extern double SDDS_GetValueAsDouble(SDDS_DATASET *SDDS_dataset, char *column_name, int64_t srow_index);
574 epicsShareFuncSDDS extern double SDDS_GetValueByIndexAsDouble(SDDS_DATASET *SDDS_dataset, int32_t column_index, int64_t srow_index);
575 epicsShareFuncSDDS extern void *SDDS_GetValueByIndex(SDDS_DATASET *SDDS_dataset, int32_t column_index, int64_t srow_index, void *memory);
576 epicsShareFuncSDDS extern void *SDDS_GetValueByAbsIndex(SDDS_DATASET *SDDS_dataset, int32_t column_index, int64_t srow_index, void *memory);
577 epicsShareFuncSDDS extern void *SDDS_GetParameter(SDDS_DATASET *SDDS_dataset, char *parameter_name, void *memory);
578 epicsShareFuncSDDS extern void *SDDS_GetParameterByIndex(SDDS_DATASET *SDDS_dataset, int32_t index, void *memory);
579 epicsShareFuncSDDS extern long double *SDDS_GetParameterAsLongDouble(SDDS_DATASET *SDDS_dataset, char *parameter_name, long double *data);
580 epicsShareFuncSDDS extern double *SDDS_GetParameterAsDouble(SDDS_DATASET *SDDS_dataset, char *parameter_name, double *data);
581 epicsShareFuncSDDS extern int32_t *SDDS_GetParameterAsLong(SDDS_DATASET *SDDS_dataset, char *parameter_name, int32_t *data);
582 epicsShareFuncSDDS extern int64_t *SDDS_GetParameterAsLong64(SDDS_DATASET *SDDS_dataset, char *parameter_name, int64_t *data);
583 epicsShareFuncSDDS extern char *SDDS_GetParameterAsString(SDDS_DATASET *SDDS_dataset, char *parameter_name, char **memory);
584 epicsShareFuncSDDS extern char *SDDS_GetParameterAsFormattedString(SDDS_DATASET *SDDS_dataset, char *parameter_name, char **memory, char *suppliedformat);
585 epicsShareFuncSDDS extern int32_t SDDS_GetParameters(SDDS_DATASET *SDDS_dataset, ...);
586 epicsShareFuncSDDS extern void *SDDS_GetFixedValueParameter(SDDS_DATASET *SDDS_dataset, char *parameter_name, void *memory);
587 epicsShareFuncSDDS extern int32_t SDDS_GetDescription(SDDS_DATASET *SDDS_dataset, char **text, char **contents);
588
589 epicsShareFuncSDDS extern int32_t SDDS_SetArrayUnitsConversion(SDDS_DATASET *SDDS_dataset, char *column_name, char *new_units, char *old_units, double factor);
590 epicsShareFuncSDDS extern int32_t SDDS_SetColumnUnitsConversion(SDDS_DATASET *SDDS_dataset, char *column_name, char *new_units, char *old_units, double factor);
591 epicsShareFuncSDDS extern int32_t SDDS_SetParameterUnitsConversion(SDDS_DATASET *SDDS_dataset, char *column_name, char *new_units, char *old_units, double factor);
592
593 epicsShareFuncSDDS extern void *SDDS_GetMatrixOfRows(SDDS_DATASET *SDDS_dataset, int64_t *n_rows);
594 epicsShareFuncSDDS extern void *SDDS_GetCastMatrixOfRows(SDDS_DATASET *SDDS_dataset, int64_t *n_rows, int32_t sddsType);
595#define SDDS_ROW_MAJOR_DATA 1
596#define SDDS_COLUMN_MAJOR_DATA 2
597 epicsShareFuncSDDS extern void *SDDS_GetMatrixFromColumn(SDDS_DATASET *SDDS_dataset, char *column_name, int64_t dimension1, int64_t dimension2, int32_t mode);
598 epicsShareFuncSDDS extern void *SDDS_GetDoubleMatrixFromColumn(SDDS_DATASET *SDDS_dataset, char *column_name, int64_t dimension1, int64_t dimension2, int32_t mode);
599
600 epicsShareFuncSDDS extern SDDS_ARRAY *SDDS_GetArray(SDDS_DATASET *SDDS_dataset, char *array_name, SDDS_ARRAY *memory);
601#define SDDS_POINTER_ARRAY 1
602#define SDDS_CONTIGUOUS_DATA 2
603 epicsShareFuncSDDS extern double *SDDS_GetArrayInDoubles(SDDS_DATASET *SDDS_dataset, char *array_name, int32_t *values);
604 epicsShareFuncSDDS extern int32_t *SDDS_GetArrayInLong(SDDS_DATASET *SDDS_dataset, char *array_name, int32_t *values);
605 epicsShareFuncSDDS extern char **SDDS_GetArrayInString(SDDS_DATASET *SDDS_dataset, char *array_name, int32_t *values);
606 epicsShareFuncSDDS extern int32_t SDDS_SetArrayVararg(SDDS_DATASET *SDDS_dataset, char *array_name, int32_t mode, void *data_pointer, ...);
607 epicsShareFuncSDDS extern int32_t SDDS_SetArray(SDDS_DATASET *SDDS_dataset, char *array_name, int32_t mode, void *data_pointer, int32_t *dimension);
608 epicsShareFuncSDDS extern int32_t SDDS_AppendToArrayVararg(SDDS_DATASET *SDDS_dataset, char *array_name, int32_t mode, void *data_pointer, int32_t elements, ...);
609
610
611 /* error-handling and utility routines: */
612 epicsShareFuncSDDS extern void *SDDS_Realloc(void *old_ptr, size_t new_size);
613 epicsShareFuncSDDS extern void *SDDS_Malloc(size_t size);
614 epicsShareFuncSDDS extern void SDDS_Free(void *mem);
615 epicsShareFuncSDDS extern void *SDDS_Calloc(size_t nelem, size_t elem_size);
616 epicsShareFuncSDDS extern int32_t SDDS_NumberOfErrors(void);
617 epicsShareFuncSDDS extern void SDDS_ClearErrors(void);
618 epicsShareFuncSDDS extern void SDDS_SetError(char *error_text);
619 epicsShareFuncSDDS extern void SDDS_SetError0(char *error_text);
620 epicsShareFuncSDDS extern void SDDS_Bomb(char *message);
621 epicsShareFuncSDDS extern void SDDS_Warning(char *message);
622 epicsShareFuncSDDS extern void SDDS_RegisterProgramName(const char *name);
623#define SDDS_VERBOSE_PrintErrors 1
624#define SDDS_EXIT_PrintErrors 2
625 epicsShareFuncSDDS extern void SDDS_PrintErrors(FILE *fp, int32_t mode);
626#define SDDS_LAST_GetErrorMessages 0
627#define SDDS_ALL_GetErrorMessages 1
628 epicsShareFuncSDDS extern char **SDDS_GetErrorMessages(int32_t *number, int32_t mode);
629
630 epicsShareFuncSDDS extern char **SDDS_GetColumnNames(SDDS_DATASET *SDDS_dataset, int32_t *number);
631 epicsShareFuncSDDS extern char **SDDS_GetParameterNames(SDDS_DATASET *SDDS_dataset, int32_t *number);
632 epicsShareFuncSDDS extern char **SDDS_GetAssociateNames(SDDS_DATASET *SDDS_dataset, int32_t *number);
633 epicsShareFuncSDDS extern char **SDDS_GetArrayNames(SDDS_DATASET *SDDS_dataset, int32_t *number);
634
635 epicsShareFuncSDDS extern COLUMN_DEFINITION *SDDS_GetColumnDefinition(SDDS_DATASET *SDDS_dataset, char *name);
636 epicsShareFuncSDDS extern COLUMN_DEFINITION *SDDS_CopyColumnDefinition(COLUMN_DEFINITION **target, COLUMN_DEFINITION *source);
637 epicsShareFuncSDDS extern int32_t SDDS_FreeColumnDefinition(COLUMN_DEFINITION *source);
638 epicsShareFuncSDDS extern int32_t SDDS_TransferColumnDefinition(SDDS_DATASET *target, SDDS_DATASET *source, char *name, char *newName);
639 epicsShareFuncSDDS extern int32_t SDDS_DefineColumnLikeParameter(SDDS_DATASET *target, SDDS_DATASET *source, char *name, char *newName);
640 epicsShareFuncSDDS extern int32_t SDDS_DefineColumnLikeArray(SDDS_DATASET *target, SDDS_DATASET *source, char *name, char *newName);
641 epicsShareFuncSDDS extern int32_t SDDS_TransferAllColumnDefinitions(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source,
642 uint32_t mode);
643 epicsShareFuncSDDS extern int32_t SDDS_ParseNamelist(void *data, SDDS_FIELD_INFORMATION *fieldInfo, int32_t fieldInfos, char *s);
644 epicsShareFuncSDDS extern PARAMETER_DEFINITION *SDDS_GetParameterDefinition(SDDS_DATASET *SDDS_dataset, char *name);
646 epicsShareFuncSDDS extern int32_t SDDS_FreeParameterDefinition(PARAMETER_DEFINITION *source);
647 epicsShareFuncSDDS extern int32_t SDDS_TransferParameterDefinition(SDDS_DATASET *target, SDDS_DATASET *source, char *name, char *newName);
648 epicsShareFuncSDDS extern int32_t SDDS_DefineParameterLikeColumn(SDDS_DATASET *target, SDDS_DATASET *source, char *name, char *newName);
649 epicsShareFuncSDDS extern int32_t SDDS_DefineParameterLikeArray(SDDS_DATASET *target, SDDS_DATASET *source, char *name, char *newName);
650#define SDDS_TRANSFER_KEEPOLD 0x01UL
651#define SDDS_TRANSFER_OVERWRITE 0x02UL
652 epicsShareFuncSDDS extern int32_t SDDS_TransferAllParameterDefinitions(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source,
653 uint32_t mode);
654
655 epicsShareFuncSDDS extern ARRAY_DEFINITION *SDDS_GetArrayDefinition(SDDS_DATASET *SDDS_dataset, char *name);
656 epicsShareFuncSDDS extern ARRAY_DEFINITION *SDDS_CopyArrayDefinition(ARRAY_DEFINITION **target, ARRAY_DEFINITION *source);
657 epicsShareFuncSDDS extern int32_t SDDS_FreeArrayDefinition(ARRAY_DEFINITION *source);
658 epicsShareFuncSDDS extern int32_t SDDS_TransferArrayDefinition(SDDS_DATASET *target, SDDS_DATASET *source, char *name, char *newName);
659 epicsShareFuncSDDS extern int32_t SDDS_TransferAllArrayDefinitions(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source,
660 uint32_t mode);
661
662
663 epicsShareFuncSDDS extern ASSOCIATE_DEFINITION *SDDS_GetAssociateDefinition(SDDS_DATASET *SDDS_dataset, char *name);
665 epicsShareFuncSDDS extern int32_t SDDS_FreeAssociateDefinition(ASSOCIATE_DEFINITION *source);
666 epicsShareFuncSDDS extern int32_t SDDS_TransferAssociateDefinition(SDDS_DATASET *target, SDDS_DATASET *source, char *name, char *newName);
667
668 epicsShareFuncSDDS extern int32_t SDDS_GetColumnIndex(SDDS_DATASET *SDDS_dataset, char *name);
669 epicsShareFuncSDDS extern int32_t SDDS_GetParameterIndex(SDDS_DATASET *SDDS_dataset, char *name);
670 epicsShareFuncSDDS extern int32_t SDDS_GetArrayIndex(SDDS_DATASET *SDDS_dataset, char *name);
671 epicsShareFuncSDDS extern int32_t SDDS_GetAssociateIndex(SDDS_DATASET *SDDS_dataset, char *name);
672 epicsShareFuncSDDS extern int32_t SDDS_GetColumnType(SDDS_DATASET *SDDS_dataset, int32_t index);
673 epicsShareFuncSDDS extern int32_t SDDS_GetNamedColumnType(SDDS_DATASET *SDDS_dataset, char *name);
674 epicsShareFuncSDDS extern int32_t SDDS_GetParameterType(SDDS_DATASET *SDDS_dataset, int32_t index);
675 epicsShareFuncSDDS extern int32_t SDDS_GetNamedParameterType(SDDS_DATASET *SDDS_dataset, char *name);
676 epicsShareFuncSDDS extern int32_t SDDS_GetArrayType(SDDS_DATASET *SDDS_dataset, int32_t index);
677 epicsShareFuncSDDS extern int32_t SDDS_GetNamedArrayType(SDDS_DATASET *SDDS_dataset, char *name);
678 epicsShareFuncSDDS extern int32_t SDDS_GetTypeSize(int32_t type);
679 epicsShareFuncSDDS extern char *SDDS_GetTypeName(int32_t type);
680 epicsShareFuncSDDS extern int32_t SDDS_IdentifyType(char *typeName);
681
682#define FIND_ANY_TYPE 0
683#define FIND_SPECIFIED_TYPE 1
684#define FIND_NUMERIC_TYPE 2
685#define FIND_INTEGER_TYPE 3
686#define FIND_FLOATING_TYPE 4
687
688 epicsShareFuncSDDS extern char *SDDS_FindColumn(SDDS_DATASET *SDDS_dataset, int32_t mode, ...);
689 epicsShareFuncSDDS extern char *SDDS_FindParameter(SDDS_DATASET *SDDS_dataset, int32_t mode, ...);
690 epicsShareFuncSDDS extern char *SDDS_FindArray(SDDS_DATASET *SDDS_dataset, int32_t mode, ...);
691
692 epicsShareFuncSDDS extern int32_t SDDS_CheckColumn(SDDS_DATASET *SDDS_dataset, char *name, char *units, int32_t type, FILE *fp_message);
693 epicsShareFuncSDDS extern int32_t SDDS_CheckParameter(SDDS_DATASET *SDDS_dataset, char *name, char *units, int32_t type, FILE *fp_message);
694 epicsShareFuncSDDS extern int32_t SDDS_CheckArray(SDDS_DATASET *SDDS_dataset, char *name, char *units, int32_t type, FILE *fp_message);
695 epicsShareFuncSDDS extern int32_t SDDS_VerifyArrayExists(SDDS_DATASET *SDDS_dataset, int32_t mode, ...);
696 epicsShareFuncSDDS extern int32_t SDDS_VerifyColumnExists(SDDS_DATASET *SDDS_dataset, int32_t mode, ...);
697 epicsShareFuncSDDS extern int32_t SDDS_VerifyParameterExists(SDDS_DATASET *SDDS_dataset, int32_t mode, ...);
698 epicsShareFuncSDDS extern int32_t SDDS_PrintCheckText(FILE *fp, char *name, char *units, int32_t type, char *class_name, int32_t error_code);
699#define SDDS_CHECK_OKAY 0
700#define SDDS_CHECK_OK SDDS_CHECK_OKAY
701#define SDDS_CHECK_NONEXISTENT 1
702#define SDDS_CHECK_WRONGTYPE 2
703#define SDDS_CHECK_WRONGUNITS 3
704
705 epicsShareFuncSDDS extern int32_t SDDS_IsActive(SDDS_DATASET *SDDS_dataset);
706 epicsShareFuncSDDS extern int32_t SDDS_ForceInactive(SDDS_DATASET *SDDS_dataset);
707 epicsShareFuncSDDS extern int32_t SDDS_LockFile(FILE *fp, const char *filename, const char *callerName);
708 epicsShareFuncSDDS extern int32_t SDDS_FileIsLocked(const char *filename);
709 epicsShareFuncSDDS extern int32_t SDDS_BreakIntoLockedFile(char *filename);
710
711 epicsShareFuncSDDS extern int32_t SDDS_CopyString(char **target, const char *source);
712 epicsShareFuncSDDS extern int32_t SDDS_CopyStringArray(char **target, char **source, int64_t n_strings);
713 epicsShareFuncSDDS extern int32_t SDDS_FreeStringArray(char **string, int64_t strings);
714 epicsShareFuncSDDS extern int32_t SDDS_VerifyPrintfFormat(const char *format_string, int32_t type);
715 epicsShareFuncSDDS extern int32_t SDDS_HasWhitespace(char *string);
716 epicsShareFuncSDDS extern char *fgetsSkipComments(SDDS_DATASET *SDDS_dataset, char *s, int32_t slen, FILE *fp, char skip_char);
717 epicsShareFuncSDDS extern char *fgetsSkipCommentsResize(SDDS_DATASET *SDDS_dataset, char **s, int32_t *slen, FILE *fp, char skip_char);
718#if defined(zLib)
719 epicsShareFuncSDDS extern char *fgetsGZipSkipComments(SDDS_DATASET *SDDS_dataset, char *s, int32_t slen, gzFile gzfp, char skip_char);
720 epicsShareFuncSDDS extern char *fgetsGZipSkipCommentsResize(SDDS_DATASET *SDDS_dataset, char **s, int32_t *slen, gzFile gzfp, char skip_char);
721#endif
722 epicsShareFuncSDDS extern void SDDS_CutOutComments(SDDS_DATASET *SDDS_dataset,char *s, char cc);
723 epicsShareFuncSDDS extern void SDDS_EscapeNewlines(char *s);
724 epicsShareFuncSDDS extern void SDDS_EscapeQuotes(char *s, char quote_char);
725 epicsShareFuncSDDS extern void SDDS_UnescapeQuotes(char *s, char quote_char);
726 epicsShareFuncSDDS extern int32_t SDDS_IsQuoted(char *string, char *position, char quotation_mark);
727 epicsShareFuncSDDS extern int32_t SDDS_GetToken(char *s, char *buffer, int32_t buflen);
728 epicsShareFuncSDDS extern int32_t SDDS_GetToken2(char *s, char **st, int32_t *strlength, char *buffer, int32_t buflen);
729 epicsShareFuncSDDS extern int32_t SDDS_PadToLength(char *string, int32_t length);
730 epicsShareFuncSDDS extern void SDDS_EscapeCommentCharacters(char *string, char cc);
731 epicsShareFuncSDDS extern void SDDS_InterpretEscapes(char *s);
732
733 epicsShareFuncSDDS extern int32_t SDDS_ZeroMemory(void *mem, int64_t n_bytes);
734 epicsShareFuncSDDS extern int32_t SDDS_SetMemory(void *mem, int64_t n_elements, int32_t data_type, ...);
735#define SDDS_PRINT_NOQUOTES 0x0001UL
736 epicsShareFuncSDDS extern int32_t SDDS_SprintTypedValue(void *data, int64_t index, int32_t type, const char *format, char *buffer, uint32_t mode);
737 epicsShareFuncSDDS extern int32_t SDDS_SprintTypedValueFactor(void *data, int64_t index, int32_t type, const char *format, char *buffer, uint32_t mode, double factor);
738 epicsShareFuncSDDS extern int32_t SDDS_PrintTypedValue(void *data, int64_t index, int32_t type, char *format, FILE *fp, uint32_t mode);
739 epicsShareFuncSDDS extern int32_t SDDS_WriteTypedValue(void *data, int64_t index, int32_t type, char *format, FILE *fp);
740 epicsShareFuncSDDS extern void *SDDS_CastValue(void *data, int64_t index, int32_t data_type, int32_t desired_type, void *memory);
741 epicsShareFuncSDDS extern void SDDS_RemovePadding(char *s);
742 epicsShareFuncSDDS extern int32_t SDDS_StringIsBlank(char *s);
743 epicsShareFuncSDDS extern void *SDDS_AllocateMatrix(int32_t size, int64_t dim1, int64_t dim2);
744 epicsShareFuncSDDS extern void SDDS_FreeMatrix(void **ptr, int64_t dim1);
745 epicsShareFuncSDDS extern void SDDS_FreeArray(SDDS_ARRAY *array);
746 epicsShareFuncSDDS extern void *SDDS_MakePointerArray(void *data, int32_t type, int32_t dimensions, int32_t *dimension);
747 epicsShareFuncSDDS extern int32_t SDDS_ApplyFactorToParameter(SDDS_DATASET *SDDS_dataset, char *name, double factor);
748 epicsShareFuncSDDS extern int32_t SDDS_ApplyFactorToColumn(SDDS_DATASET *SDDS_dataset, char *name, double factor);
749 epicsShareFuncSDDS extern int32_t SDDS_DeleteParameterFixedValues(SDDS_DATASET *SDDS_dataset);
750 epicsShareFuncSDDS extern int32_t SDDS_SetDataMode(SDDS_DATASET *SDDS_dataset, int32_t newmode);
751 epicsShareFuncSDDS extern int32_t SDDS_CheckDataset(SDDS_DATASET *SDDS_dataset, const char *caller);
752 epicsShareFuncSDDS extern int32_t SDDS_CheckTabularData(SDDS_DATASET *SDDS_dataset, const char *caller);
753 epicsShareFuncSDDS extern int32_t SDDS_CheckDatasetStructureSize(int32_t size);
754#define SDDS_CheckTableStructureSize(a) SDDS_CheckDatasetStructureSize(a)
755
756#define TABULAR_DATA_CHECKS 0x0001UL
757 epicsShareFuncSDDS uint32_t SDDS_SetAutoCheckMode(uint32_t newMode);
758
759 epicsShareFuncSDDS extern int32_t SDDS_FlushBuffer(FILE *fp, SDDS_FILEBUFFER *fBuffer);
760 epicsShareFuncSDDS extern int32_t SDDS_BufferedWrite(void *target, int64_t targetSize, FILE *fp, SDDS_FILEBUFFER *fBuffer);
761
762 epicsShareFuncSDDS extern int32_t SDDS_ScanData(char *string, int32_t type, int32_t field_length, void *data, int64_t index, int32_t is_parameter);
763 epicsShareFuncSDDS extern int32_t SDDS_ScanData2(char *string, char **pstring, int32_t *strlength, int32_t type, int32_t field_length, void *data, int64_t index, int32_t is_parameter);
764
765 epicsShareFuncSDDS extern long double SDDS_ConvertToLongDouble(int32_t type, void *data, int64_t index);
766 epicsShareFuncSDDS extern double SDDS_ConvertToDouble(int32_t type, void *data, int64_t index);
767 epicsShareFuncSDDS extern int64_t SDDS_ConvertToLong64(int32_t type, void *data, int64_t index);
768 epicsShareFuncSDDS extern int32_t SDDS_ConvertToLong(int32_t type, void *data, int64_t index);
769
770 epicsShareFuncSDDS extern int32_t SDDS_WriteBinaryString(char *string, FILE *fp, SDDS_FILEBUFFER *fBuffer);
771#if defined(zLib)
772 epicsShareFuncSDDS extern int32_t SDDS_GZipWriteBinaryString(char *string, gzFile gzfp, SDDS_FILEBUFFER *fBuffer);
773 epicsShareFuncSDDS extern int32_t SDDS_GZipFlushBuffer(gzFile gzfp, SDDS_FILEBUFFER *fBuffer);
774 epicsShareFuncSDDS extern int32_t SDDS_GZipBufferedWrite(void *target, int64_t targetSize, gzFile gzfp, SDDS_FILEBUFFER *fBuffer);
775#endif
776
777
778 epicsShareFuncSDDS extern int64_t SDDS_CreateRpnMemory(const char *name, short is_string);
779 epicsShareFuncSDDS extern int64_t SDDS_CreateRpnArray(char *name);
780
781#if defined(RPN_SUPPORT)
782 epicsShareFuncSDDS extern int32_t SDDS_FilterRowsWithRpnTest(SDDS_DATASET *SDDS_dataset, char *rpn_test);
783 epicsShareFuncSDDS extern int32_t SDDS_StoreParametersInRpnMemories(SDDS_DATASET *SDDS_dataset);
784 epicsShareFuncSDDS extern int32_t SDDS_StoreRowInRpnMemories(SDDS_DATASET *SDDS_dataset, int64_t row);
785 epicsShareFuncSDDS extern int32_t SDDS_StoreColumnsInRpnArrays(SDDS_DATASET *SDDS_dataset);
786 epicsShareFuncSDDS extern int32_t SDDS_ComputeColumn(SDDS_DATASET *SDDS_dataset, int32_t column, char *equation);
787 epicsShareFuncSDDS extern int32_t SDDS_ComputeParameter(SDDS_DATASET *SDDS_dataset, int32_t column, char *equation);
788#endif
789
790#define SDDS_BIGENDIAN_SEEN 0x0001UL
791#define SDDS_LITTLEENDIAN_SEEN 0x0002UL
792#define SDDS_FIXED_ROWCOUNT_SEEN 0x0004UL
793#define SDDS_BIGENDIAN SDDS_BIGENDIAN_SEEN
794#define SDDS_LITTLEENDIAN SDDS_LITTLEENDIAN_SEEN
795#define SDDS_FIXED_ROWCOUNT SDDS_FIXED_ROWCOUNT_SEEN
796 epicsShareFuncSDDS extern int32_t SDDS_IsBigEndianMachine();
797 void SDDS_SwapShort(short *data);
798 void SDDS_SwapUShort(unsigned short *data);
799 epicsShareFuncSDDS extern void SDDS_SwapLong(int32_t *data);
800 epicsShareFuncSDDS extern void SDDS_SwapULong(uint32_t *data);
801 epicsShareFuncSDDS extern void SDDS_SwapLong64(int64_t *data);
802 epicsShareFuncSDDS extern void SDDS_SwapULong64(uint64_t *data);
803 void SDDS_SwapFloat(float *data);
804 void SDDS_SwapDouble(double *data);
805 void SDDS_SwapLongDouble(long double *data);
806 epicsShareFuncSDDS extern int32_t SDDS_SwapEndsArrayData(SDDS_DATASET *SDDSin);
807 epicsShareFuncSDDS extern int32_t SDDS_SwapEndsParameterData(SDDS_DATASET *SDDSin) ;
808 epicsShareFuncSDDS extern int32_t SDDS_SwapEndsColumnData(SDDS_DATASET *SDDSin);
809
810
811
812
813
814
815 epicsShareFuncSDDS extern int32_t SDDS_ReadNonNativePage(SDDS_DATASET *SDDS_dataset);
816 int32_t SDDS_ReadNonNativePageSparse(SDDS_DATASET *SDDS_dataset, uint32_t mode,
817 int64_t sparse_interval,
818 int64_t sparse_offset);
819 int32_t SDDS_ReadNonNativeBinaryPage(SDDS_DATASET *SDDS_dataset, int64_t sparse_interval, int64_t sparse_offset);
821 int32_t SDDS_ReadNonNativeBinaryArrays(SDDS_DATASET *SDDS_dataset);
822 int32_t SDDS_ReadNonNativeBinaryRow(SDDS_DATASET *SDDS_dataset, int64_t row, int32_t skip);
823 char *SDDS_ReadNonNativeBinaryString(FILE *fp, SDDS_FILEBUFFER *fBuffer, int32_t skip);
824#if defined(zLib)
825 char *SDDS_ReadNonNativeGZipBinaryString(gzFile gzfp, SDDS_FILEBUFFER *fBuffer, int32_t skip);
826#endif
827
828
829
830 epicsShareFuncSDDS extern int32_t SDDS_WriteNonNativeBinaryPage(SDDS_DATASET *SDDS_dataset);
832 int32_t SDDS_WriteNonNativeBinaryArrays(SDDS_DATASET *SDDS_dataset);
833 int32_t SDDS_WriteNonNativeBinaryRow(SDDS_DATASET *SDDS_dataset, int64_t row);
834
835 int32_t SDDS_WriteNonNativeBinaryString(char *string, FILE *fp, SDDS_FILEBUFFER *fBuffer);
836#if defined(zLib)
837 int32_t SDDS_GZipWriteNonNativeBinaryString(char *string, gzFile gzfp, SDDS_FILEBUFFER *fBuffer);
838#endif
839
840#define SDDS_MATCH_COLUMN 0
841#define SDDS_MATCH_PARAMETER 1
842#define SDDS_MATCH_ARRAY 2
843 epicsShareFuncSDDS extern char **getMatchingSDDSNames(SDDS_DATASET *dataset, char **matchName, int32_t matches, int32_t *names, short match_type);
844
845 epicsShareFuncSDDS extern SDDS_DATASET *SDDS_CreateEmptyDataset(void);
846
847#if SDDS_MPI_IO
848 /* SDDSmpi_output.c */
849 char *BlankToNull(char *string);
850 epicsShareFuncSDDS extern void SDDS_MPI_BOMB(char *text, MPI_File *mpi_file);
851 void SDDS_MPI_GOTO_ERROR(FILE *fp, char *str, int32_t mpierror, int32_t exit);
852 epicsShareFuncSDDS extern int32_t SDDS_MPI_File_Open(MPI_DATASET *MPI_dataset, char *filename, unsigned long flags);
853 char *SDDS_CreateNamelistField(char *name, char *value);
854 char *SDDS_CreateDescription(char *text, char *contents);
855 char *SDDS_CreateParameterDefinition(PARAMETER_DEFINITION *parameter_definition);
856 char *SDDS_CreateColumnDefinition(COLUMN_DEFINITION *column_definition);
857 char *SDDS_CreateArrayDefinition(ARRAY_DEFINITION *array_definition);
858 char *SDDS_CreateAssociateDefinition(ASSOCIATE_DEFINITION *associate_definition);
859 char *SDDS_CreateDataMode(DATA_MODE *data_mode);
860#define SDDS_MPI_WriteTable(a) SDDS_MPI_WritePage(a)
861 epicsShareFuncSDDS extern int32_t SDDS_MPI_WriteLayout(SDDS_DATASET *MPI_dataset);
862 epicsShareFuncSDDS extern int32_t SDDS_MPI_WritePage(SDDS_DATASET *MPI_dataset);
863 MPI_Datatype Convert_SDDStype_To_MPItype(int32_t SDDS_type);
864 epicsShareFuncSDDS extern int32_t SDDS_MPI_Terminate(SDDS_DATASET *MPI_dataset);
865 int32_t SDDS_MPI_InitializeOutput(SDDS_DATASET *MPI_dataset, char *description, char *contents, char *filename, unsigned long flags, short column_major);
866 int32_t SDDS_MPI_InitializeCopy(SDDS_DATASET *MPI_dataset_target, SDDS_DATASET *SDDS_source, char *filename, short column_major);
867
868 /*SDDS_MPI_binary.c writing data*/
869 epicsShareFuncSDDS extern int32_t SDDS_SetDefaultWriteBufferSize(int32_t newSize);
870 int32_t SDDS_CheckStringTruncated(void);
871 void SDDS_StringTuncated(void);
872 int32_t SDDS_SetDefaultStringLength(int32_t newValue);
873 int32_t SDDS_MPI_WriteBinaryPage(SDDS_DATASET *MPI_dataset);
874 int32_t SDDS_MPI_WriteBinaryString(SDDS_DATASET *MPI_dataset, char *string);
875 int32_t SDDS_MPI_WriteBinaryParameters(SDDS_DATASET *MPI_dataset);
876 int32_t SDDS_MPI_WriteBinaryArrays(SDDS_DATASET *MPI_dataset);
877 int32_t SDDS_MPI_WriteBinaryRow(SDDS_DATASET *MPI_dataset, int64_t row);
879 int32_t SDDS_MPI_WriteNonNativeBinaryString(SDDS_DATASET *MPI_dataset, char *string);
882 int32_t SDDS_MPI_WriteNonNativeBinaryRow(SDDS_DATASET *MPI_dataset, int64_t row);
884 int32_t SDDS_MPI_CollectiveReadByRow(SDDS_DATASET *SDDS_dataset);
885 MPI_Offset SDDS_MPI_Get_Column_Size(SDDS_DATASET *MPI_dataset);
886 int32_t SDDS_MPI_CollectiveWriteByRow(SDDS_DATASET *SDDS_dataset);
887 int32_t SDDS_MPI_Get_Title_Size(SDDS_DATASET *MPI_dataset);
888 int32_t SDDS_MPI_BufferedWrite(void *target, int64_t targetSize, SDDS_DATASET *MPI_dataset);
889 int32_t SDDS_MPI_FlushBuffer(SDDS_DATASET *MPI_Dataset);
890 int64_t SDDS_MPI_GetTotalRows(SDDS_DATASET *MPI_dataset);
891 int64_t SDDS_MPI_CountRowsOfInterest(SDDS_DATASET *SDDS_dataset, int64_t start_row, int64_t end_row);
893 MPI_Offset SDDS_MPI_GetTitleOffset(SDDS_DATASET *MPI_dataset);
894 /*SDDS_MPI_binary.c reading data*/
895 epicsShareFuncSDDS extern int32_t SDDS_SetDefaultReadBufferSize(int32_t newSize);
896 int32_t SDDS_MPI_BufferedRead(void *target, int64_t targetSize, SDDS_DATASET *MPI_dataset, SDDS_FILEBUFFER *fBuffer);
897 int32_t SDDS_MPI_ReadBinaryPage(SDDS_DATASET *MPI_dataset);
898 char *SDDS_MPI_ReadNonNativeBinaryString(SDDS_DATASET *MPI_dataset, SDDS_FILEBUFFER *fBuffer, int32_t skip);
899 int32_t SDDS_MPI_ReadBinaryParameters(SDDS_DATASET *MPI_dataset, SDDS_FILEBUFFER *fBuffer);
900 int32_t SDDS_MPI_ReadBinaryArrays(SDDS_DATASET *MPI_dataset, SDDS_FILEBUFFER *fBuffer);
901 int32_t SDDS_MPI_ReadBinaryRow(SDDS_DATASET *MPI_dataset, int64_t row, int32_t skip);
904 int32_t SDDS_MPI_ReadNonNativeBinaryRow(SDDS_DATASET *MPI_dataset, int64_t row, int32_t skip);
905 int32_t SDDS_MPI_ReadBinaryPage(SDDS_DATASET *MPI_dataset);
906 int32_t SDDS_MPI_ReadNonNativePage(SDDS_DATASET *MPI_dataset);
907 int32_t SDDS_MPI_ReadNonNativePageSparse(SDDS_DATASET *MPI_dataset, uint32_t mode);
910 int32_t SDDS_SetDefaultTitleBufferSize(int32_t newSize);
911 int32_t SDDS_MPI_WriteBinaryPageByColumn(SDDS_DATASET *MPI_dataset);
912 epicsShareFuncSDDS extern void SDDS_MPI_SetWriteKludgeUsleep(long value);
913 epicsShareFuncSDDS extern void SDDS_MPI_SetFileSync(short value);
914 epicsShareFuncSDDS extern void SDDS_MPI_Setup(SDDS_DATASET *SDDS_dataset, int32_t parallel_io, int32_t n_processors, int32_t myid, MPI_Comm comm, short master_read);
915
916 /*SDDSmpi_input.c */
917 epicsShareFuncSDDS extern int32_t SDDS_MPI_ReadPage(SDDS_DATASET *MPI_dataset);
918 epicsShareFuncSDDS extern int32_t SDDS_MPI_InitializeInput(SDDS_DATASET *MPI_dataset, char *filename);
919 epicsShareFuncSDDS extern int32_t SDDS_MPI_InitializeInputFromSearchPath(SDDS_DATASET *MPI_dataset, char *file);
920 epicsShareFuncSDDS extern int32_t SDDS_Master_InitializeInput(SDDS_DATASET *SDDS_dataset, MPI_DATASET *MPI_dataset, char *file);
921 epicsShareFuncSDDS extern int32_t SDDS_Master_InitializeInputFromSearchPath(SDDS_DATASET *SDDS_dataset, MPI_DATASET *MPI_dataset, char *file);
922 epicsShareFuncSDDS extern int32_t SDDS_Master_ReadPage(SDDS_DATASET *SDDS_dataset);
923#define SDDS_MPI_TotalRowCount(SDDS_DATASET) ((SDDS_DATASET)->MPI_dataset->total_rows)
924#endif
925
926#ifdef __cplusplus
927}
928#endif
929
930#endif
epicsShareFuncSDDS int32_t SDDS_DeleteColumn(SDDS_DATASET *SDDS_dataset, char *column_name)
Deletes a specified column from an SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_GetRowFlags(SDDS_DATASET *SDDS_dataset, int32_t *flag, int64_t rows)
Retrieves the acceptance flags for all rows in the current data table.
epicsShareFuncSDDS void SDDS_SwapULong64(uint64_t *data)
Swaps the endianness of a 64-bit unsigned integer.
epicsShareFuncSDDS void SDDS_UnescapeQuotes(char *s, char quote_char)
Removes escape characters from quote characters within a string.
void SDDS_SwapLongDouble(long double *data)
Swaps the endianness of a long double.
epicsShareFuncSDDS int32_t SDDS_CopyStringArray(char **target, char **source, int64_t n_strings)
Copies an array of strings from source to target.
epicsShareFuncSDDS double * SDDS_GetColumnInDoubles(SDDS_DATASET *SDDS_dataset, char *column_name)
Retrieves the data of a specified numerical column as an array of doubles, considering only rows mark...
epicsShareFuncSDDS int64_t * SDDS_GetParameterAsLong64(SDDS_DATASET *SDDS_dataset, char *parameter_name, int64_t *data)
Retrieves the value of a specified parameter as a 64-bit integer from the current data table of an SD...
epicsShareFuncSDDS int32_t SDDS_ParseNamelist(void *data, SDDS_FIELD_INFORMATION *fieldInfo, int32_t fieldInfos, char *s)
Parse a namelist string and populate the corresponding data structure.
epicsShareFuncSDDS char ** SDDS_GetArrayNames(SDDS_DATASET *SDDS_dataset, int32_t *number)
Retrieves the names of all arrays in the SDDS dataset.
int32_t SDDS_ReadNonNativeBinaryPage(SDDS_DATASET *SDDS_dataset, int64_t sparse_interval, int64_t sparse_offset)
Reads a non-native endian binary page from an SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_ReadAsciiPage(SDDS_DATASET *SDDS_dataset, int64_t sparse_interval, int64_t sparse_offset, int32_t sparse_statistics)
Reads the next SDDS ASCII page into memory with optional data sparsity and statistics.
epicsShareFuncSDDS int32_t SDDS_GetArrayIndex(SDDS_DATASET *SDDS_dataset, char *name)
Retrieves the index of a named array in the SDDS dataset.
epicsShareFuncSDDS ARRAY_DEFINITION * SDDS_GetArrayDefinition(SDDS_DATASET *SDDS_dataset, char *name)
Retrieves the definition of a specified array from the SDDS dataset.
epicsShareFuncSDDS void SDDS_SetReadRecoveryMode(SDDS_DATASET *SDDS_dataset, int32_t mode)
Sets the read recovery mode for an SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_GetNamedColumnType(SDDS_DATASET *SDDS_dataset, char *name)
Retrieves the data type of a column in the SDDS dataset by its name.
epicsShareFuncSDDS char ** SDDS_GetArrayInString(SDDS_DATASET *SDDS_dataset, char *array_name, int32_t *values)
Retrieves an array from the current data table of an SDDS dataset and converts its elements to string...
epicsShareFuncSDDS int32_t SDDS_GetColumnInformation(SDDS_DATASET *SDDS_dataset, char *field_name, void *memory, int32_t mode,...)
Retrieves information about a specified column in the SDDS dataset.
Definition SDDS_info.c:41
epicsShareFuncSDDS void SDDS_RemovePadding(char *s)
Removes leading and trailing whitespace from a string.
epicsShareFuncSDDS char ** SDDS_GetColumnInString(SDDS_DATASET *SDDS_dataset, char *column_name)
Retrieves the data of a specified column as an array of strings, considering only rows marked as "of ...
epicsShareFuncSDDS void * SDDS_GetValueByAbsIndex(SDDS_DATASET *SDDS_dataset, int32_t column_index, int64_t srow_index, void *memory)
Retrieves the value from a specified column and absolute row index, optionally storing it in provided...
SDDS_FIELD_INFORMATION SDDS_AssociateFieldInformation[SDDS_ASSOCIATE_FIELDS]
Field information for associate definitions.
Definition SDDS_data.c:225
epicsShareFuncSDDS int32_t SDDS_ZeroMemory(void *mem, int64_t n_bytes)
Sets a block of memory to zero.
SDDS_FIELD_INFORMATION SDDS_ArrayFieldInformation[SDDS_ARRAY_FIELDS]
Field information for array definitions.
Definition SDDS_data.c:175
epicsShareFuncSDDS void SDDS_SwapLong(int32_t *data)
Swaps the endianness of a 32-bit integer.
epicsShareFuncSDDS int32_t SDDS_SetColumnFromDoubles(SDDS_DATASET *SDDS_dataset, int32_t mode, double *data, int64_t rows,...)
Sets the values for a single data column using double-precision floating-point numbers.
epicsShareFuncSDDS void * SDDS_GetParameterByIndex(SDDS_DATASET *SDDS_dataset, int32_t index, void *memory)
Retrieves the value of a specified parameter by its index from the current data table of a data set.
epicsShareFuncSDDS int32_t SDDS_CheckEndOfFile(SDDS_DATASET *SDDS_dataset)
epicsShareFuncSDDS void SDDS_FreeMatrix(void **ptr, int64_t dim1)
Frees memory allocated for a two-dimensional matrix.
int32_t SDDS_WriteNonNativeBinaryRow(SDDS_DATASET *SDDS_dataset, int64_t row)
Writes a non-native endian binary row to an SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_CopyColumns(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source)
Definition SDDS_copy.c:387
epicsShareFuncSDDS char ** getMatchingSDDSNames(SDDS_DATASET *dataset, char **matchName, int32_t matches, int32_t *names, short match_type)
Retrieves an array of matching SDDS entity names based on specified criteria.
epicsShareFuncSDDS int32_t SDDS_SetColumnFromLongs(SDDS_DATASET *SDDS_dataset, int32_t mode, int32_t *data, int64_t rows,...)
Sets the values for a single data column using long integer numbers.
epicsShareFuncSDDS int32_t SDDS_TransferAssociateDefinition(SDDS_DATASET *target, SDDS_DATASET *source, char *name, char *newName)
Transfers an associate definition from a source dataset to a target dataset.
epicsShareFuncSDDS PARAMETER_DEFINITION * SDDS_GetParameterDefinition(SDDS_DATASET *SDDS_dataset, char *name)
Retrieves the definition of a specified parameter from the SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_ArrayCount(SDDS_DATASET *dataset)
Retrieves the number of arrays in the SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_GetColumnMemoryMode(SDDS_DATASET *SDDS_dataset)
epicsShareFuncSDDS int32_t SDDS_CopyParameters(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source)
Definition SDDS_copy.c:286
epicsShareFuncSDDS int32_t SDDS_CheckTabularData(SDDS_DATASET *SDDS_dataset, const char *caller)
Validates the consistency of tabular data within an SDDS dataset.
Definition SDDS_utils.c:577
epicsShareFuncSDDS char * SDDS_FindArray(SDDS_DATASET *SDDS_dataset, int32_t mode,...)
Finds the first array in the SDDS dataset that matches the specified criteria.
epicsShareFuncSDDS int32_t SDDS_SetMemory(void *mem, int64_t n_elements, int32_t data_type,...)
Initializes a memory block with a sequence of values based on a specified data type.
epicsShareFuncSDDS int32_t SDDS_IsValidName(const char *name, const char *dataClass)
Checks if a given name is valid for a specified class within the SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_CheckParameter(SDDS_DATASET *SDDS_dataset, char *name, char *units, int32_t type, FILE *fp_message)
Checks if a parameter exists in the SDDS dataset with the specified name, units, and type.
epicsShareFuncSDDS int32_t SDDS_DefineColumnLikeArray(SDDS_DATASET *target, SDDS_DATASET *source, char *name, char *newName)
Defines a column in the target dataset based on an array definition from the source dataset.
epicsShareFuncSDDS int32_t SDDS_GetAssociateInformation(SDDS_DATASET *SDDS_dataset, char *field_name, void *memory, int32_t mode,...)
Retrieves information about a specified associate in the SDDS dataset.
Definition SDDS_info.c:267
epicsShareFuncSDDS int32_t SDDS_DeleteParameter(SDDS_DATASET *SDDS_dataset, char *parameter_name)
Deletes a specified parameter from an SDDS dataset.
epicsShareFuncSDDS double SDDS_GetValueByIndexAsDouble(SDDS_DATASET *SDDS_dataset, int32_t column_index, int64_t srow_index)
Retrieves the value from a specified column and selected row, casting it to a double.
epicsShareFuncSDDS int32_t SDDS_DefineSimpleParameters(SDDS_DATASET *SDDS_dataset, int32_t number, char **name, char **unit, int32_t type)
Defines multiple simple data parameters of the same data type within the SDDS dataset.
epicsShareFuncSDDS char ** SDDS_GetAssociateNames(SDDS_DATASET *SDDS_dataset, int32_t *number)
Retrieves the names of all associates in the SDDS dataset.
epicsShareFuncSDDS COLUMN_DEFINITION * SDDS_CopyColumnDefinition(COLUMN_DEFINITION **target, COLUMN_DEFINITION *source)
Creates a copy of a column definition.
epicsShareFuncSDDS uint32_t SDDS_SetAutoCheckMode(uint32_t newMode)
Sets the automatic check mode for SDDS dataset validation.
Definition SDDS_utils.c:533
epicsShareFuncSDDS int32_t SDDS_CheckDataset(SDDS_DATASET *SDDS_dataset, const char *caller)
Validates the SDDS dataset pointer.
Definition SDDS_utils.c:552
epicsShareFuncSDDS int32_t SDDS_SetRowFlags(SDDS_DATASET *SDDS_dataset, int32_t row_flag_value)
Sets the acceptance flags for all rows in the current data table of a data set.
epicsShareFuncSDDS int32_t SDDS_InitializeAppendToPage(SDDS_DATASET *SDDS_dataset, const char *filename, int64_t updateInterval, int64_t *rowsPresentReturn)
Initializes the SDDS dataset for appending data to the last page of an existing file.
epicsShareFuncSDDS int32_t SDDS_SetColumnFlags(SDDS_DATASET *SDDS_dataset, int32_t column_flag_value)
Sets the acceptance flags for all columns in the current data table of a data set.
epicsShareFuncSDDS int32_t SDDS_RestoreLayout(SDDS_DATASET *SDDS_dataset)
Definition SDDS_copy.c:697
int SDDS_CompareIndexedNames(const void *s1, const void *s2)
Compares two SORTED_INDEX structures by their name fields.
epicsShareFuncSDDS int32_t SDDS_GetParameters(SDDS_DATASET *SDDS_dataset,...)
Retrieves multiple parameter values from the current data table of a data set.
epicsShareFuncSDDS int32_t SDDS_SwapEndsArrayData(SDDS_DATASET *SDDSin)
Swaps the endianness of the array data in an SDDS dataset.
epicsShareFuncSDDS 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.
epicsShareFuncSDDS int32_t SDDS_SetColumnFromFloats(SDDS_DATASET *SDDS_dataset, int32_t mode, float *data, int64_t rows,...)
Sets the values for a single data column using single-precision floating-point numbers.
epicsShareFuncSDDS int32_t SDDS_FreeColumnDefinition(COLUMN_DEFINITION *source)
Frees memory allocated for a column definition.
epicsShareFuncSDDS int32_t SDDS_Logic(int32_t previous, int32_t match, uint32_t logic)
Applies logical operations to determine the new state of a row flag based on previous and current mat...
epicsShareFuncSDDS double * SDDS_GetArrayInDoubles(SDDS_DATASET *SDDS_dataset, char *array_name, int32_t *values)
Retrieves an array from the current data table of an SDDS dataset and converts its elements to double...
epicsShareFuncSDDS char * SDDS_GetParameterAsFormattedString(SDDS_DATASET *SDDS_dataset, char *parameter_name, char **memory, char *suppliedformat)
Retrieves the value of a specified parameter as a formatted string from the current data table of an ...
epicsShareFuncSDDS int32_t SDDS_BreakIntoLockedFile(char *filename)
Attempts to override a locked file by creating a temporary copy.
epicsShareFuncSDDS int32_t SDDS_ReadNewBinaryRows(SDDS_DATASET *SDDS_dataset)
Reads new binary rows from the SDDS dataset.
epicsShareFuncSDDS SDDS_DATASET * SDDS_CreateEmptyDataset(void)
Creates an empty SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_DeleteParameterFixedValues(SDDS_DATASET *SDDS_dataset)
Deletes fixed values from all parameters in the SDDS dataset.
int32_t SDDS_WriteNonNativeBinaryString(char *string, FILE *fp, SDDS_FILEBUFFER *fBuffer)
Writes a non-native endian binary string to a file.
int32_t SDDS_WriteNonNativeBinaryArrays(SDDS_DATASET *SDDS_dataset)
Writes non-native endian binary arrays to an SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_SetColumnsOfInterest(SDDS_DATASET *SDDS_dataset, int32_t mode,...)
Sets the acceptance flags for columns based on specified naming criteria.
epicsShareFuncSDDS int32_t SDDS_SetNameValidityFlags(uint32_t flags)
Sets the validity flags for parameter and column names in the SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_InitializeCopy(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source, char *filename, char *filemode)
Definition SDDS_copy.c:40
epicsShareFuncSDDS int32_t SDDS_DefineColumnLikeParameter(SDDS_DATASET *target, SDDS_DATASET *source, char *name, char *newName)
Defines a column in the target dataset based on a parameter definition from the source dataset.
epicsShareFuncSDDS void * SDDS_Malloc(size_t size)
Allocates memory of a specified size.
Definition SDDS_utils.c:639
epicsShareFuncSDDS int32_t SDDS_GotoPage(SDDS_DATASET *SDDS_dataset, int32_t page_number)
Sets the current page of the SDDS dataset to the specified page number.
epicsShareFuncSDDS int32_t SDDS_ReadRecoveryPossible(SDDS_DATASET *SDDS_dataset)
Checks if any data in an SDDS page was recovered after an error was detected.
epicsShareFuncSDDS int32_t SDDS_DoFSync(SDDS_DATASET *SDDS_dataset)
Synchronizes the SDDS dataset's file to disk.
epicsShareFuncSDDS int32_t SDDS_BufferedWrite(void *target, int64_t targetSize, FILE *fp, SDDS_FILEBUFFER *fBuffer)
epicsShareFuncSDDS int32_t SDDS_LengthenTable(SDDS_DATASET *SDDS_dataset, int64_t n_additional_rows)
epicsShareFuncSDDS int32_t SDDS_WriteLayout(SDDS_DATASET *SDDS_dataset)
Writes the SDDS layout header to the output file.
epicsShareFuncSDDS int32_t SDDS_ReadPage(SDDS_DATASET *SDDS_dataset)
epicsShareFuncSDDS int32_t SDDS_DefineSimpleColumn(SDDS_DATASET *SDDS_dataset, const char *name, const char *unit, int32_t type)
Defines a simple data column within the SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_PrintCheckText(FILE *fp, char *name, char *units, int32_t type, char *class_name, int32_t error_code)
Prints detailed error messages related to SDDS entity checks.
epicsShareFuncSDDS double SDDS_ConvertToDouble(int32_t type, void *data, int64_t index)
Converts a value to double based on its type.
Definition SDDS_rpn.c:199
epicsShareFuncSDDS int32_t SDDS_InitializeHeaderlessInput(SDDS_DATASET *SDDS_dataset, char *filename)
Initializes the SDDS dataset for headerless input.
Definition SDDS_input.c:175
epicsShareFuncSDDS int32_t SDDS_SetDataMode(SDDS_DATASET *SDDS_dataset, int32_t newmode)
Sets the data mode (ASCII or Binary) for the SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_NumberOfErrors(void)
Retrieves the number of errors recorded by SDDS library routines.
Definition SDDS_utils.c:304
epicsShareFuncSDDS int32_t SDDS_SetParameter(SDDS_DATASET *SDDS_dataset, int32_t mode,...)
epicsShareFuncSDDS void * SDDS_GetCastMatrixOfRows(SDDS_DATASET *SDDS_dataset, int64_t *n_rows, int32_t sddsType)
Retrieves all rows marked as "of interest" as a matrix, casting each value to a specified numerical t...
epicsShareFuncSDDS int32_t SDDS_VerifyParameterExists(SDDS_DATASET *SDDS_dataset, int32_t mode,...)
Verifies the existence of a parameter in the SDDS dataset based on specified criteria.
epicsShareFuncSDDS int32_t SDDS_ReadPageSparse(SDDS_DATASET *SDDS_dataset, uint32_t mode, int64_t sparse_interval, int64_t sparse_offset, int32_t sparse_statistics)
epicsShareFuncSDDS void SDDS_Bomb(char *message)
Terminates the program after printing an error message and recorded errors.
Definition SDDS_utils.c:342
epicsShareFuncSDDS int64_t SDDS_MatchRowsOfInterest(SDDS_DATASET *SDDS_dataset, char *selection_column, char *label_to_match, int32_t logic)
Matches and marks rows of interest in an SDDS dataset based on label matching.
epicsShareFuncSDDS char ** SDDS_GetParameterNames(SDDS_DATASET *SDDS_dataset, int32_t *number)
Retrieves the names of all parameters in the SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_WriteBinaryString(char *string, FILE *fp, SDDS_FILEBUFFER *fBuffer)
Writes a binary string to a file with buffering.
epicsShareFuncSDDS char * SDDS_FindParameter(SDDS_DATASET *SDDS_dataset, int32_t mode,...)
Finds the first parameter in the SDDS dataset that matches the specified criteria.
SDDS_FIELD_INFORMATION SDDS_ColumnFieldInformation[SDDS_COLUMN_FIELDS]
Field information for column definitions.
Definition SDDS_data.c:193
epicsShareFuncSDDS void SDDS_SetError(char *error_text)
Records an error message in the SDDS error stack.
Definition SDDS_utils.c:379
int SDDS_CompareIndexedNamesPtr(const void *s1, const void *s2)
Compares two pointers to SORTED_INDEX structures by their name fields.
epicsShareFuncSDDS int32_t SDDS_GetNamedParameterType(SDDS_DATASET *SDDS_dataset, char *name)
Retrieves the data type of a parameter in the SDDS dataset by its name.
epicsShareFuncSDDS int32_t SDDS_GetToken(char *s, char *buffer, int32_t buflen)
Extracts the next token from a string, handling quoted substrings and escape characters.
epicsShareFuncSDDS int64_t SDDS_SetRowsOfInterest(SDDS_DATASET *SDDS_dataset, char *selection_column, int32_t mode,...)
Sets the rows of interest in an SDDS dataset based on various selection criteria.
epicsShareFuncSDDS int32_t SDDS_ParameterCount(SDDS_DATASET *dataset)
Retrieves the number of parameters in the SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_SetParameterUnitsConversion(SDDS_DATASET *SDDS_dataset, char *column_name, char *new_units, char *old_units, double factor)
Sets unit conversions for a specified parameter in an SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_SetColumnUnitsConversion(SDDS_DATASET *SDDS_dataset, char *column_name, char *new_units, char *old_units, double factor)
Sets unit conversions for a specified column in an SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_ColumnCount(SDDS_DATASET *dataset)
Retrieves the number of columns in the SDDS dataset.
epicsShareFuncSDDS void * SDDS_GetParameter(SDDS_DATASET *SDDS_dataset, char *parameter_name, void *memory)
Retrieves the value of a specified parameter from the current data table of a data set.
epicsShareFuncSDDS double SDDS_GetValueAsDouble(SDDS_DATASET *SDDS_dataset, char *column_name, int64_t srow_index)
Retrieves the value from a specified column and selected row, casting it to a double.
epicsShareFuncSDDS int32_t SDDS_GetTypeSize(int32_t type)
Retrieves the size in bytes of a specified SDDS data type.
epicsShareFuncSDDS ASSOCIATE_DEFINITION * SDDS_CopyAssociateDefinition(ASSOCIATE_DEFINITION **target, ASSOCIATE_DEFINITION *source)
Creates a copy of an associate definition.
Definition SDDS_utils.c:920
epicsShareFuncSDDS int32_t SDDS_DefineAssociate(SDDS_DATASET *SDDS_dataset, const char *name, const char *filename, const char *path, const char *description, const char *contents, int32_t sdds)
Defines an associate for the SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_ClearPage(SDDS_DATASET *SDDS_dataset)
epicsShareFuncSDDS int32_t SDDS_AssertColumnFlags(SDDS_DATASET *SDDS_dataset, uint32_t mode,...)
Sets acceptance flags for columns based on specified criteria.
epicsShareFuncSDDS void SDDS_InterpretEscapes(char *s)
Interprets and converts escape sequences in a string.
epicsShareFuncSDDS int32_t SDDS_BufferedRead(void *target, int64_t targetSize, FILE *fp, SDDS_FILEBUFFER *fBuffer, int32_t type, int32_t byteOrder)
Definition SDDS_binary.c:96
epicsShareFuncSDDS int32_t SDDS_SetRowCountMode(SDDS_DATASET *SDDS_dataset, uint32_t mode)
Sets the row count mode for the SDDS dataset.
epicsShareFuncSDDS void SDDS_ClearErrors(void)
Clears all recorded error messages from the SDDS error stack.
Definition SDDS_utils.c:318
epicsShareFuncSDDS void SDDS_SetColumnMemoryMode(SDDS_DATASET *SDDS_dataset, uint32_t mode)
epicsShareFuncSDDS int64_t SDDS_GetRowLimit()
epicsShareFuncSDDS int32_t SDDS_UpdateRowCount(SDDS_DATASET *SDDS_dataset)
epicsShareFuncSDDS void * SDDS_GetInternalColumn(SDDS_DATASET *SDDS_dataset, char *column_name)
Retrieves an internal pointer to the data of a specified column, including all rows.
void SDDS_SwapUShort(unsigned short *data)
Swaps the endianness of an unsigned short integer.
epicsShareFuncSDDS int32_t SDDS_DisconnectFile(SDDS_DATASET *SDDS_dataset)
Disconnects the SDDS dataset from its associated file.
Definition SDDS_output.c:70
epicsShareFuncSDDS int32_t * SDDS_GetArrayInLong(SDDS_DATASET *SDDS_dataset, char *array_name, int32_t *values)
Retrieves an array from the current data table of an SDDS dataset and converts its elements to 32-bit...
epicsShareFuncSDDS int32_t SDDS_ReconnectInputFile(SDDS_DATASET *SDDS_dataset, long position)
Reconnects the input file for the SDDS dataset at a specified position.
epicsShareFuncSDDS int32_t SDDS_ProcessParameterString(SDDS_DATASET *SDDS_dataset, char *string, int32_t mode)
Process a parameter definition string.
epicsShareFuncSDDS void * SDDS_MakePointerArray(void *data, int32_t type, int32_t dimensions, int32_t *dimension)
Creates a multi-dimensional pointer array from a contiguous data block.
epicsShareFuncSDDS long double SDDS_ConvertToLongDouble(int32_t type, void *data, int64_t index)
Converts a value to long double based on its type.
Definition SDDS_rpn.c:159
int32_t SDDS_ReadNonNativePageSparse(SDDS_DATASET *SDDS_dataset, uint32_t mode, int64_t sparse_interval, int64_t sparse_offset)
Reads a sparse non-native endian page from an SDDS dataset.
epicsShareFuncSDDS int64_t SDDS_CreateRpnArray(char *name)
Stub function for creating RPN arrays when RPN_SUPPORT is not enabled.
Definition SDDS_rpn.c:795
epicsShareFuncSDDS int32_t SDDS_Parallel_InitializeOutput(SDDS_DATASET *SDDS_dataset, const char *description, const char *contents, const char *filename)
Initializes the SDDS output dataset for parallel processing.
epicsShareFuncSDDS int32_t SDDS_IdentifyType(char *typeName)
Identifies the SDDS data type based on its string name.
epicsShareFuncSDDS int32_t SDDS_SetParametersFromDoubles(SDDS_DATASET *SDDS_dataset, int32_t mode,...)
epicsShareFuncSDDS int32_t SDDS_CheckColumn(SDDS_DATASET *SDDS_dataset, char *name, char *units, int32_t type, FILE *fp_message)
Checks if a column exists in the SDDS dataset with the specified name, units, and type.
epicsShareFuncSDDS int32_t SDDS_CopyLayout(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source)
Definition SDDS_copy.c:222
epicsShareFuncSDDS void * SDDS_GetMatrixFromColumn(SDDS_DATASET *SDDS_dataset, char *column_name, int64_t dimension1, int64_t dimension2, int32_t mode)
Extracts a matrix from a specified column in the current data table of an SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_SetDefaultIOBufferSize(int32_t bufferSize)
Definition SDDS_binary.c:66
epicsShareFuncSDDS char ** SDDS_GetColumnNames(SDDS_DATASET *SDDS_dataset, int32_t *number)
Retrieves the names of all columns in the SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_GetArrayInformation(SDDS_DATASET *SDDS_dataset, char *field_name, void *memory, int32_t mode,...)
Retrieves information about a specified array in the SDDS dataset.
Definition SDDS_info.c:192
epicsShareFuncSDDS int32_t SDDS_DefineParameterLikeArray(SDDS_DATASET *target, SDDS_DATASET *source, char *name, char *newName)
Defines a parameter in the target dataset based on an array definition from the source dataset.
epicsShareFuncSDDS int32_t SDDS_ProcessColumnString(SDDS_DATASET *SDDS_dataset, char *string, int32_t mode)
Process a column definition string.
epicsShareFuncSDDS int32_t SDDS_CopyRows(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source, int64_t firstRow, int64_t lastRow)
Definition SDDS_copy.c:882
epicsShareFuncSDDS int32_t SDDS_AppendToArrayVararg(SDDS_DATASET *SDDS_dataset, char *array_name, int32_t mode, void *data_pointer, int32_t elements,...)
Appends data to an existing array variable in the SDDS dataset using variable arguments for dimension...
epicsShareFuncSDDS int32_t SDDS_PrintTypedValue(void *data, int64_t index, int32_t type, char *format, FILE *fp, uint32_t mode)
Prints a data value of a specified type using an optional printf format string.
Definition SDDS_utils.c:59
epicsShareFuncSDDS int32_t SDDS_ShortenTable(SDDS_DATASET *SDDS_dataset, int64_t rows)
epicsShareFuncSDDS int32_t SDDS_GetArrayType(SDDS_DATASET *SDDS_dataset, int32_t index)
Retrieves the data type of an array in the SDDS dataset by its index.
epicsShareFuncSDDS void * SDDS_GetColumn(SDDS_DATASET *SDDS_dataset, char *column_name)
Retrieves a copy of the data for a specified column, including only rows marked as "of interest".
epicsShareFuncSDDS int32_t SDDS_MatchArrays(SDDS_DATASET *SDDS_dataset, char ***match, int32_t matchMode, int32_t typeMode,...)
Matches and retrieves array names from an SDDS dataset based on specified criteria.
epicsShareFuncSDDS int64_t SDDS_ConvertToLong64(int32_t type, void *data, int64_t index)
Converts a value to a 64-bit integer based on its type.
Definition SDDS_rpn.c:239
epicsShareFuncSDDS void * SDDS_Calloc(size_t nelem, size_t elem_size)
Allocates zero-initialized memory for an array of elements.
Definition SDDS_utils.c:617
epicsShareFuncSDDS double * SDDS_GetParameterAsDouble(SDDS_DATASET *SDDS_dataset, char *parameter_name, double *data)
Retrieves the value of a specified parameter as a double from the current data table of an SDDS datas...
epicsShareFuncSDDS int32_t SDDS_FreeStringData(SDDS_DATASET *SDDS_dataset)
epicsShareFuncSDDS void * SDDS_AllocateMatrix(int32_t size, int64_t dim1, int64_t dim2)
Allocates a two-dimensional matrix with zero-initialized elements.
epicsShareFuncSDDS void SDDS_SetTerminateMode(uint32_t mode)
epicsShareFuncSDDS char * fgetsSkipCommentsResize(SDDS_DATASET *SDDS_dataset, char **s, int32_t *slen, FILE *fp, char skip_char)
Reads a line from a file with dynamic buffer resizing while skipping comment lines.
epicsShareFuncSDDS void * SDDS_CastValue(void *data, int64_t index, int32_t data_type, int32_t desired_type, void *memory)
Casts a value from one SDDS data type to another.
epicsShareFuncSDDS long SDDS_DisconnectInputFile(SDDS_DATASET *SDDS_dataset)
Disconnects the input file from the SDDS dataset.
epicsShareFuncSDDS int64_t SDDS_CountRowsOfInterest(SDDS_DATASET *SDDS_dataset)
Counts the number of rows marked as "of interest" in the current data table.
epicsShareFuncSDDS void SDDS_SwapLong64(int64_t *data)
Swaps the endianness of a 64-bit integer.
epicsShareFuncSDDS void * SDDS_GetMatrixOfRows(SDDS_DATASET *SDDS_dataset, int64_t *n_rows)
Retrieves all rows marked as "of interest" as a matrix (array of row arrays).
epicsShareFuncSDDS int32_t SDDS_ApplyFactorToColumn(SDDS_DATASET *SDDS_dataset, char *name, double factor)
Applies a scaling factor to all elements of a specific column in the SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_ScanData(char *string, int32_t type, int32_t field_length, void *data, int64_t index, int32_t is_parameter)
Scans a string and saves the parsed value into a data pointer according to the specified data type.
epicsShareFuncSDDS int32_t SDDS_CheckArray(SDDS_DATASET *SDDS_dataset, char *name, char *units, int32_t type, FILE *fp_message)
Checks if an array exists in the SDDS dataset with the specified name, units, and type.
epicsShareFuncSDDS void * SDDS_GetNumericColumn(SDDS_DATASET *SDDS_dataset, char *column_name, int32_t desiredType)
Retrieves the data of a specified numerical column as an array of a desired numerical type,...
epicsShareFuncSDDS int32_t SDDS_MatchParameters(SDDS_DATASET *SDDS_dataset, char ***match, int32_t matchMode, int32_t typeMode,...)
Matches and retrieves parameter names from an SDDS dataset based on specified criteria.
epicsShareFuncSDDS void SDDS_EscapeQuotes(char *s, char quote_char)
Escapes quote characters within a string by inserting backslashes.
epicsShareFuncSDDS int32_t SDDS_AssertRowFlags(SDDS_DATASET *SDDS_dataset, uint32_t mode,...)
Sets acceptance flags for rows based on specified criteria.
epicsShareFuncSDDS int32_t SDDS_FileIsLocked(const char *filename)
Determines if a specified file is locked.
epicsShareFuncSDDS int32_t SDDS_ReadPageLastRows(SDDS_DATASET *SDDS_dataset, int64_t last_rows)
int32_t SDDS_ReadNonNativeBinaryRow(SDDS_DATASET *SDDS_dataset, int64_t row, int32_t skip)
Reads a non-native endian binary row from an SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_ChangeParameterInformation(SDDS_DATASET *SDDS_dataset, char *field_name, void *memory, int32_t mode,...)
Modifies a specific field in a parameter definition within the SDDS dataset.
Definition SDDS_info.c:485
epicsShareFuncSDDS int32_t SDDS_ForceInactive(SDDS_DATASET *SDDS_dataset)
Marks an SDDS dataset as inactive.
epicsShareFuncSDDS void * SDDS_GetValue(SDDS_DATASET *SDDS_dataset, char *column_name, int64_t srow_index, void *memory)
Retrieves the value from a specified column and selected row, optionally storing it in provided memor...
epicsShareFuncSDDS int32_t SDDS_MatchColumns(SDDS_DATASET *SDDS_dataset, char ***match, int32_t matchMode, int32_t typeMode,...)
Matches and retrieves column names from an SDDS dataset based on specified criteria.
epicsShareFuncSDDS int64_t SDDS_FilterRowsOfInterest(SDDS_DATASET *SDDS_dataset, char *filter_column, double lower, double upper, int32_t logic)
Filters rows of interest in an SDDS dataset based on numeric ranges in a specified column.
SDDS_FIELD_INFORMATION SDDS_DescriptionFieldInformation[SDDS_DESCRIPTION_FIELDS]
Field information for SDDS layout descriptions.
Definition SDDS_data.c:107
epicsShareFuncSDDS void SDDS_EscapeNewlines(char *s)
Escapes newline characters in a string by replacing them with "\\n".
epicsShareFuncSDDS int32_t SDDS_GetParameterType(SDDS_DATASET *SDDS_dataset, int32_t index)
Retrieves the data type of a parameter in the SDDS dataset by its index.
epicsShareFuncSDDS int32_t SDDS_TransferAllParameterDefinitions(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source, uint32_t mode)
Transfers all parameter definitions from a source dataset to a target dataset.
epicsShareFuncSDDS int32_t SDDS_ReconnectFile(SDDS_DATASET *SDDS_dataset)
Reconnects the SDDS dataset to its previously associated file.
epicsShareFuncSDDS int32_t SDDS_VerifyColumnExists(SDDS_DATASET *SDDS_dataset, int32_t mode,...)
Verifies the existence of a column in the SDDS dataset based on specified criteria.
epicsShareFuncSDDS int32_t SDDS_CountColumnsOfInterest(SDDS_DATASET *SDDS_dataset)
Counts the number of columns marked as "of interest" in the current data table.
epicsShareFuncSDDS int32_t SDDS_DeleteUnsetColumns(SDDS_DATASET *SDDS_dataset)
Deletes all columns from an SDDS dataset that are not marked as "of interest".
epicsShareFuncSDDS 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.
epicsShareFuncSDDS int32_t SDDS_GetDescription(SDDS_DATASET *SDDS_dataset, char **text, char **contents)
Retrieves the text and contents descriptions from an SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_GetColumnType(SDDS_DATASET *SDDS_dataset, int32_t index)
Retrieves the data type of a column in the SDDS dataset by its index.
epicsShareFuncSDDS 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.
epicsShareFuncSDDS int32_t SDDS_FreeStringArray(char **string, int64_t strings)
Frees an array of strings by deallocating each individual string.
epicsShareFuncSDDS int32_t SDDS_DeleteUnsetRows(SDDS_DATASET *SDDS_dataset)
Deletes rows from an SDDS dataset that are not marked as "of interest".
epicsShareFuncSDDS int32_t SDDS_WriteNonNativeBinaryPage(SDDS_DATASET *SDDS_dataset)
Writes a non-native endian binary page to an SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_CopyPage(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source)
Definition SDDS_copy.c:578
epicsShareFuncSDDS void SDDS_SetError0(char *error_text)
Internal function to record an error message in the SDDS error stack.
Definition SDDS_utils.c:395
epicsShareFuncSDDS int32_t SDDS_ProcessAssociateString(SDDS_DATASET *SDDS_dataset, char *string)
Process an associate definition string.
epicsShareFuncSDDS int32_t SDDS_TransferArrayDefinition(SDDS_DATASET *target, SDDS_DATASET *source, char *name, char *newName)
Transfers an array definition from a source dataset to a target dataset.
epicsShareFuncSDDS int32_t SDDS_GetColumnIndex(SDDS_DATASET *SDDS_dataset, char *name)
Retrieves the index of a named column in the SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_InitializeInput(SDDS_DATASET *SDDS_dataset, char *filename)
Definition SDDS_input.c:49
epicsShareFuncSDDS int32_t SDDS_UpdatePage(SDDS_DATASET *SDDS_dataset, uint32_t mode)
Updates the current page of the SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_GetParameterInformation(SDDS_DATASET *SDDS_dataset, char *field_name, void *memory, int32_t mode,...)
Retrieves information about a specified parameter in the SDDS dataset.
Definition SDDS_info.c:117
epicsShareFuncSDDS int64_t SDDS_FilterRowsByNumScan(SDDS_DATASET *SDDS_dataset, char *filter_column, uint32_t mode)
Filters rows of interest in an SDDS dataset based on numeric scanning of a specified column.
epicsShareFuncSDDS int32_t SDDS_CopyRowDirect(SDDS_DATASET *SDDS_target, int64_t target_row, SDDS_DATASET *SDDS_source, int64_t source_row)
Definition SDDS_copy.c:834
epicsShareFuncSDDS void * SDDS_GetValueByIndex(SDDS_DATASET *SDDS_dataset, int32_t column_index, int64_t srow_index, void *memory)
Retrieves the value from a specified column and selected row, optionally storing it in provided memor...
epicsShareFuncSDDS void * SDDS_Realloc(void *old_ptr, size_t new_size)
Reallocates memory to a new size.
Definition SDDS_utils.c:677
epicsShareFuncSDDS float * SDDS_GetColumnInFloats(SDDS_DATASET *SDDS_dataset, char *column_name)
Retrieves the data of a specified numerical column as an array of floats, considering only rows marke...
epicsShareFuncSDDS int32_t SDDS_FreeArrayDefinition(ARRAY_DEFINITION *source)
Frees memory allocated for an array definition.
epicsShareFuncSDDS char * fgetsSkipComments(SDDS_DATASET *SDDS_dataset, char *s, int32_t slen, FILE *fp, char skip_char)
Reads a line from a file while skipping comment lines.
int32_t SDDS_ReadNonNativeBinaryParameters(SDDS_DATASET *SDDS_dataset)
Reads non-native endian binary parameters from an SDDS dataset.
epicsShareFuncSDDS void SDDS_RegisterProgramName(const char *name)
Registers the executable program name for use in error messages.
Definition SDDS_utils.c:288
epicsShareFuncSDDS int32_t SDDS_DefineSimpleColumns(SDDS_DATASET *SDDS_dataset, int32_t number, char **name, char **unit, int32_t type)
Defines multiple simple data columns of the same data type within the SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_StringIsBlank(char *s)
Checks if a string is blank (contains only whitespace characters).
epicsShareFuncSDDS 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.
epicsShareFuncSDDS int32_t SDDS_SprintTypedValueFactor(void *data, int64_t index, int32_t type, const char *format, char *buffer, uint32_t mode, double factor)
Reallocates memory to a new size and zero-initializes the additional space.
Definition SDDS_utils.c:186
epicsShareFuncSDDS int32_t SDDS_CopyAdditionalRows(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source)
Definition SDDS_copy.c:519
epicsShareFuncSDDS int32_t SDDS_SetNoRowCounts(SDDS_DATASET *SDDS_dataset, int32_t value)
Sets the flag to enable or disable row counts in the SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_TransferColumnDefinition(SDDS_DATASET *target, SDDS_DATASET *source, char *name, char *newName)
Transfers a column definition from a source dataset to a target dataset.
epicsShareFuncSDDS PARAMETER_DEFINITION * SDDS_CopyParameterDefinition(PARAMETER_DEFINITION **target, PARAMETER_DEFINITION *source)
Creates a copy of a parameter definition.
epicsShareFuncSDDS int32_t SDDS_CopyString(char **target, const char *source)
Copies a source string to a target string with memory allocation.
Definition SDDS_utils.c:856
epicsShareFuncSDDS int32_t SDDS_Terminate(SDDS_DATASET *SDDS_dataset)
epicsShareFuncSDDS char * SDDS_GetTypeName(int32_t type)
Retrieves the name of a specified SDDS data type as a string.
epicsShareFuncSDDS int32_t SDDS_VerifyPrintfFormat(const char *format_string, int32_t type)
Verifies that a printf format string is compatible with a specified data type.
Definition SDDS_utils.c:750
epicsShareFuncSDDS int32_t SDDS_GetAssociateIndex(SDDS_DATASET *SDDS_dataset, char *name)
Retrieves the index of a named associate in the SDDS dataset.
int32_t SDDS_ReadNonNativeBinaryArrays(SDDS_DATASET *SDDS_dataset)
Reads non-native endian binary arrays from an SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_TransferAllArrayDefinitions(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source, uint32_t mode)
Transfers all array definitions from a source dataset to a target dataset.
epicsShareFuncSDDS short * SDDS_GetColumnInShort(SDDS_DATASET *SDDS_dataset, char *column_name)
Retrieves the data of a specified numerical column as an array of short integers, considering only ro...
epicsShareFuncSDDS int32_t SDDS_ProcessArrayString(SDDS_DATASET *SDDS_dataset, char *string)
Process an array definition string.
epicsShareFuncSDDS char * SDDS_GetParameterAsString(SDDS_DATASET *SDDS_dataset, char *parameter_name, char **memory)
Retrieves the value of a specified parameter as a string from the current data table of an SDDS datas...
epicsShareFuncSDDS int32_t SDDS_StartPage(SDDS_DATASET *SDDS_dataset, int64_t expected_n_rows)
epicsShareFuncSDDS int32_t SDDS_CopyRowsOfInterest(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source)
Definition SDDS_copy.c:439
SDDS_FIELD_INFORMATION SDDS_ParameterFieldInformation[SDDS_PARAMETER_FIELDS]
Field information for parameter definitions.
Definition SDDS_data.c:209
epicsShareFuncSDDS int32_t SDDS_TransferParameterDefinition(SDDS_DATASET *target, SDDS_DATASET *source, char *name, char *newName)
Transfers a parameter definition from a source dataset to a target dataset.
epicsShareFuncSDDS void * SDDS_GetRow(SDDS_DATASET *SDDS_dataset, int64_t srow_index, void *memory)
Retrieves the data of a specific selected row as an array, considering only columns marked as "of int...
epicsShareFuncSDDS int32_t SDDS_DefineParameterLikeColumn(SDDS_DATASET *target, SDDS_DATASET *source, char *name, char *newName)
Defines a parameter in the target dataset based on a column definition from the source dataset.
epicsShareFuncSDDS void SDDS_FreeArray(SDDS_ARRAY *array)
Frees memory allocated for an SDDS array structure.
void SDDS_SwapDouble(double *data)
Swaps the endianness of a double.
epicsShareFuncSDDS SDDS_ARRAY * SDDS_GetArray(SDDS_DATASET *SDDS_dataset, char *array_name, SDDS_ARRAY *memory)
Retrieves an array from the current data table of an SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_FreeAssociateDefinition(ASSOCIATE_DEFINITION *source)
Frees memory allocated for an associate definition.
Definition SDDS_utils.c:944
epicsShareFuncSDDS int32_t SDDS_EraseData(SDDS_DATASET *SDDS_dataset)
Erases all data entries in the SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_SetRowValues(SDDS_DATASET *SDDS_dataset, int32_t mode, int64_t row,...)
epicsShareFuncSDDS void SDDS_PrintErrors(FILE *fp, int32_t mode)
Prints recorded error messages to a specified file stream.
Definition SDDS_utils.c:432
epicsShareFuncSDDS void SDDS_Free(void *mem)
Free memory previously allocated by SDDS_Malloc.
Definition SDDS_utils.c:655
epicsShareFuncSDDS int32_t SDDS_GetRowFlag(SDDS_DATASET *SDDS_dataset, int64_t row)
Retrieves the acceptance flag of a specific row in the current data table.
epicsShareFuncSDDS int32_t SDDS_ApplyFactorToParameter(SDDS_DATASET *SDDS_dataset, char *name, double factor)
Applies a scaling factor to a specific parameter in the SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_DefineParameter1(SDDS_DATASET *SDDS_dataset, const char *name, const char *symbol, const char *units, const char *description, const char *format_string, int32_t type, void *fixed_value)
Defines a data parameter with a fixed numerical value.
epicsShareFuncSDDS int32_t SDDS_FreeParameterDefinition(PARAMETER_DEFINITION *source)
Frees memory allocated for a parameter definition.
epicsShareFuncSDDS int32_t SDDS_ConvertToLong(int32_t type, void *data, int64_t index)
Converts a value to a 32-bit integer based on its type.
Definition SDDS_rpn.c:279
epicsShareFuncSDDS ASSOCIATE_DEFINITION * SDDS_GetAssociateDefinition(SDDS_DATASET *SDDS_dataset, char *name)
Retrieves the definition of a specified associate from the SDDS dataset.
Definition SDDS_utils.c:883
int32_t SDDS_WriteNonNativeBinaryParameters(SDDS_DATASET *SDDS_dataset)
Writes non-native endian binary parameters to an SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_AppendLayout(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source, uint32_t mode)
Definition SDDS_copy.c:158
epicsShareFuncSDDS void SDDS_Warning(char *message)
Prints a warning message to stderr.
Definition SDDS_utils.c:362
void SDDS_SwapShort(short *data)
Swaps the endianness of a short integer.
epicsShareFuncSDDS int32_t SDDS_InitializeInputFromSearchPath(SDDS_DATASET *SDDSin, char *file)
SDDS_FIELD_INFORMATION SDDS_IncludeFieldInformation[SDDS_INCLUDE_FIELDS]
Field information for include directives.
Definition SDDS_data.c:240
epicsShareFuncSDDS int32_t SDDS_IsBigEndianMachine()
Determines whether the current machine uses big-endian byte ordering.
epicsShareFuncSDDS int32_t SDDS_GetNamedArrayType(SDDS_DATASET *SDDS_dataset, char *name)
Retrieves the data type of an array in the SDDS dataset by its name.
epicsShareFuncSDDS int32_t SDDS_SetArrayVararg(SDDS_DATASET *SDDS_dataset, char *array_name, int32_t mode, void *data_pointer,...)
Sets the values of an array variable in the SDDS dataset using variable arguments for dimensions.
epicsShareFuncSDDS int32_t * SDDS_GetColumnInLong(SDDS_DATASET *SDDS_dataset, char *column_name)
Retrieves the data of a specified numerical column as an array of 32-bit integers,...
epicsShareFuncSDDS int32_t SDDS_SyncDataSet(SDDS_DATASET *SDDS_dataset)
Synchronizes the SDDS dataset with the disk by flushing buffered data.
char * SDDS_ReadNonNativeBinaryString(FILE *fp, SDDS_FILEBUFFER *fBuffer, int32_t skip)
Reads a non-native endian binary string from a file.
epicsShareFuncSDDS int32_t SDDS_SetParameters(SDDS_DATASET *SDDS_dataset, int32_t mode,...)
epicsShareFuncSDDS int32_t SDDS_ChangeColumnInformation(SDDS_DATASET *SDDS_dataset, char *field_name, void *memory, int32_t mode,...)
Modifies a specific field in a column definition within the SDDS dataset.
Definition SDDS_info.c:364
epicsShareFuncSDDS char * SDDS_FindColumn(SDDS_DATASET *SDDS_dataset, int32_t mode,...)
Finds the first column in the SDDS dataset that matches the specified criteria.
epicsShareFuncSDDS int32_t SDDS_CopyArrays(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source)
Definition SDDS_copy.c:334
epicsShareFuncSDDS ARRAY_DEFINITION * SDDS_CopyArrayDefinition(ARRAY_DEFINITION **target, ARRAY_DEFINITION *source)
Creates a copy of an array definition.
epicsShareFuncSDDS int32_t SDDS_SetArrayUnitsConversion(SDDS_DATASET *SDDS_dataset, char *column_name, char *new_units, char *old_units, double factor)
Sets unit conversions for a specified array in an SDDS dataset.
epicsShareFuncSDDS int32_t * SDDS_GetParameterAsLong(SDDS_DATASET *SDDS_dataset, char *parameter_name, int32_t *data)
Retrieves the value of a specified parameter as a 32-bit integer from the current data table of a dat...
epicsShareFuncSDDS void SDDS_SwapULong(uint32_t *data)
Swaps the endianness of a 32-bit unsigned integer.
epicsShareFuncSDDS int32_t SDDS_LockFile(FILE *fp, const char *filename, const char *callerName)
Attempts to lock a specified file.
epicsShareFuncSDDS int32_t SDDS_ReadNonNativePage(SDDS_DATASET *SDDS_dataset)
Reads a non-native endian page from an SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_SetAutoReadRecovery(SDDS_DATASET *SDDS_dataset, uint32_t mode)
epicsShareFuncSDDS int32_t SDDS_HasWhitespace(char *string)
Checks if a string contains any whitespace characters.
epicsShareFuncSDDS void SDDS_DisableFSync(SDDS_DATASET *SDDS_dataset)
Disables file synchronization for the SDDS dataset.
void SDDS_SwapFloat(float *data)
Swaps the endianness of a float.
epicsShareFuncSDDS int32_t SDDS_VerifyArrayExists(SDDS_DATASET *SDDS_dataset, int32_t mode,...)
Verifies the existence of an array in the SDDS dataset based on specified criteria.
epicsShareFuncSDDS int32_t SDDS_GetToken2(char *s, char **st, int32_t *strlength, char *buffer, int32_t buflen)
Extracts the next token from a string, handling quoted substrings and escape characters,...
epicsShareFuncSDDS int32_t SDDS_InitializeAppend(SDDS_DATASET *SDDS_dataset, const char *filename)
Initializes the SDDS dataset for appending data by adding a new page to an existing file.
epicsShareFuncSDDS int32_t SDDS_PadToLength(char *string, int32_t length)
Pads a string with spaces to reach a specified length.
char * SDDS_data_mode[SDDS_NUM_DATA_MODES]
Array of supported data modes.
Definition SDDS_data.c:33
epicsShareFuncSDDS int32_t SDDS_WritePage(SDDS_DATASET *SDDS_dataset)
Writes the current data table to the output file.
epicsShareFuncSDDS void SDDS_CutOutComments(SDDS_DATASET *SDDS_dataset, char *s, char cc)
Removes comments from a string based on a specified comment character.
epicsShareFuncSDDS long double * SDDS_GetParameterAsLongDouble(SDDS_DATASET *SDDS_dataset, char *parameter_name, long double *data)
Retrieves the value of a specified parameter as a long double from the current data table of an SDDS ...
epicsShareFuncSDDS int64_t SDDS_CreateRpnMemory(const char *name, short is_string)
Stub function for creating RPN memory when RPN_SUPPORT is not enabled.
Definition SDDS_rpn.c:785
epicsShareFuncSDDS int32_t SDDS_ReadLayout(SDDS_DATASET *SDDS_dataset, FILE *fp)
Definition SDDS_input.c:517
epicsShareFuncSDDS int32_t SDDS_ChangeArrayInformation(SDDS_DATASET *SDDS_dataset, char *field_name, void *memory, int32_t mode,...)
Modifies a specific field in an array definition within the SDDS dataset.
Definition SDDS_info.c:597
epicsShareFuncSDDS int32_t SDDS_TransferAllColumnDefinitions(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source, uint32_t mode)
Transfers all column definitions from a source dataset to a target dataset.
epicsShareFuncSDDS COLUMN_DEFINITION * SDDS_GetColumnDefinition(SDDS_DATASET *SDDS_dataset, char *name)
Retrieves the definition of a specified column from the SDDS dataset.
Definition SDDS_utils.c:978
epicsShareFuncSDDS int64_t SDDS_SetRowLimit(int64_t limit)
SDDS_FIELD_INFORMATION SDDS_DataFieldInformation[SDDS_DATA_FIELDS]
Field information for data mode settings.
Definition SDDS_data.c:159
epicsShareFuncSDDS int32_t SDDS_GetParameterIndex(SDDS_DATASET *SDDS_dataset, char *name)
Retrieves the index of a named parameter in the SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_SwapEndsColumnData(SDDS_DATASET *SDDSin)
Swaps the endianness of the column data in an SDDS dataset.
epicsShareFuncSDDS void SDDS_EnableFSync(SDDS_DATASET *SDDS_dataset)
Enables file synchronization for the SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_SprintTypedValue(void *data, int64_t index, int32_t type, const char *format, char *buffer, uint32_t mode)
Formats a data value of a specified type into a string buffer using an optional printf format string.
Definition SDDS_utils.c:151
epicsShareFuncSDDS int32_t SDDS_CheckDatasetStructureSize(int32_t size)
Verifies that the size of the SDDS_DATASET structure matches the expected size.
epicsShareFuncSDDS int32_t SDDS_IsActive(SDDS_DATASET *SDDS_dataset)
Checks whether an SDDS dataset is currently active.
epicsShareFuncSDDS void SDDS_DeferSavingLayout(SDDS_DATASET *SDDS_dataset, int32_t mode)
Definition SDDS_copy.c:603
epicsShareFuncSDDS int32_t SDDS_SwapEndsParameterData(SDDS_DATASET *SDDSin)
Swaps the endianness of the parameter data in an SDDS dataset.
epicsShareFuncSDDS void * SDDS_GetFixedValueParameter(SDDS_DATASET *SDDS_dataset, char *parameter_name, void *memory)
Retrieves the fixed value of a specified parameter from an SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_CopyRow(SDDS_DATASET *SDDS_target, int64_t target_row, SDDS_DATASET *SDDS_source, int64_t source_srow)
Definition SDDS_copy.c:778
epicsShareFuncSDDS 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.
epicsShareFuncSDDS 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.
epicsShareFuncSDDS int32_t SDDS_SaveLayout(SDDS_DATASET *SDDS_dataset)
Definition SDDS_copy.c:615
epicsShareFuncSDDS int32_t SDDS_IsQuoted(char *string, char *position, char quotation_mark)
Checks if a position in a string is within a quoted section.
Definition SDDS_input.c:217
epicsShareFuncSDDS int32_t SDDS_ItemInsideWindow(void *data, int64_t index, int32_t type, double lower_limit, double upper_limit)
Checks whether a data item is within a specified numeric window.
epicsShareFuncSDDS int32_t SDDS_FlushBuffer(FILE *fp, SDDS_FILEBUFFER *fBuffer)
epicsShareFuncSDDS char ** SDDS_GetErrorMessages(int32_t *number, int32_t mode)
Retrieves recorded error messages from the SDDS error stack.
Definition SDDS_utils.c:480
epicsShareFuncSDDS void * SDDS_GetDoubleMatrixFromColumn(SDDS_DATASET *SDDS_dataset, char *column_name, int64_t dimension1, int64_t dimension2, int32_t mode)
Extracts a matrix of doubles from a specified column in the current data table of an SDDS dataset.
epicsShareFuncSDDS void SDDS_EscapeCommentCharacters(char *string, char cc)
Escapes comment characters within a string by inserting backslashes.
epicsShareFuncSDDS int32_t SDDS_DefineSimpleParameter(SDDS_DATASET *SDDS_dataset, const char *name, const char *unit, int32_t type)
Defines a simple data parameter within the SDDS dataset.
epicsShareFuncSDDS int32_t SDDS_WriteTypedValue(void *data, int64_t index, int32_t type, char *format, FILE *fp)
Writes a typed value to an ASCII file stream.
Definition SDDS_ascii.c:57
epicsShareFuncSDDS int32_t SDDS_ScanData2(char *string, char **pstring, int32_t *strlength, int32_t type, int32_t field_length, void *data, int64_t index, int32_t is_parameter)
Scans a string and saves the parsed value into a data pointer, optimized for long strings.
epicsShareFuncSDDS int32_t SDDS_ColumnIsOfInterest(SDDS_DATASET *SDDS_dataset, char *name)
Determines if a specified column is marked as of interest in the dataset.
int32_t SDDS_MPI_WriteBinaryParameters(SDDS_DATASET *SDDS_dataset)
Write binary parameters of an SDDS dataset using MPI.
int32_t SDDS_MPI_ReadNonNativeBinaryRow(SDDS_DATASET *SDDS_dataset, int64_t row, int32_t skip)
Reads a single non-native binary row from a binary file buffer into the SDDS dataset using MPI.
int32_t SDDS_MPI_BufferedReadNonNativeBinaryTitle(SDDS_DATASET *SDDS_dataset)
Buffers and reads the non-native binary title data from an SDDS dataset using MPI.
int32_t SDDS_MPI_WriteBinaryRow(SDDS_DATASET *SDDS_dataset, int64_t row)
Write a binary row to an SDDS dataset using MPI.
int32_t SDDS_MPI_FlushBuffer(SDDS_DATASET *SDDS_dataset)
Flush the buffer by writing any remaining data to the MPI file.
int32_t SDDS_MPI_WriteBinaryString(SDDS_DATASET *SDDS_dataset, char *string)
Write a binary string to an SDDS dataset using MPI.
int32_t SDDS_MPI_WriteContinuousBinaryPage(SDDS_DATASET *SDDS_dataset)
Write a continuous binary page of the SDDS dataset using MPI.
int32_t SDDS_MPI_BufferedReadBinaryTitle(SDDS_DATASET *SDDS_dataset)
Buffers and reads the binary title data from an SDDS dataset using MPI.
void SDDS_StringTuncated(void)
Increment the truncated strings counter.
void SDDS_MPI_SetFileSync(short value)
Set the file synchronization flag.
int32_t SDDS_SetDefaultStringLength(int32_t newValue)
Set the default string length for SDDS.
int32_t SDDS_MPI_ReadNonNativePage(SDDS_DATASET *SDDS_dataset)
Reads a non-native binary page from an SDDS dataset using MPI parallel I/O.
int32_t SDDS_MPI_ReadBinaryParameters(SDDS_DATASET *SDDS_dataset, SDDS_FILEBUFFER *fBuffer)
Read binary parameters from the SDDS dataset using MPI.
int32_t SDDS_MPI_WriteNonNativeBinaryRow(SDDS_DATASET *SDDS_dataset, int64_t row)
Write a non-native binary row to an SDDS dataset using MPI.
int32_t SDDS_MPI_BufferedRead(void *target, int64_t targetSize, SDDS_DATASET *SDDS_dataset, SDDS_FILEBUFFER *fBuffer)
Buffered read from an SDDS dataset using MPI.
MPI_Offset SDDS_MPI_GetTitleOffset(SDDS_DATASET *SDDS_dataset)
Calculates the byte offset for the title section in a non-native binary SDDS dataset.
int32_t SDDS_MPI_CollectiveReadByRow(SDDS_DATASET *SDDS_dataset)
Reads SDDS dataset rows collectively by row using MPI parallel I/O.
int64_t SDDS_MPI_CountRowsOfInterest(SDDS_DATASET *SDDS_dataset, int64_t start_row, int64_t end_row)
Count the number of rows marked as "of interest" within a specified range.
int32_t SDDS_SetDefaultWriteBufferSize(int32_t newSize)
Set the default write buffer size for SDDS.
MPI_Offset SDDS_MPI_Get_Column_Size(SDDS_DATASET *SDDS_dataset)
Get the total size of all columns in an SDDS dataset.
int32_t SDDS_CheckStringTruncated(void)
Check the number of truncated strings.
int64_t SDDS_MPI_GetTotalRows(SDDS_DATASET *SDDS_dataset)
Get the total number of rows across all MPI processes.
int32_t SDDS_MPI_WriteBinaryPage(SDDS_DATASET *SDDS_dataset)
Write an SDDS binary page using MPI.
int32_t SDDS_MPI_WriteNonNativeBinaryString(SDDS_DATASET *SDDS_dataset, char *string)
Write a non-native binary string to an SDDS dataset using MPI.
int32_t SDDS_MPI_ReadNonNativeBinaryParameters(SDDS_DATASET *SDDS_dataset, SDDS_FILEBUFFER *fBuffer)
Read non-native binary parameters from the SDDS dataset using MPI.
int32_t SDDS_MPI_WriteBinaryArrays(SDDS_DATASET *SDDS_dataset)
Write binary arrays of an SDDS dataset using MPI.
int32_t SDDS_MPI_WriteNonNativeBinaryArrays(SDDS_DATASET *SDDS_dataset)
Write non-native binary arrays of an SDDS dataset using MPI.
int32_t SDDS_MPI_BufferedWrite(void *target, int64_t targetSize, SDDS_DATASET *SDDS_dataset)
Buffered write to an SDDS dataset using MPI.
int32_t SDDS_MPI_ReadBinaryArrays(SDDS_DATASET *SDDS_dataset, SDDS_FILEBUFFER *fBuffer)
Read binary arrays from the SDDS dataset using MPI.
int32_t SDDS_MPI_WriteNonNativeBinaryParameters(SDDS_DATASET *SDDS_dataset)
Write non-native binary parameters of an SDDS dataset using MPI.
int32_t SDDS_MPI_ReadBinaryPage(SDDS_DATASET *SDDS_dataset)
Reads a binary page from an SDDS dataset using MPI parallel I/O.
int32_t SDDS_SetDefaultReadBufferSize(int32_t newSize)
Set the default read buffer size for SDDS.
int32_t SDDS_MPI_ReadBinaryRow(SDDS_DATASET *SDDS_dataset, int64_t row, int32_t skip)
Read a binary row from the SDDS dataset using MPI.
int32_t SDDS_MPI_ReadNonNativeBinaryArrays(SDDS_DATASET *SDDS_dataset, SDDS_FILEBUFFER *fBuffer)
Reads non-native binary arrays from a binary file buffer into the SDDS dataset using MPI.
int32_t SDDS_MPI_CollectiveWriteByRow(SDDS_DATASET *SDDS_dataset)
Writes SDDS dataset rows collectively by row using MPI parallel I/O.
int32_t SDDS_SetDefaultTitleBufferSize(int32_t newSize)
Set the default title buffer size for SDDS.
void SDDS_MPI_SetWriteKludgeUsleep(long value)
Set the write kludge usleep duration.
int32_t SDDS_MPI_ReadNonNativePageSparse(SDDS_DATASET *SDDS_dataset, uint32_t mode)
Reads a sparse non-native binary page from an SDDS dataset using MPI parallel I/O.
int32_t SDDS_MPI_WriteNonNativeBinaryPage(SDDS_DATASET *SDDS_dataset)
Write a non-native binary page of the SDDS dataset using MPI.
int32_t SDDS_MPI_ReadNonNativeBinaryPage(SDDS_DATASET *SDDS_dataset)
Reads a non-native binary page from an SDDS dataset using MPI parallel I/O.
char * SDDS_MPI_ReadNonNativeBinaryString(SDDS_DATASET *SDDS_dataset, SDDS_FILEBUFFER *fBuffer, int32_t skip)
Read a non-native binary string from the SDDS dataset using MPI.
int32_t SDDS_type_size[SDDS_NUM_TYPES]
Array of sizes for each supported data type.
Definition SDDS_data.c:62
char * SDDS_type_name[SDDS_NUM_TYPES]
Array of supported data type names.
Definition SDDS_data.c:43
int32_t SDDS_MPI_InitializeInput(SDDS_DATASET *SDDS_dataset, char *filename)
Initializes an SDDS dataset for input using MPI.
int32_t SDDS_Master_ReadPage(SDDS_DATASET *SDDS_dataset)
Reads a single page of data from an SDDS dataset on the master MPI process and broadcasts it.
int32_t SDDS_MPI_InitializeInputFromSearchPath(SDDS_DATASET *SDDS_dataset, char *file)
Initializes an SDDS dataset for input by searching the provided search path using MPI.
int32_t SDDS_Master_InitializeInput(SDDS_DATASET *SDDS_dataset, MPI_DATASET *MPI_dataset, char *file)
Initializes an SDDS dataset for input on the master MPI process.
int32_t SDDS_Master_InitializeInputFromSearchPath(SDDS_DATASET *SDDS_dataset, MPI_DATASET *MPI_dataset, char *file)
Initializes an SDDS dataset for input from a search path on the master MPI process.
int32_t SDDS_MPI_ReadPage(SDDS_DATASET *SDDS_dataset)
Reads a page from an SDDS dataset using MPI.
int32_t SDDS_MPI_InitializeCopy(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source, char *filename, short column_major)
Initializes a copy of an SDDS dataset for MPI output.
int32_t SDDS_MPI_Terminate(SDDS_DATASET *SDDS_dataset)
Terminates the SDDS dataset by freeing all allocated resources and closing MPI files.
int32_t SDDS_MPI_WriteLayout(SDDS_DATASET *SDDS_dataset)
Writes the layout of the SDDS dataset to the MPI file.
char * SDDS_CreateDataMode(DATA_MODE *data_mode)
Creates a data mode block for the SDDS layout.
void SDDS_MPI_Setup(SDDS_DATASET *SDDS_dataset, int32_t parallel_io, int32_t n_processors, int32_t myid, MPI_Comm comm, short master_read)
Sets up the SDDS dataset for MPI operations.
char * BlankToNull(char *string)
Converts a blank string to NULL.
char * SDDS_CreateParameterDefinition(PARAMETER_DEFINITION *parameter_definition)
Creates a parameter definition block for the SDDS layout.
int32_t SDDS_MPI_File_Open(MPI_DATASET *MPI_dataset, char *filename, unsigned long flags)
Opens an MPI file with the specified flags.
char * SDDS_CreateDescription(char *text, char *contents)
Creates a description block for the SDDS layout.
MPI_Datatype Convert_SDDStype_To_MPItype(int32_t SDDS_type)
Converts an SDDS data type to the corresponding MPI data type.
void SDDS_MPI_BOMB(char *text, MPI_File *mpi_file)
Terminates the program after handling errors and cleaning up MPI resources.
char * SDDS_CreateColumnDefinition(COLUMN_DEFINITION *column_definition)
Creates a column definition block for the SDDS layout.
int32_t SDDS_MPI_WritePage(SDDS_DATASET *SDDS_dataset)
Writes a page of data to the MPI file associated with the SDDS dataset.
char * SDDS_CreateAssociateDefinition(ASSOCIATE_DEFINITION *associate_definition)
Creates an associate definition block for the SDDS layout.
char * SDDS_CreateNamelistField(char *name, char *value)
Creates a namelist field string from a name and value.
void SDDS_MPI_GOTO_ERROR(FILE *fp, char *str, int32_t mpierr, int32_t exit_code)
Handles MPI errors by printing an error message and optionally exiting.
int32_t SDDS_MPI_InitializeOutput(SDDS_DATASET *SDDS_dataset, char *description, char *contents, char *filename, unsigned long flags, short column_major)
Initializes the SDDS dataset for MPI output.
char * SDDS_CreateArrayDefinition(ARRAY_DEFINITION *array_definition)
Creates an array definition block for the SDDS layout.
SDDS Data Types Definitions.
#define SDDS_NUM_TYPES
Total number of defined SDDS data types.
Definition SDDStypes.h:97