File indexing completed on 2025-01-18 10:02:05
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148
0149
0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170
0171
0172
0173
0174
0175
0176
0177
0178
0179
0180
0181
0182
0183
0184
0185
0186
0187
0188
0189
0190
0191
0192
0193
0194
0195
0196
0197
0198
0199
0200
0201
0202
0203
0204
0205
0206
0207
0208
0209
0210
0211
0212
0213
0214
0215
0216
0217
0218
0219
0220
0221
0222
0223
0224
0225
0226
0227
0228
0229
0230
0231
0232
0233
0234
0235
0236
0237
0238
0239
0240
0241
0242
0243
0244
0245
0246
0247
0248
0249
0250
0251
0252
0253
0254
0255
0256
0257
0258
0259
0260
0261
0262
0263
0264
0265
0266
0267
0268
0269
0270
0271
0272
0273
0274
0275
0276
0277
0278
0279
0280
0281
0282
0283
0284
0285
0286
0287
0288
0289
0290
0291
0292
0293
0294
0295
0296 #if !defined(_SDDS_)
0297 #include <stdio.h>
0298 #include <stdarg.h>
0299 #include <stdlib.h>
0300
0301 #define SDDS_READMODE 1
0302 #define SDDS_WRITEMODE 2
0303 #define SDDS_MEMMODE 3
0304
0305 #define SDDS_MPI_READ_ONLY 0x0001UL
0306 #define SDDS_MPI_WRITE_ONLY 0x0002UL
0307 #define SDDS_MPI_READ_WRITE 0x0004UL
0308 #define SDDS_MPI_STRING_COLUMN_LEN 16
0309
0310 #if defined(SDDS_MPI_IO) && SDDS_MPI_IO
0311 #include "mpi.h"
0312 #include "mdb.h"
0313
0314 extern char SDDS_mpi_error_str[MPI_MAX_ERROR_STRING];
0315 extern int32_t SDDS_mpi_error_str_len;
0316 extern char *SDDS_MPI_FILE_TYPE[];
0317
0318 typedef struct {
0319 MPI_File MPI_file;
0320 MPI_Comm comm;
0321 MPI_Info File_info;
0322 int32_t myid;
0323 int32_t n_processors;
0324 MPI_Offset file_offset, file_size, column_offset;
0325 short collective_io;
0326 int32_t n_page;
0327 int32_t n_rows;
0328 int32_t total_rows;
0329 int32_t end_of_file;
0330 int32_t master_read;
0331 int32_t start_row, end_row;
0332 } MPI_DATASET;
0333 #endif
0334
0335 #if defined(zLib)
0336 #include "zlib.h"
0337 #endif
0338
0339 #ifdef __cplusplus
0340 extern "C" {
0341 #endif
0342
0343
0344 #define _SDDS_ 1
0345
0346 #define SDDS_VERSION 2
0347
0348 #include "SDDStypes.h"
0349 #if defined(_WIN32)
0350 typedef __int32 int32_t;
0351 typedef unsigned __int32 uint32_t;
0352 #define PRId32 "ld"
0353 #define SCNd32 "ld"
0354 #define PRIu32 "lu"
0355 #define SCNu32 "lu"
0356 #define INT32_MAX (2147483647)
0357 #else
0358 #if defined(vxWorks)
0359 #define PRId32 "ld"
0360 #define SCNd32 "ld"
0361 #define PRIu32 "lu"
0362 #define SCNu32 "lu"
0363 #define INT32_MAX (2147483647)
0364 #else
0365 #include <inttypes.h>
0366 #endif
0367 #endif
0368
0369 #undef epicsShareFuncSDDS
0370 #undef epicsShareExtern
0371 #if (defined(_WIN32) && !defined(__CYGWIN32__)) || (defined(__BORLANDC__) && defined(__linux__))
0372 #if defined(EXPORT_SDDS)
0373 #define epicsShareFuncSDDS __declspec(dllexport)
0374 #define epicsShareExtern extern __declspec(dllexport)
0375 #else
0376 #define epicsShareFuncSDDS
0377 #define epicsShareExtern extern __declspec(dllimport)
0378 #endif
0379 #else
0380 #define epicsShareFuncSDDS
0381 #define epicsShareExtern extern
0382 #endif
0383
0384
0385 #define RW_ASSOCIATES 0
0386
0387 #define SDDS_BINARY 1
0388 #define SDDS_ASCII 2
0389 #define SDDS_PARALLEL 3
0390 #define SDDS_NUM_DATA_MODES 2
0391
0392
0393
0394
0395
0396
0397
0398 epicsShareExtern char *SDDS_type_name[SDDS_NUM_TYPES];
0399 epicsShareExtern int32_t SDDS_type_size[SDDS_NUM_TYPES];
0400 extern char *SDDS_data_mode[SDDS_NUM_DATA_MODES];
0401
0402
0403 #define SDDS_MAXLINE 1024
0404
0405 #define SDDS_PRINT_BUFLEN 16834
0406
0407 #define SDDS_NORMAL_DEFINITION 0
0408 #define SDDS_WRITEONLY_DEFINITION 1
0409
0410 typedef struct {
0411 char *name, *symbol, *units, *description, *format_string;
0412 int32_t type;
0413 char *fixed_value;
0414
0415 int32_t definition_mode, memory_number;
0416 } PARAMETER_DEFINITION;
0417 #define SDDS_PARAMETER_FIELDS 7
0418
0419 typedef struct {
0420 char *name, *symbol, *units, *description, *format_string;
0421 int32_t type, field_length;
0422
0423 int32_t definition_mode, memory_number, pointer_number;
0424 } COLUMN_DEFINITION;
0425 #define SDDS_COLUMN_FIELDS 7
0426
0427 typedef struct {
0428 char *name, *symbol, *units, *description, *format_string, *group_name;
0429 int32_t type, field_length, dimensions;
0430 } ARRAY_DEFINITION;
0431 #define SDDS_ARRAY_FIELDS 9
0432
0433 typedef struct {
0434 char *name, *filename, *path, *description, *contents;
0435 int32_t sdds;
0436 } ASSOCIATE_DEFINITION;
0437 #define SDDS_ASSOCIATE_FIELDS 6
0438
0439 typedef struct {
0440 int32_t index;
0441 char *name;
0442 } SORTED_INDEX;
0443 int SDDS_CompareIndexedNames(void *s1, void *s2);
0444 int SDDS_CompareIndexedNamesPtr(const void *s1, const void *s2);
0445
0446 typedef struct {
0447 int32_t mode, lines_per_row, no_row_counts, fixed_row_count, fsync_data;
0448 int32_t additional_header_lines;
0449 } DATA_MODE;
0450
0451 #if !defined(zLib)
0452 typedef void *voidp;
0453 typedef voidp gzFile;
0454 #endif
0455
0456 typedef struct {
0457 int32_t n_columns, n_parameters, n_associates, n_arrays;
0458
0459 char *description;
0460 char *contents;
0461 int32_t version;
0462 short layout_written;
0463
0464 DATA_MODE data_mode;
0465 COLUMN_DEFINITION *column_definition;
0466 PARAMETER_DEFINITION *parameter_definition;
0467 ARRAY_DEFINITION *array_definition;
0468 ASSOCIATE_DEFINITION *associate_definition;
0469 SORTED_INDEX **column_index, **parameter_index, **array_index;
0470
0471 char *filename;
0472 FILE *fp;
0473 gzFile *gzfp;
0474 short disconnected;
0475 short gzipFile;
0476 short popenUsed;
0477 uint32_t byteOrderDeclared;
0478 } SDDS_LAYOUT;
0479
0480 typedef struct {
0481 ARRAY_DEFINITION *definition;
0482 int32_t *dimension, elements;
0483
0484
0485
0486 void *data;
0487 void *pointer;
0488 } SDDS_ARRAY;
0489
0490 typedef struct {
0491 char *data, *buffer;
0492 int32_t bytesLeft, bufferSize;
0493 } SDDS_FILEBUFFER ;
0494
0495 #define SDDS_FILEBUFFER_SIZE 262144
0496
0497 typedef struct {
0498 SDDS_LAYOUT layout, original_layout;
0499 short swapByteOrder;
0500 SDDS_FILEBUFFER fBuffer;
0501 SDDS_FILEBUFFER titleBuffer;
0502 int32_t page_number;
0503
0504 short mode;
0505 short page_started;
0506 int32_t pages_read;
0507 int32_t endOfFile_offset;
0508 int32_t *pagecount_offset;
0509 int32_t rowcount_offset;
0510 int32_t n_rows_written;
0511 int32_t last_row_written;
0512 int32_t first_row_in_mem;
0513 short writing_page;
0514 int32_t n_rows_allocated;
0515 int32_t n_rows;
0516 int32_t *row_flag;
0517 short file_had_data;
0518
0519
0520 short autoRecover;
0521 short autoRecovered;
0522 short parallel_io;
0523 int32_t n_of_interest;
0524 int32_t *column_order;
0525 int32_t *column_flag;
0526
0527
0528 SDDS_ARRAY *array;
0529
0530
0531
0532
0533
0534
0535 void **parameter;
0536
0537
0538
0539
0540
0541
0542 void **data;
0543 short column_major;
0544 #if defined(SDDS_MPI_IO) && SDDS_MPI_IO
0545 MPI_DATASET *MPI_dataset;
0546 #endif
0547 } SDDS_DATASET;
0548
0549 typedef SDDS_DATASET SDDS_TABLE;
0550
0551
0552 epicsShareFuncSDDS extern int32_t SDDS_InitializeOutput(SDDS_DATASET *SDDS_dataset, int32_t data_mode,
0553 int32_t lines_per_row, char *description,
0554 char *contents, char *filename);
0555 epicsShareFuncSDDS extern int32_t SDDS_Parallel_InitializeOutput(SDDS_DATASET *SDDS_dataset, char *description,
0556 char *contents, char *filename);
0557 epicsShareFuncSDDS extern int32_t SDDS_InitializeAppend(SDDS_DATASET *SDDS_dataset, char *filename);
0558 epicsShareFuncSDDS extern int32_t SDDS_InitializeAppendToPage(SDDS_DATASET *SDDS_dataset, char *filename,
0559 int32_t updateInterval,
0560 int32_t *rowsPresentReturn);
0561 epicsShareFuncSDDS extern int32_t SDDS_DisconnectFile(SDDS_DATASET *SDDS_dataset);
0562 epicsShareFuncSDDS extern int32_t SDDS_ReconnectFile(SDDS_DATASET *SDDS_dataset);
0563 epicsShareFuncSDDS extern int32_t SDDS_FreeStringData(SDDS_DATASET *SDDS_dataset);
0564 epicsShareFuncSDDS extern int32_t SDDS_Terminate(SDDS_DATASET *SDDS_dataset);
0565 epicsShareFuncSDDS extern void SDDS_SetTerminateMode(uint32_t mode);
0566 #define TERMINATE_DONT_FREE_TABLE_STRINGS 0x0001
0567 #define TERMINATE_DONT_FREE_ARRAY_STRINGS 0x0002
0568 epicsShareFuncSDDS extern int32_t SDDS_SetRowCountMode(SDDS_DATASET *SDDS_dataset, uint32_t mode);
0569 #define SDDS_VARIABLEROWCOUNT 0x0001UL
0570 #define SDDS_FIXEDROWCOUNT 0x0002UL
0571 #define SDDS_NOROWCOUNT 0x0004UL
0572 epicsShareFuncSDDS extern int32_t SDDS_SetAutoReadRecovery(SDDS_DATASET *SDDS_dataset, uint32_t mode);
0573 #define SDDS_NOAUTOREADRECOVER 0x0001UL
0574 #define SDDS_AUTOREADRECOVER 0x0002UL
0575 epicsShareFuncSDDS extern int32_t SDDS_UpdateRowCount(SDDS_DATASET *SDDS_dataset);
0576 epicsShareFuncSDDS extern void SDDS_DisableFSync(SDDS_DATASET *SDDS_dataset);
0577 epicsShareFuncSDDS extern void SDDS_EnableFSync(SDDS_DATASET *SDDS_dataset);
0578 epicsShareFuncSDDS extern int32_t SDDS_DoFSync(SDDS_DATASET *SDDS_dataset);
0579 epicsShareFuncSDDS extern int32_t SDDS_DefineParameter(SDDS_DATASET *SDDS_dataset, char *name, char *symbol, char *units, char *description,
0580 char *format_string, int32_t type, char *fixed_value);
0581 epicsShareFuncSDDS extern int32_t SDDS_DefineParameter1(SDDS_DATASET *SDDS_dataset, char *name, char *symbol, char *units, char *description,
0582 char *format_string, int32_t type, void *fixed_value);
0583 epicsShareFuncSDDS extern int32_t SDDS_DefineColumn(SDDS_DATASET *SDDS_dataset, char *name, char *symbol, char *units, char *description,
0584 char *format_string, int32_t type, int32_t field_length);
0585
0586 epicsShareFuncSDDS extern int32_t SDDS_DefineArray(SDDS_DATASET *SDDS_dataset, const char *name, char *symbol, char *units, char *description,
0587 char *format_string, int32_t type, int32_t field_length, int32_t dimensions, char *group_name);
0588 epicsShareFuncSDDS extern int32_t SDDS_DefineAssociate(SDDS_DATASET *SDDS_dataset, char *name,
0589 char *filename, char *path, char *description, char *contents, int32_t sdds);
0590 epicsShareFuncSDDS extern int32_t SDDS_IsValidName(char *name, char *dataClass);
0591 epicsShareFuncSDDS extern int32_t SDDS_SetNameValidityFlags(uint32_t flags);
0592 #define SDDS_ALLOW_ANY_NAME 0x0001UL
0593 #define SDDS_ALLOW_V15_NAME 0x0002UL
0594 epicsShareFuncSDDS extern int32_t SDDS_DefineSimpleColumn(SDDS_DATASET *SDDS_dataset, char *name, char *unit, int32_t type);
0595 epicsShareFuncSDDS extern int32_t SDDS_DefineSimpleParameter(SDDS_DATASET *SDDS_dataset, char *name, char *unit, int32_t type);
0596 epicsShareFuncSDDS extern int32_t SDDS_DefineSimpleColumns(SDDS_DATASET *SDDS_dataset, int32_t number, char **name, char **unit, int32_t type);
0597 epicsShareFuncSDDS extern int32_t SDDS_DefineSimpleParameters(SDDS_DATASET *SDDS_dataset, int32_t number, char **name, char **unit, int32_t type);
0598 epicsShareFuncSDDS extern int32_t SDDS_SetNoRowCounts(SDDS_DATASET *SDDS_dataset, int32_t value);
0599 epicsShareFuncSDDS extern int32_t SDDS_WriteLayout(SDDS_DATASET *SDDS_dataset);
0600 epicsShareFuncSDDS extern int32_t SDDS_EraseData(SDDS_DATASET *SDDS_dataset);
0601
0602 epicsShareFuncSDDS extern int32_t SDDS_ProcessColumnString(SDDS_DATASET *SDDS_dataset, char *string, int32_t mode);
0603 epicsShareFuncSDDS extern int32_t SDDS_ProcessParameterString(SDDS_DATASET *SDDS_dataset, char *string, int32_t mode);
0604 epicsShareFuncSDDS extern int32_t SDDS_ProcessArrayString(SDDS_DATASET *SDDS_dataset, char *string);
0605 epicsShareFuncSDDS extern int32_t SDDS_ProcessAssociateString(SDDS_DATASET *SDDS_dataset, char *string);
0606
0607 epicsShareFuncSDDS extern int32_t SDDS_InitializeCopy(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source, char *filename, char *filemode);
0608 epicsShareFuncSDDS extern int32_t SDDS_CopyLayout(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source);
0609 epicsShareFuncSDDS extern int32_t SDDS_AppendLayout(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source, uint32_t mode);
0610 epicsShareFuncSDDS extern int32_t SDDS_CopyPage(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source);
0611 #define SDDS_CopyTable(a, b) SDDS_CopyPage(a, b)
0612 epicsShareFuncSDDS extern int32_t SDDS_CopyParameters(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source);
0613 epicsShareFuncSDDS extern int32_t SDDS_CopyArrays(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source);
0614 epicsShareFuncSDDS extern int32_t SDDS_CopyColumns(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source);
0615 epicsShareFuncSDDS extern int32_t SDDS_CopyRowsOfInterest(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source);
0616 epicsShareFuncSDDS extern int32_t SDDS_CopyRow(SDDS_DATASET *SDDS_target, int32_t target_row, SDDS_DATASET *SDDS_source, int32_t source_srow);
0617 epicsShareFuncSDDS extern int32_t SDDS_CopyRowDirect(SDDS_DATASET *SDDS_target, int32_t target_row, SDDS_DATASET *SDDS_source, int32_t source_row);
0618 epicsShareFuncSDDS extern int32_t SDDS_CopyAdditionalRows(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source);
0619
0620 epicsShareFuncSDDS extern void SDDS_DeferSavingLayout(int32_t mode);
0621 epicsShareFuncSDDS extern int32_t SDDS_SaveLayout(SDDS_DATASET *SDDS_dataset);
0622 epicsShareFuncSDDS extern int32_t SDDS_RestoreLayout(SDDS_DATASET *SDDS_dataset);
0623
0624 #define SDDS_BY_INDEX 1
0625 #define SDDS_BY_NAME 2
0626
0627 epicsShareFuncSDDS extern int32_t SDDS_StartPage(SDDS_DATASET *SDDS_dataset, int32_t expected_n_rows);
0628 #define SDDS_StartTable(a, b) SDDS_StartPage(a, b)
0629 epicsShareFuncSDDS extern int32_t SDDS_ClearPage(SDDS_DATASET *SDDS_dataset);
0630 epicsShareFuncSDDS extern int32_t SDDS_LengthenTable(SDDS_DATASET *SDDS_dataset, int32_t n_additional_rows);
0631 epicsShareFuncSDDS extern int32_t SDDS_ShortenTable(SDDS_DATASET *SDDS_dataset, int32_t rows);
0632 #define SDDS_SET_BY_INDEX SDDS_BY_INDEX
0633 #define SDDS_SET_BY_NAME SDDS_BY_NAME
0634 #define SDDS_PASS_BY_VALUE 4
0635 #define SDDS_PASS_BY_REFERENCE 8
0636 #define SDDS_PASS_BY_STRING 16
0637 epicsShareFuncSDDS extern int32_t SDDS_SetParameters(SDDS_DATASET *SDDS_dataset, int32_t mode, ...);
0638 epicsShareFuncSDDS extern int32_t SDDS_SetRowValues(SDDS_DATASET *SDDS_dataset, int32_t mode, int32_t row, ...);
0639 epicsShareFuncSDDS extern int32_t SDDS_WritePage(SDDS_DATASET *SDDS_dataset);
0640 #define SDDS_WriteTable(a) SDDS_WritePage(a)
0641 epicsShareFuncSDDS extern int32_t SDDS_UpdatePage(SDDS_DATASET *SDDS_dataset, uint32_t mode);
0642 #define FLUSH_TABLE 0x1UL
0643 #define SDDS_UpdateTable(a) SDDS_UpdatePage(a, 0)
0644 epicsShareFuncSDDS extern int32_t SDDS_SyncDataSet(SDDS_DATASET *SDDS_dataset);
0645 epicsShareFuncSDDS extern int32_t SDDS_SetColumn(SDDS_DATASET *SDDS_dataset, int32_t mode, void *data, int32_t rows, ...);
0646 epicsShareFuncSDDS extern int32_t SDDS_SetColumnFromDoubles(SDDS_DATASET *SDDS_dataset, int32_t mode, double *data, int32_t rows, ...);
0647 epicsShareFuncSDDS extern int32_t SDDS_SetColumnFromFloats(SDDS_DATASET *SDDS_dataset, int32_t mode, float *data, int32_t rows, ...);
0648 epicsShareFuncSDDS extern int32_t SDDS_SetColumnFromLongs(SDDS_DATASET *SDDS_dataset, int32_t mode, int32_t *data, int32_t rows, ...);
0649 epicsShareFuncSDDS extern int32_t SDDS_SetParametersFromDoubles(SDDS_DATASET *SDDS_dataset, int32_t mode, ...);
0650
0651 #define SDDS_GET_BY_INDEX SDDS_BY_INDEX
0652 #define SDDS_GET_BY_NAME SDDS_BY_NAME
0653 epicsShareFuncSDDS extern int32_t SDDS_GetColumnInformation(SDDS_DATASET *SDDS_dataset, char *field_name, void *memory, int32_t mode, ...);
0654 epicsShareFuncSDDS extern int32_t SDDS_GetParameterInformation(SDDS_DATASET *SDDS_dataset, char *field_name, void *memory, int32_t mode, ...);
0655 epicsShareFuncSDDS extern int32_t SDDS_GetArrayInformation(SDDS_DATASET *SDDS_dataset, char *field_name, void *memory, int32_t mode, ...);
0656 epicsShareFuncSDDS extern int32_t SDDS_GetAssociateInformation(SDDS_DATASET *SDDS_dataset, char *field_name, void *memory, int32_t mode, ...);
0657 epicsShareFuncSDDS extern int32_t SDDS_ChangeColumnInformation(SDDS_DATASET *SDDS_dataset, char *field_name, void *memory, int32_t mode, ...);
0658 epicsShareFuncSDDS extern int32_t SDDS_ChangeParameterInformation(SDDS_DATASET *SDDS_dataset, char *field_name, void *memory, int32_t mode, ...);
0659 epicsShareFuncSDDS extern int32_t SDDS_ChangeArrayInformation(SDDS_DATASET *SDDS_dataset, char *field_name, void *memory, int32_t mode, ...);
0660
0661 epicsShareFuncSDDS extern void SDDS_SetReadRecoveryMode(int32_t mode);
0662 epicsShareFuncSDDS extern int32_t SDDS_SetDefaultIOBufferSize(int32_t bufferSize);
0663
0664
0665 epicsShareFuncSDDS extern int32_t SDDS_InitializeInputFromSearchPath(SDDS_DATASET *SDDSin, char *file);
0666 epicsShareFuncSDDS extern int32_t SDDS_InitializeInput(SDDS_DATASET *SDDS_dataset, char *filename);
0667 epicsShareFuncSDDS extern int32_t SDDS_ReadLayout(SDDS_DATASET *SDDS_dataset, FILE *fp);
0668 epicsShareFuncSDDS extern int32_t SDDS_InitializeHeaderlessInput(SDDS_DATASET *SDDS_dataset, char *filename);
0669 epicsShareFuncSDDS extern int32_t SDDS_GetRowLimit(void);
0670 epicsShareFuncSDDS extern int32_t SDDS_SetRowLimit(int32_t limit);
0671 epicsShareFuncSDDS extern int32_t SDDS_GotoPage(SDDS_DATASET *SDDS_dataset,int32_t page_number);
0672 epicsShareFuncSDDS extern int32_t SDDS_CheckEndOfFile(SDDS_DATASET *SDDS_dataset);
0673 epicsShareFuncSDDS extern int32_t SDDS_ReadPage(SDDS_DATASET *SDDS_dataset);
0674 epicsShareFuncSDDS extern int32_t SDDS_ReadPageSparse(SDDS_DATASET *SDDS_dataset, uint32_t mode,
0675 int32_t sparse_interval,
0676 int32_t sparse_offset);
0677 #define SDDS_ReadTable(a) SDDS_ReadPage(a)
0678 epicsShareFuncSDDS extern int32_t SDDS_ReadAsciiPage(SDDS_DATASET *SDDS_dataset, int32_t sparse_interval,
0679 int32_t sparse_offset);
0680 epicsShareFuncSDDS extern int32_t SDDS_ReadRecoveryPossible(void);
0681
0682 epicsShareFuncSDDS extern int32_t SDDS_SetColumnFlags(SDDS_DATASET *SDDS_dataset, int32_t column_flag_value);
0683 epicsShareFuncSDDS extern int32_t SDDS_SetRowFlags(SDDS_DATASET *SDDS_dataset, int32_t row_flag_value);
0684 epicsShareFuncSDDS extern int32_t SDDS_GetRowFlag(SDDS_DATASET *SDDS_dataset, int32_t row);
0685 epicsShareFuncSDDS extern int32_t SDDS_GetRowFlags(SDDS_DATASET *SDDS_dataset, int32_t *flag, int32_t rows);
0686 epicsShareFuncSDDS extern int32_t SDDS_BufferedRead(void *target, size_t targetSize, FILE *fp, SDDS_FILEBUFFER *fBuffer);
0687 #if defined(zLib)
0688 epicsShareFuncSDDS extern int32_t SDDS_GZipBufferedRead(void *target, size_t targetSize, gzFile *gzfp, SDDS_FILEBUFFER *fBuffer);
0689 #endif
0690
0691
0692 #define SDDS_FLAG_ARRAY 0x001UL
0693 #define SDDS_INDEX_LIMITS 0x002UL
0694 epicsShareFuncSDDS extern int32_t SDDS_AssertRowFlags(SDDS_DATASET *SDDS_dataset, uint32_t mode, ...);
0695
0696 #define SDDS_NAME_ARRAY 1
0697 #define SDDS_NAMES_STRING 2
0698 #define SDDS_NAME_STRINGS 3
0699 #define SDDS_MATCH_STRING 4
0700 #define SDDS_MATCH_EXCLUDE_STRING 5
0701 #define SDDS_CI_NAME_ARRAY 6
0702 #define SDDS_CI_NAMES_STRING 7
0703 #define SDDS_CI_NAME_STRINGS 8
0704 #define SDDS_CI_MATCH_STRING 9
0705 #define SDDS_CI_MATCH_EXCLUDE_STRING 10
0706
0707
0708 #define SDDS_AND 0x0001UL
0709 #define SDDS_OR 0x0002UL
0710 #define SDDS_NEGATE_MATCH 0x0004UL
0711 #define SDDS_NEGATE_PREVIOUS 0x0008UL
0712 #define SDDS_NEGATE_EXPRESSION 0x0010UL
0713 #define SDDS_INDIRECT_MATCH 0x0020UL
0714 #define SDDS_1_PREVIOUS 0x0040UL
0715 #define SDDS_0_PREVIOUS 0x0080UL
0716
0717 #define SDDS_NOCASE_COMPARE 0x0100UL
0718
0719 epicsShareFuncSDDS extern int32_t SDDS_MatchColumns(SDDS_DATASET *SDDS_dataset, char ***match, int32_t matchMode, int32_t typeMode, ... );
0720 epicsShareFuncSDDS extern int32_t SDDS_MatchParameters(SDDS_DATASET *SDDS_dataset, char ***match, int32_t matchMode, int32_t typeMode, ... );
0721 epicsShareFuncSDDS extern int32_t SDDS_MatchArrays(SDDS_DATASET *SDDS_dataset, char ***match, int32_t matchMode, int32_t typeMode, ... );
0722 epicsShareFuncSDDS extern int32_t SDDS_Logic(int32_t previous, int32_t match, uint32_t logic);
0723 epicsShareFuncSDDS extern int32_t SDDS_SetColumnsOfInterest(SDDS_DATASET *SDDS_dataset, int32_t mode, ...);
0724 epicsShareFuncSDDS extern int32_t SDDS_AssertColumnFlags(SDDS_DATASET *SDDS_dataset, uint32_t mode, ...);
0725 epicsShareFuncSDDS extern int32_t SDDS_SetRowsOfInterest(SDDS_DATASET *SDDS_dataset, char *selection_column, int32_t mode, ...);
0726 epicsShareFuncSDDS extern int32_t SDDS_MatchRowsOfInterest(SDDS_DATASET *SDDS_dataset, char *selection_column, char *label_to_match, int32_t logic);
0727 epicsShareFuncSDDS extern int32_t SDDS_DeleteColumn(SDDS_DATASET *SDDS_dataset, char *column_name);
0728 epicsShareFuncSDDS extern int32_t SDDS_DeleteParameter(SDDS_DATASET *SDDS_dataset, char *parameter_name);
0729 epicsShareFuncSDDS extern int32_t SDDS_DeleteUnsetColumns(SDDS_DATASET *SDDS_dataset);
0730 epicsShareFuncSDDS extern int32_t SDDS_CountColumnsOfInterest(SDDS_DATASET *SDDS_dataset);
0731 epicsShareFuncSDDS extern int32_t SDDS_ColumnIsOfInterest(SDDS_DATASET *SDDS_dataset, char *name);
0732 epicsShareFuncSDDS extern int32_t SDDS_ColumnCount(SDDS_DATASET *dataset);
0733 epicsShareFuncSDDS extern int32_t SDDS_ParameterCount(SDDS_DATASET *dataset);
0734 epicsShareFuncSDDS extern int32_t SDDS_ArrayCount(SDDS_DATASET *dataset);
0735 epicsShareFuncSDDS extern int32_t SDDS_CountRowsOfInterest(SDDS_DATASET *SDDS_dataset);
0736 #define SDDS_RowCount(SDDS_dataset) ((SDDS_dataset)->n_rows)
0737 epicsShareFuncSDDS extern int32_t SDDS_DeleteUnsetRows(SDDS_DATASET *SDDS_dataset);
0738 epicsShareFuncSDDS extern int32_t SDDS_FilterRowsOfInterest(SDDS_DATASET *SDDS_dataset, char *filter_column, double lower, double upper, int32_t logic);
0739 epicsShareFuncSDDS extern int32_t SDDS_ItemInsideWindow(void *data, int32_t index, int32_t type, double lower_limit, double upper_limit);
0740 epicsShareFuncSDDS extern int32_t SDDS_FilterRowsByNumScan(SDDS_DATASET *SDDS_dataset, char *filter_column, uint32_t mode);
0741 #define NUMSCANFILTER_INVERT 0x0001UL
0742 #define NUMSCANFILTER_STRICT 0x0002UL
0743
0744 epicsShareFuncSDDS extern void *SDDS_GetColumn(SDDS_DATASET *SDDS_dataset, char *column_name);
0745 epicsShareFuncSDDS extern void *SDDS_GetInternalColumn(SDDS_DATASET *SDDS_dataset, char *column_name);
0746 epicsShareFuncSDDS extern double *SDDS_GetColumnInDoubles(SDDS_DATASET *SDDS_dataset, char *column_name);
0747 epicsShareFuncSDDS extern float *SDDS_GetColumnInFloats(SDDS_DATASET *SDDS_dataset, char *column_name);
0748 epicsShareFuncSDDS extern int32_t *SDDS_GetColumnInLong(SDDS_DATASET *SDDS_dataset, char *column_name);
0749 epicsShareFuncSDDS extern short *SDDS_GetColumnInShort(SDDS_DATASET *SDDS_dataset, char *column_name);
0750 epicsShareFuncSDDS extern void *SDDS_GetNumericColumn(SDDS_DATASET *SDDS_dataset, char *column_name, int32_t desiredType);
0751 epicsShareFuncSDDS extern void *SDDS_GetRow(SDDS_DATASET *SDDS_dataset, int32_t srow_index, void *memory);
0752 epicsShareFuncSDDS extern void *SDDS_GetValue(SDDS_DATASET *SDDS_dataset, char *column_name, int32_t srow_index, void *memory);
0753 epicsShareFuncSDDS extern void *SDDS_GetValueByIndex(SDDS_DATASET *SDDS_dataset, int32_t column_index, int32_t srow_index, void *memory);
0754 epicsShareFuncSDDS extern void *SDDS_GetValueByAbsIndex(SDDS_DATASET *SDDS_dataset, int32_t column_index, int32_t srow_index, void *memory);
0755 epicsShareFuncSDDS extern void *SDDS_GetParameter(SDDS_DATASET *SDDS_dataset, char *parameter_name, void *memory);
0756 epicsShareFuncSDDS extern void *SDDS_GetParameterByIndex(SDDS_DATASET *SDDS_dataset, int32_t index, void *memory);
0757 epicsShareFuncSDDS extern double *SDDS_GetParameterAsDouble(SDDS_DATASET *SDDS_dataset, char *parameter_name, double *data);
0758 epicsShareFuncSDDS extern int32_t *SDDS_GetParameterAsLong(SDDS_DATASET *SDDS_dataset, char *parameter_name, int32_t *data);
0759 epicsShareFuncSDDS extern char *SDDS_GetParameterAsString(SDDS_DATASET *SDDS_dataset, char *parameter_name, char **memory);
0760 epicsShareFuncSDDS extern int32_t SDDS_GetParameters(SDDS_DATASET *SDDS_dataset, ...);
0761 epicsShareFuncSDDS extern void *SDDS_GetFixedValueParameter(SDDS_DATASET *SDDS_dataset, char *parameter_name, void *memory);
0762 epicsShareFuncSDDS extern int32_t SDDS_GetDescription(SDDS_DATASET *SDDS_dataset, char **text, char **contents);
0763
0764 epicsShareFuncSDDS extern void *SDDS_GetMatrixOfRows(SDDS_DATASET *SDDS_dataset, int32_t *n_rows);
0765 epicsShareFuncSDDS extern void *SDDS_GetCastMatrixOfRows(SDDS_DATASET *SDDS_dataset, int32_t *n_rows, int32_t sddsType);
0766 #define SDDS_ROW_MAJOR_DATA 1
0767 #define SDDS_COLUMN_MAJOR_DATA 2
0768 epicsShareFuncSDDS extern void *SDDS_GetMatrixFromColumn(SDDS_DATASET *SDDS_dataset, char *column_name, int32_t dimension1, int32_t dimension2, int32_t mode);
0769 epicsShareFuncSDDS extern void *SDDS_GetDoubleMatrixFromColumn(SDDS_DATASET *SDDS_dataset, char *column_name, int32_t dimension1, int32_t dimension2, int32_t mode);
0770
0771 epicsShareFuncSDDS extern SDDS_ARRAY *SDDS_GetArray(SDDS_DATASET *SDDS_dataset, char *array_name, SDDS_ARRAY *memory);
0772 #define SDDS_POINTER_ARRAY 1
0773 #define SDDS_CONTIGUOUS_DATA 2
0774 epicsShareFuncSDDS extern double *SDDS_GetArrayInDoubles(SDDS_DATASET *SDDS_dataset, char *array_name, int32_t *values);
0775
0776 epicsShareFuncSDDS extern int32_t SDDS_SetArrayVararg(SDDS_DATASET *SDDS_dataset, const char *array_name, int32_t mode, void *data_pointer, ...);
0777 epicsShareFuncSDDS extern int32_t SDDS_SetArray(SDDS_DATASET *SDDS_dataset, char *array_name, int32_t mode, void *data_pointer, int32_t *dimension);
0778 epicsShareFuncSDDS extern int32_t SDDS_AppendToArrayVararg(SDDS_DATASET *SDDS_dataset, char *array_name, int32_t mode, void *data_pointer, int32_t elements, ...);
0779
0780
0781
0782 epicsShareFuncSDDS extern void *SDDS_Realloc(void *old_ptr, size_t new_size);
0783 epicsShareFuncSDDS extern void *SDDS_Malloc(size_t size);
0784 epicsShareFuncSDDS extern void SDDS_Free(void *mem);
0785 epicsShareFuncSDDS extern void *SDDS_Calloc(size_t nelem, size_t elem_size);
0786 epicsShareFuncSDDS extern int32_t SDDS_NumberOfErrors(void);
0787 epicsShareFuncSDDS extern void SDDS_ClearErrors(void);
0788 epicsShareFuncSDDS extern void SDDS_SetError(char *error_text);
0789 epicsShareFuncSDDS extern void SDDS_Bomb(char *message);
0790 epicsShareFuncSDDS extern void SDDS_Warning(char *message);
0791 epicsShareFuncSDDS extern void SDDS_RegisterProgramName(const char *name);
0792 #define SDDS_VERBOSE_PrintErrors 1
0793 #define SDDS_EXIT_PrintErrors 2
0794 epicsShareFuncSDDS extern void SDDS_PrintErrors(FILE *fp, int32_t mode);
0795 #define SDDS_LAST_GetErrorMessages 0
0796 #define SDDS_ALL_GetErrorMessages 1
0797 epicsShareFuncSDDS extern char **SDDS_GetErrorMessages(int32_t *number, int32_t mode);
0798
0799 epicsShareFuncSDDS extern char **SDDS_GetColumnNames(SDDS_DATASET *SDDS_dataset, int32_t *number);
0800 epicsShareFuncSDDS extern char **SDDS_GetParameterNames(SDDS_DATASET *SDDS_dataset, int32_t *number);
0801 epicsShareFuncSDDS extern char **SDDS_GetAssociateNames(SDDS_DATASET *SDDS_dataset, int32_t *number);
0802 epicsShareFuncSDDS extern char **SDDS_GetArrayNames(SDDS_DATASET *SDDS_dataset, int32_t *number);
0803
0804 epicsShareFuncSDDS extern COLUMN_DEFINITION *SDDS_GetColumnDefinition(SDDS_DATASET *SDDS_dataset, char *name);
0805 epicsShareFuncSDDS extern COLUMN_DEFINITION *SDDS_CopyColumnDefinition(COLUMN_DEFINITION **target, COLUMN_DEFINITION *source);
0806 epicsShareFuncSDDS extern int32_t SDDS_FreeColumnDefinition(COLUMN_DEFINITION *source);
0807 epicsShareFuncSDDS extern int32_t SDDS_TransferColumnDefinition(SDDS_DATASET *target, SDDS_DATASET *source, char *name, char *newName);
0808 epicsShareFuncSDDS extern int32_t SDDS_DefineColumnLikeParameter(SDDS_DATASET *target, SDDS_DATASET *source, char *name, char *newName);
0809 epicsShareFuncSDDS extern int32_t SDDS_DefineColumnLikeArray(SDDS_DATASET *target, SDDS_DATASET *source, char *name, char *newName);
0810 epicsShareFuncSDDS extern int32_t SDDS_TransferAllColumnDefinitions(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source,
0811 uint32_t mode);
0812
0813
0814 epicsShareFuncSDDS extern PARAMETER_DEFINITION *SDDS_GetParameterDefinition(SDDS_DATASET *SDDS_dataset, char *name);
0815 epicsShareFuncSDDS extern PARAMETER_DEFINITION *SDDS_CopyParameterDefinition(PARAMETER_DEFINITION **target, PARAMETER_DEFINITION *source);
0816 epicsShareFuncSDDS extern int32_t SDDS_FreeParameterDefinition(PARAMETER_DEFINITION *source);
0817 epicsShareFuncSDDS extern int32_t SDDS_TransferParameterDefinition(SDDS_DATASET *target, SDDS_DATASET *source, char *name, char *newName);
0818 epicsShareFuncSDDS extern int32_t SDDS_DefineParameterLikeColumn(SDDS_DATASET *target, SDDS_DATASET *source, char *name, char *newName);
0819 epicsShareFuncSDDS extern int32_t SDDS_DefineParameterLikeArray(SDDS_DATASET *target, SDDS_DATASET *source, char *name, char *newName);
0820 #define SDDS_TRANSFER_KEEPOLD 0x01UL
0821 #define SDDS_TRANSFER_OVERWRITE 0x02UL
0822 epicsShareFuncSDDS extern int32_t SDDS_TransferAllParameterDefinitions(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source,
0823 uint32_t mode);
0824
0825 epicsShareFuncSDDS extern ARRAY_DEFINITION *SDDS_GetArrayDefinition(SDDS_DATASET *SDDS_dataset, char *name);
0826 epicsShareFuncSDDS extern ARRAY_DEFINITION *SDDS_CopyArrayDefinition(ARRAY_DEFINITION **target, ARRAY_DEFINITION *source);
0827 epicsShareFuncSDDS extern int32_t SDDS_FreeArrayDefinition(ARRAY_DEFINITION *source);
0828 epicsShareFuncSDDS extern int32_t SDDS_TransferArrayDefinition(SDDS_DATASET *target, SDDS_DATASET *source, char *name, char *newName);
0829 epicsShareFuncSDDS extern int32_t SDDS_TransferAllArrayDefinitions(SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source,
0830 uint32_t mode);
0831
0832
0833 epicsShareFuncSDDS extern ASSOCIATE_DEFINITION *SDDS_GetAssociateDefinition(SDDS_DATASET *SDDS_dataset, char *name);
0834 epicsShareFuncSDDS extern ASSOCIATE_DEFINITION *SDDS_CopyAssociateDefinition(ASSOCIATE_DEFINITION **target, ASSOCIATE_DEFINITION *source);
0835 epicsShareFuncSDDS extern int32_t SDDS_FreeAssociateDefinition(ASSOCIATE_DEFINITION *source);
0836 epicsShareFuncSDDS extern int32_t SDDS_TransferAssociateDefinition(SDDS_DATASET *target, SDDS_DATASET *source, char *name, char *newName);
0837
0838 epicsShareFuncSDDS extern int32_t SDDS_GetColumnIndex(SDDS_DATASET *SDDS_dataset, char *name);
0839 epicsShareFuncSDDS extern int32_t SDDS_GetParameterIndex(SDDS_DATASET *SDDS_dataset, char *name);
0840 epicsShareFuncSDDS extern int32_t SDDS_GetArrayIndex(SDDS_DATASET *SDDS_dataset, char *name);
0841 epicsShareFuncSDDS extern int32_t SDDS_GetAssociateIndex(SDDS_DATASET *SDDS_dataset, char *name);
0842 epicsShareFuncSDDS extern int32_t SDDS_GetColumnType(SDDS_DATASET *SDDS_dataset, int32_t index);
0843 epicsShareFuncSDDS extern int32_t SDDS_GetNamedColumnType(SDDS_DATASET *SDDS_dataset, char *name);
0844 epicsShareFuncSDDS extern int32_t SDDS_GetParameterType(SDDS_DATASET *SDDS_dataset, int32_t index);
0845 epicsShareFuncSDDS extern int32_t SDDS_GetNamedParameterType(SDDS_DATASET *SDDS_dataset, char *name);
0846 epicsShareFuncSDDS extern int32_t SDDS_GetArrayType(SDDS_DATASET *SDDS_dataset, int32_t index);
0847 epicsShareFuncSDDS extern int32_t SDDS_GetNamedArrayType(SDDS_DATASET *SDDS_dataset, char *name);
0848 epicsShareFuncSDDS extern int32_t SDDS_GetTypeSize(int32_t type);
0849 epicsShareFuncSDDS extern char *SDDS_GetTypeName(int32_t type);
0850 epicsShareFuncSDDS extern int32_t SDDS_IdentifyType(char *typeName);
0851
0852 #define FIND_ANY_TYPE 0
0853 #define FIND_SPECIFIED_TYPE 1
0854 #define FIND_NUMERIC_TYPE 2
0855 #define FIND_INTEGER_TYPE 3
0856 #define FIND_FLOATING_TYPE 4
0857
0858 epicsShareFuncSDDS extern char *SDDS_FindColumn(SDDS_DATASET *SDDS_dataset, int32_t mode, ...);
0859 epicsShareFuncSDDS extern char *SDDS_FindParameter(SDDS_DATASET *SDDS_dataset, int32_t mode, ...);
0860 epicsShareFuncSDDS extern char *SDDS_FindArray(SDDS_DATASET *SDDS_dataset, int32_t mode, ...);
0861
0862 epicsShareFuncSDDS extern int32_t SDDS_CheckColumn(SDDS_DATASET *SDDS_dataset, char *name, char *units, int32_t type, FILE *fp_message);
0863 epicsShareFuncSDDS extern int32_t SDDS_CheckParameter(SDDS_DATASET *SDDS_dataset, char *name, char *units, int32_t type, FILE *fp_message);
0864 epicsShareFuncSDDS extern int32_t SDDS_CheckArray(SDDS_DATASET *SDDS_dataset, char *name, char *units, int32_t type, FILE *fp_message);
0865 epicsShareFuncSDDS extern int32_t SDDS_VerifyArrayExists(SDDS_DATASET *SDDS_dataset, int32_t mode, ...);
0866 epicsShareFuncSDDS extern int32_t SDDS_VerifyColumnExists(SDDS_DATASET *SDDS_dataset, int32_t mode, ...);
0867 epicsShareFuncSDDS extern int32_t SDDS_VerifyParameterExists(SDDS_DATASET *SDDS_dataset, int32_t mode, ...);
0868 epicsShareFuncSDDS extern int32_t SDDS_PrintCheckText(FILE *fp, char *name, char *units, int32_t type, char *class_name, int32_t error_code);
0869 #define SDDS_CHECK_OKAY 0
0870 #define SDDS_CHECK_OK SDDS_CHECK_OKAY
0871 #define SDDS_CHECK_NONEXISTENT 1
0872 #define SDDS_CHECK_WRONGTYPE 2
0873 #define SDDS_CHECK_WRONGUNITS 3
0874
0875 epicsShareFuncSDDS extern int32_t SDDS_IsActive(SDDS_DATASET *SDDS_dataset);
0876 epicsShareFuncSDDS extern int32_t SDDS_ForceInactive(SDDS_DATASET *SDDS_dataset);
0877 epicsShareFuncSDDS extern int32_t SDDS_LockFile(FILE *fp, char *filename, char *callerName);
0878 epicsShareFuncSDDS extern int32_t SDDS_FileIsLocked(char *filename);
0879 epicsShareFuncSDDS extern int32_t SDDS_BreakIntoLockedFile(char *filename);
0880
0881 epicsShareFuncSDDS extern int32_t SDDS_CopyString(char **target, char *source);
0882 epicsShareFuncSDDS extern int32_t SDDS_CopyStringArray(char **target, char **source, int32_t n_strings);
0883 epicsShareFuncSDDS extern int32_t SDDS_FreeStringArray(char **string, int32_t strings);
0884 epicsShareFuncSDDS extern int32_t SDDS_VerifyPrintfFormat(char *format_string, int32_t type);
0885 epicsShareFuncSDDS extern int32_t SDDS_HasWhitespace(char *string);
0886 epicsShareFuncSDDS extern char *fgetsSkipComments(char *s, int32_t slen, FILE *fp, char skip_char);
0887 epicsShareFuncSDDS extern char *fgetsSkipCommentsResize(char **s, int32_t *slen, FILE *fp, char skip_char);
0888 #if defined(zLib)
0889 epicsShareFuncSDDS extern char *fgetsGZipSkipComments(char *s, int32_t slen, gzFile *gzfp, char skip_char);
0890 epicsShareFuncSDDS extern char *fgetsGZipSkipCommentsResize(char **s, int32_t *slen, gzFile *gzfp, char skip_char);
0891 #endif
0892 epicsShareFuncSDDS extern void SDDS_CutOutComments(char *s, char cc);
0893 epicsShareFuncSDDS extern void SDDS_EscapeNewlines(char *s);
0894 epicsShareFuncSDDS extern void SDDS_EscapeQuotes(char *s, char quote_char);
0895 epicsShareFuncSDDS extern void SDDS_UnescapeQuotes(char *s, char quote_char);
0896 epicsShareFuncSDDS extern int32_t SDDS_IsQuoted(char *string, char *position, char quotation_mark);
0897 epicsShareFuncSDDS extern int32_t SDDS_GetToken(char *s, char *buffer, int32_t buflen);
0898 epicsShareFuncSDDS extern int32_t SDDS_GetToken2(char *s, char **st, int32_t *strlength, char *buffer, int32_t buflen);
0899 epicsShareFuncSDDS extern int32_t SDDS_PadToLength(char *string, int32_t length);
0900 epicsShareFuncSDDS extern void SDDS_EscapeCommentCharacters(char *string, char cc);
0901 epicsShareFuncSDDS extern void SDDS_InterpretEscapes(char *s);
0902
0903 epicsShareFuncSDDS extern int32_t SDDS_ZeroMemory(void *mem, int32_t n_bytes);
0904 epicsShareFuncSDDS extern int32_t SDDS_SetMemory(void *mem, int32_t n_elements, int32_t data_type, ...);
0905 #define SDDS_PRINT_NOQUOTES 0x0001UL
0906 epicsShareFuncSDDS extern int32_t SDDS_SprintTypedValue(void *data, int32_t index, int32_t type, char *format, char *buffer, uint32_t mode);
0907 epicsShareFuncSDDS extern int32_t SDDS_PrintTypedValue(void *data, int32_t index, int32_t type, char *format, FILE *fp, uint32_t mode);
0908 epicsShareFuncSDDS extern int32_t SDDS_WriteTypedValue(void *data, int32_t index, int32_t type, char *format, FILE *fp);
0909 epicsShareFuncSDDS extern void *SDDS_CastValue(void *data, int32_t index, int32_t data_type, int32_t desired_type, void *memory);
0910 epicsShareFuncSDDS extern void SDDS_RemovePadding(char *s);
0911 epicsShareFuncSDDS extern int32_t SDDS_StringIsBlank(char *s);
0912 epicsShareFuncSDDS extern void *SDDS_AllocateMatrix(int32_t size, int32_t dim1, int32_t dim2);
0913 epicsShareFuncSDDS extern void SDDS_FreeMatrix(void **ptr, int32_t dim1);
0914 epicsShareFuncSDDS extern void SDDS_FreeArray(SDDS_ARRAY *array);
0915 epicsShareFuncSDDS extern void *SDDS_MakePointerArray(void *data, int32_t type, int32_t dimensions, int32_t *dimension);
0916 epicsShareFuncSDDS extern int32_t SDDS_ApplyFactorToParameter(SDDS_DATASET *SDDS_dataset, char *name, double factor);
0917 epicsShareFuncSDDS extern int32_t SDDS_ApplyFactorToColumn(SDDS_DATASET *SDDS_dataset, char *name, double factor);
0918 epicsShareFuncSDDS extern int32_t SDDS_DeleteParameterFixedValues(SDDS_DATASET *SDDS_dataset);
0919 epicsShareFuncSDDS extern int32_t SDDS_SetDataMode(SDDS_DATASET *SDDS_dataset, int32_t newmode);
0920 epicsShareFuncSDDS extern int32_t SDDS_CheckDataset(SDDS_DATASET *SDDS_dataset, const char *caller);
0921 epicsShareFuncSDDS extern int32_t SDDS_CheckTabularData(SDDS_DATASET *SDDS_dataset, const char *caller);
0922 epicsShareFuncSDDS extern int32_t SDDS_CheckDatasetStructureSize(int32_t size);
0923 #define SDDS_CheckTableStructureSize(a) SDDS_CheckDatasetStructureSize(a)
0924
0925 #define TABULAR_DATA_CHECKS 0x0001UL
0926 epicsShareFuncSDDS uint32_t SDDS_SetAutoCheckMode(uint32_t newMode);
0927
0928 epicsShareFuncSDDS extern int32_t SDDS_FlushBuffer(FILE *fp, SDDS_FILEBUFFER *fBuffer);
0929 epicsShareFuncSDDS extern int32_t SDDS_BufferedWrite(void *target, size_t targetSize, FILE *fp, SDDS_FILEBUFFER *fBuffer);
0930
0931 epicsShareFuncSDDS extern int32_t SDDS_ScanData(char *string, int32_t type, int32_t field_length, void *data, int32_t index, int32_t is_parameter);
0932 epicsShareFuncSDDS extern int32_t SDDS_ScanData2(char *string, char **pstring, int32_t *strlength, int32_t type, int32_t field_length, void *data, int32_t index, int32_t is_parameter);
0933
0934 epicsShareFuncSDDS extern double SDDS_ConvertToDouble(int32_t type, void *data, int32_t index);
0935 epicsShareFuncSDDS extern int32_t SDDS_ConvertToLong(int32_t type, void *data, int32_t index);
0936
0937 epicsShareFuncSDDS extern int32_t SDDS_WriteBinaryString(char *string, FILE *fp, SDDS_FILEBUFFER *fBuffer);
0938 #if defined(zLib)
0939 epicsShareFuncSDDS extern int32_t SDDS_GZipWriteBinaryString(char *string, gzFile *gzfp, SDDS_FILEBUFFER *fBuffer);
0940 epicsShareFuncSDDS extern int32_t SDDS_GZipBufferedRead(void *target, size_t targetSize, gzFile *gzfp, SDDS_FILEBUFFER *fBuffer);
0941 epicsShareFuncSDDS extern int32_t SDDS_GZipFlushBuffer(gzFile *gzfp, SDDS_FILEBUFFER *fBuffer);
0942 epicsShareFuncSDDS extern int32_t SDDS_GZipBufferedWrite(void *target, size_t targetSize, gzFile *gzfp, SDDS_FILEBUFFER *fBuffer);
0943 #endif
0944
0945
0946 epicsShareFuncSDDS extern int32_t SDDS_CreateRpnMemory(char *name, short is_string);
0947 epicsShareFuncSDDS extern int32_t SDDS_CreateRpnArray(char *name);
0948
0949 #if defined(RPN_SUPPORT)
0950 epicsShareFuncSDDS extern int32_t SDDS_FilterRowsWithRpnTest(SDDS_DATASET *SDDS_dataset, char *rpn_test);
0951 epicsShareFuncSDDS extern int32_t SDDS_StoreParametersInRpnMemories(SDDS_DATASET *SDDS_dataset);
0952 epicsShareFuncSDDS extern int32_t SDDS_StoreRowInRpnMemories(SDDS_DATASET *SDDS_dataset, int32_t row);
0953 epicsShareFuncSDDS extern int32_t SDDS_StoreColumnsInRpnArrays(SDDS_DATASET *SDDS_dataset);
0954 epicsShareFuncSDDS extern int32_t SDDS_ComputeColumn(SDDS_DATASET *SDDS_dataset, int32_t column, char *equation);
0955 epicsShareFuncSDDS extern int32_t SDDS_ComputeParameter(SDDS_DATASET *SDDS_dataset, int32_t column, char *equation);
0956 #endif
0957
0958 #define SDDS_BIGENDIAN_SEEN 0x0001UL
0959 #define SDDS_LITTLEENDIAN_SEEN 0x0002UL
0960 #define SDDS_FIXED_ROWCOUNT_SEEN 0x0004UL
0961 #define SDDS_BIGENDIAN SDDS_BIGENDIAN_SEEN
0962 #define SDDS_LITTLEENDIAN SDDS_LITTLEENDIAN_SEEN
0963 #define SDDS_FIXED_ROWCOUNT SDDS_FIXED_ROWCOUNT_SEEN
0964 epicsShareFuncSDDS extern int32_t SDDS_IsBigEndianMachine(void);
0965 void SDDS_SwapShort(short *data);
0966 void SDDS_SwapUShort(unsigned short *data);
0967 epicsShareFuncSDDS extern void SDDS_SwapLong(int32_t *data);
0968 epicsShareFuncSDDS extern void SDDS_SwapULong(uint32_t *data);
0969 void SDDS_SwapFloat(float *data);
0970 void SDDS_SwapDouble(double *data);
0971 epicsShareFuncSDDS extern int32_t SDDS_SwapEndsArrayData(SDDS_DATASET *SDDSin);
0972 epicsShareFuncSDDS extern int32_t SDDS_SwapEndsParameterData(SDDS_DATASET *SDDSin) ;
0973 epicsShareFuncSDDS extern int32_t SDDS_SwapEndsColumnData(SDDS_DATASET *SDDSin);
0974
0975
0976
0977
0978
0979
0980 epicsShareFuncSDDS extern int32_t SDDS_ReadNonNativePage(SDDS_DATASET *SDDS_dataset);
0981 int32_t SDDS_ReadNonNativePageSparse(SDDS_DATASET *SDDS_dataset, uint32_t mode,
0982 int32_t sparse_interval,
0983 int32_t sparse_offset);
0984 int32_t SDDS_ReadNonNativeBinaryPage(SDDS_DATASET *SDDS_dataset, int32_t sparse_interval, int32_t sparse_offset);
0985 int32_t SDDS_ReadNonNativeBinaryParameters(SDDS_DATASET *SDDS_dataset);
0986 int32_t SDDS_ReadNonNativeBinaryArrays(SDDS_DATASET *SDDS_dataset);
0987 int32_t SDDS_ReadNonNativeBinaryRow(SDDS_DATASET *SDDS_dataset, int32_t row, int32_t skip);
0988 char *SDDS_ReadNonNativeBinaryString(FILE *fp, SDDS_FILEBUFFER *fBuffer, int32_t skip);
0989 #if defined(zLib)
0990 char *SDDS_ReadNonNativeGZipBinaryString(gzFile *gzfp, SDDS_FILEBUFFER *fBuffer, int32_t skip);
0991 #endif
0992
0993
0994
0995 epicsShareFuncSDDS extern int32_t SDDS_WriteNonNativeBinaryPage(SDDS_DATASET *SDDS_dataset);
0996 int32_t SDDS_WriteNonNativeBinaryParameters(SDDS_DATASET *SDDS_dataset);
0997 int32_t SDDS_WriteNonNativeBinaryArrays(SDDS_DATASET *SDDS_dataset);
0998 int32_t SDDS_WriteNonNativeBinaryRow(SDDS_DATASET *SDDS_dataset, int32_t row);
0999
1000 int32_t SDDS_WriteNonNativeBinaryString(char *string, FILE *fp, SDDS_FILEBUFFER *fBuffer);
1001 #if defined(zLib)
1002 int32_t SDDS_GZipWriteNonNativeBinaryString(char *string, gzFile *gzfp, SDDS_FILEBUFFER *fBuffer);
1003 #endif
1004
1005 #if defined(SDDS_MPI_IO) && SDDS_MPI_IO
1006
1007 char *BlankToNull(char *string);
1008 epicsShareFuncSDDS extern void SDDS_MPI_BOMB(char *text, MPI_File *mpi_file);
1009 void SDDS_MPI_GOTO_ERROR(FILE *fp, char *str, int32_t mpierror, int32_t exit);
1010 epicsShareFuncSDDS extern int32_t SDDS_MPI_File_Open(MPI_DATASET *MPI_dataset, char *filename, unsigned long flags);
1011 char *SDDS_CreateNamelistField(char *name, char *value);
1012 char *SDDS_CreateDescription(char *text, char *contents);
1013 char *SDDS_CreateParameterDefinition(PARAMETER_DEFINITION *parameter_definition);
1014 char *SDDS_CreateColumnDefinition(COLUMN_DEFINITION *column_definition);
1015 char *SDDS_CreateArrayDefinition(ARRAY_DEFINITION *array_definition);
1016 char *SDDS_CreateAssociateDefinition(ASSOCIATE_DEFINITION *associate_definition);
1017 char *SDDS_CreateDataMode(DATA_MODE *data_mode);
1018 #define SDDS_MPI_WriteTable(a) SDDS_MPI_WritePage(a)
1019 epicsShareFuncSDDS extern int32_t SDDS_MPI_WriteLayout(SDDS_DATASET *MPI_dataset);
1020 epicsShareFuncSDDS extern int32_t SDDS_MPI_WritePage(SDDS_DATASET *MPI_dataset);
1021 MPI_Datatype Convert_SDDStype_To_MPItype(int32_t SDDS_type);
1022 epicsShareFuncSDDS extern int32_t SDDS_MPI_Terminate(SDDS_DATASET *MPI_dataset);
1023 int32_t SDDS_MPI_InitializeOutput(SDDS_DATASET *MPI_dataset, char *description, char *contents, char *filename, unsigned long flags, short column_major);
1024 int32_t SDDS_MPI_InitializeCopy(SDDS_DATASET *MPI_dataset_target, SDDS_DATASET *SDDS_source, char *filename, short column_major);
1025
1026
1027 int32_t SDDS_CheckStringTruncated(void);
1028 void SDDS_StringTuncated(void);
1029 int32_t SDDS_SetDefaultStringLength(int32_t newValue);
1030 int32_t SDDS_MPI_WriteBinaryPage(SDDS_DATASET *MPI_dataset);
1031 int32_t SDDS_MPI_WriteBinaryString(SDDS_DATASET *MPI_dataset, char *string);
1032 int32_t SDDS_MPI_WriteBinaryParameters(SDDS_DATASET *MPI_dataset);
1033 int32_t SDDS_MPI_WriteBinaryArrays(SDDS_DATASET *MPI_dataset);
1034 int32_t SDDS_MPI_WriteBinaryRow(SDDS_DATASET *MPI_dataset, int32_t row);
1035 int32_t SDDS_MPI_WriteNonNativeBinaryPage(SDDS_DATASET *MPI_dataset);
1036 int32_t SDDS_MPI_WriteNonNativeBinaryString(SDDS_DATASET *MPI_dataset, char *string);
1037 int32_t SDDS_MPI_WriteNonNativeBinaryParameters(SDDS_DATASET *MPI_dataset);
1038 int32_t SDDS_MPI_WriteNonNativeBinaryArrays(SDDS_DATASET *MPI_dataset);
1039 int32_t SDDS_MPI_WriteNonNativeBinaryRow(SDDS_DATASET *MPI_dataset, int32_t row);
1040 MPI_Offset SDDS_MPI_Get_Column_Size(SDDS_DATASET *MPI_dataset);
1041 int32_t SDDS_MPI_CollectiveWriteByRow(SDDS_DATASET *SDDS_dataset);
1042 int32_t SDDS_MPI_Get_Title_Size(SDDS_DATASET *MPI_dataset);
1043 int32_t SDDS_MPI_BufferedWrite(void *target, size_t targetSize, SDDS_DATASET *MPI_dataset);
1044 int32_t SDDS_MPI_FlushBuffer(SDDS_DATASET *MPI_Dataset);
1045 int32_t SDDS_MPI_GetTotalRows(SDDS_DATASET *MPI_dataset);
1046 int32_t SDDS_MPI_CountRowsOfInterest(SDDS_DATASET *SDDS_dataset, int32_t start_row, int32_t end_row);
1047 int32_t SDDS_MPI_WriteContinuousBinaryPage(SDDS_DATASET *MPI_dataset);
1048 MPI_Offset SDDS_MPI_GetTitleOffset(SDDS_DATASET *MPI_dataset);
1049
1050 int32_t SDDS_MPI_BufferedRead(void *target, size_t targetSize, SDDS_DATASET *MPI_dataset, SDDS_FILEBUFFER *fBuffer);
1051 int32_t SDDS_MPI_ReadBinaryPage(SDDS_DATASET *MPI_dataset);
1052 char *SDDS_MPI_ReadNonNativeBinaryString(SDDS_DATASET *MPI_dataset, SDDS_FILEBUFFER *fBuffer, int32_t skip);
1053 int32_t SDDS_MPI_ReadBinaryParameters(SDDS_DATASET *MPI_dataset, SDDS_FILEBUFFER *fBuffer);
1054 int32_t SDDS_MPI_ReadBinaryArrays(SDDS_DATASET *MPI_dataset, SDDS_FILEBUFFER *fBuffer);
1055 int32_t SDDS_MPI_ReadBinaryRow(SDDS_DATASET *MPI_dataset, int32_t row, int32_t skip);
1056 int32_t SDDS_MPI_ReadNonNativeBinaryParameters(SDDS_DATASET *SDDS_dataset);
1057 int32_t SDDS_MPI_ReadNonNativeBinaryArrays(SDDS_DATASET *MPI_dataset);
1058 int32_t SDDS_MPI_ReadNonNativeBinaryRow(SDDS_DATASET *MPI_dataset, int32_t row, int32_t skip);
1059 int32_t SDDS_MPI_ReadBinaryPage(SDDS_DATASET *MPI_dataset);
1060 int32_t SDDS_MPI_ReadNonNativePage(SDDS_DATASET *MPI_dataset);
1061 int32_t SDDS_MPI_ReadNonNativePageSparse(SDDS_DATASET *MPI_dataset, uint32_t mode);
1062 int32_t SDDS_MPI_ReadNonNativeBinaryPage(SDDS_DATASET *MPI_dataset);
1063 int32_t SDDS_MPI_ReadNonNativeBinaryRow(SDDS_DATASET *MPI_dataset, int32_t row, int32_t skip);
1064 int32_t SDDS_MPI_BufferedReadBinaryTitle(SDDS_DATASET *MPI_dataset);
1065 int32_t SDDS_SetDefaultTitleBufferSize(int32_t newSize);
1066 int32_t SDDS_MPI_WriteBinaryPageByColumn(SDDS_DATASET *MPI_dataset);
1067 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);
1068
1069
1070 epicsShareFuncSDDS extern int32_t SDDS_MPI_ReadPage(SDDS_DATASET *MPI_dataset);
1071 epicsShareFuncSDDS extern int32_t SDDS_MPI_InitializeInput(SDDS_DATASET *MPI_dataset, char *filename);
1072 epicsShareFuncSDDS extern int32_t SDDS_MPI_InitializeInputFromSearchPath(SDDS_DATASET *MPI_dataset, char *file);
1073 #define SDDS_MPI_TotalRowCount(SDDS_DATASET) ((SDDS_DATASET)->MPI_dataset->total_rows)
1074 #endif
1075
1076 #ifdef __cplusplus
1077 }
1078 #endif
1079
1080 #endif