Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:02:05

0001  /*************************************************************************\
0002 * Copyright (c) 2002 The University of Chicago, as Operator of Argonne
0003 * National Laboratory.
0004 * Copyright (c) 2002 The Regents of the University of California, as
0005 * Operator of Los Alamos National Laboratory.
0006 * This file is distributed subject to a Software License Agreement found
0007 * in the file LICENSE that is included with this distribution. 
0008 \*************************************************************************/
0009 
0010 /* file: SDDS.h
0011  * purpose: define structures and prototypes for use with SDDS
0012  *          format
0013  *
0014  * Michael Borland, 1993
0015  $Log: not supported by cvs2svn $
0016  Revision 1.85  2009/06/02 18:17:15  soliday
0017  Updated so that the MPI functions will be visable from shared libraries.
0018 
0019  Revision 1.84  2009/06/01 20:57:55  soliday
0020  Updated to work with SDDS_MPI_IO=0
0021 
0022  Revision 1.83  2009/05/08 16:05:18  shang
0023  added MPI non native writing routines
0024 
0025  Revision 1.82  2008/11/11 21:05:18  soliday
0026  Updated to fix an issue on vxWorks.
0027 
0028  Revision 1.81  2008/09/18 20:15:07  soliday
0029  Added SDDS_SetColumnFromFloats and SDDS_GetColumnInFloats
0030 
0031  Revision 1.80  2008/08/04 14:04:57  shang
0032  added collective_io to MPI_DATASET structure
0033 
0034  Revision 1.79  2008/07/21 14:45:28  shang
0035 
0036  redefined SDDS_MPI_TotalRowsCount
0037 
0038  Revision 1.78  2008/04/14 18:36:57  shang
0039  now includes the definition of parallel SDDS.
0040 
0041  Revision 1.77  2007/10/12 18:03:44  shang
0042  added titleBuffer member to SDDS_DATASET
0043 
0044  Revision 1.76  2007/09/27 14:25:53  shang
0045  added SDDS_Parallel_InitializeOutput
0046 
0047  Revision 1.75  2006/12/07 16:40:54  soliday
0048  Added SDDS_GetToken2 and SDDS_ScanData2 which are now used when reading
0049  ascii array data.
0050 
0051  Revision 1.74  2006/09/15 18:15:48  borland
0052  Added prototype for SDDS_CheckEndOfFile.
0053 
0054  Revision 1.73  2006/08/31 15:06:55  soliday
0055  Updated to work with SDDS2
0056 
0057  Revision 1.72  2006/05/25 21:23:55  shang
0058  added SDDS_GetColumnInShort
0059 
0060  Revision 1.71  2006/03/16 18:50:02  soliday
0061  Added the SDDS_BreakIntoLockedFile function.
0062 
0063  Revision 1.70  2005/11/04 22:46:59  soliday
0064  Updated code to be compiled by a 64 bit processor.
0065 
0066  Revision 1.69  2005/01/13 16:52:51  shang
0067  added is_string argument to is_memory() function to get the memory data type.
0068 
0069  Revision 1.68  2004/11/15 16:59:19  soliday
0070  Moved and renamed the procedures to write non native binary data from
0071  sddsendian to SDDSlib.
0072 
0073  Revision 1.67  2004/05/13 18:16:08  soliday
0074  Added SDDS_AppendToArrayVararg
0075 
0076  Revision 1.66  2004/02/27 21:57:57  soliday
0077  Modified SDDS_SetRowsOfInterest
0078 
0079  Revision 1.65  2004/02/27 21:14:08  soliday
0080  Modified SDDS_RegisterProgramName
0081 
0082  Revision 1.64  2004/02/05 22:56:15  soliday
0083  Added missing declaration for SDDS_CheckTabularData
0084 
0085  Revision 1.63  2003/10/17 16:11:29  soliday
0086  Added SDDS_VerifyColumnExists, SDDS_VerifyParameterExists,
0087  and SDDS_VerifyArrayExists
0088 
0089  Revision 1.62  2003/09/23 21:49:23  soliday
0090  Added the SDDS_MATCH_EXCLUDE_STRING definition.
0091 
0092  Revision 1.61  2003/09/11 22:31:35  soliday
0093  Added SDDS_GetParameterAsLong and SDDS_ConvertToLong
0094 
0095  Revision 1.60  2003/07/22 20:01:16  soliday
0096  Added support for Kylix.
0097 
0098  Revision 1.59  2003/02/15 22:54:16  borland
0099  Added prototype for SDDS_DoFSync().
0100 
0101  Revision 1.58  2002/08/14 15:40:12  soliday
0102  Added Open License
0103 
0104  Revision 1.57  2002/07/25 00:10:37  borland
0105  Added definition of SDDS_PRINT_BUFLEN.
0106 
0107  Revision 1.56  2002/07/24 20:23:13  shang
0108  added SDDS_InitializeInputFromSearchPath()
0109 
0110  Revision 1.55  2002/06/15 02:28:00  borland
0111  Added SDDS_ForceActive().
0112 
0113  Revision 1.54  2002/06/05 16:20:41  shang
0114  added SDDS_GetParameterAsString()
0115 
0116  Revision 1.53  2002/05/26 02:07:12  borland
0117  Added autoRecovered variable to SDDS_DATASET to allow recording fact that
0118  auto-read-recovery has occurred.
0119 
0120  Revision 1.52  2002/02/18 19:27:47  soliday
0121  Added the ability to enable or disable fsync.
0122 
0123  Revision 1.51  2002/01/15 22:46:05  soliday
0124  Added SetRowCountMode, UpdateRowCount, SetAutoReadRecovery
0125 
0126  Revision 1.50  2002/01/11 17:08:19  soliday
0127  Added SDDS_SyncDataSet
0128 
0129  Revision 1.49  2002/01/07 21:33:16  borland
0130  Added prototypes for SDDS_GetRowLimit() and SDDS_SetRowLimit().
0131 
0132  Revision 1.48  2002/01/07 19:31:23  soliday
0133  Fixed declaration for SDDS_SetNoRowCounts.
0134 
0135  Revision 1.47  2001/12/22 21:21:32  soliday
0136  Fixed RW_ASSOCIATES typo.
0137 
0138  Revision 1.46  2001/12/21 03:29:39  soliday
0139  Fixed some declarations.
0140 
0141  Revision 1.45  2001/11/30 15:35:13  borland
0142  Changes by H. Shang: addition of SDDS_GotoPage() and changes required to
0143  support this.
0144 
0145  Revision 1.44  2001/02/19 18:01:25  borland
0146  Added prototype for SDDS_GetParameterByIndex().
0147 
0148  Revision 1.43  2000/11/27 17:15:24  borland
0149  Fixed typo in previous change.
0150 
0151  Revision 1.42  2000/11/27 17:06:27  borland
0152  Added prototype for SDDS_FreeStringData().
0153 
0154  Revision 1.41  2000/10/31 21:24:53  soliday
0155  Fixed the declarations of some new functions so that they work with WIN32.
0156 
0157  Revision 1.40  2000/10/24 01:16:45  borland
0158  Added prototype for SDDS_GetArrayInDoubles().
0159 
0160  Revision 1.39  2000/09/19 20:14:11  borland
0161  Added function prototypes and changed some structures (SDDS_DATASET and
0162  SDDS_LAYOUT) to support reading of little/big endian files.
0163 
0164  Revision 1.38  2000/06/20 18:02:42  borland
0165  Added prototype for SDDS_SetDefaultIOBufferSize.
0166 
0167  Revision 1.37  2000/06/20 14:28:37  soliday
0168  Moved some definitions from SDDS_internal.h to SDDS.h so that sddsendian
0169  can access them.
0170 
0171  Revision 1.36  2000/04/14 16:36:12  soliday
0172  gzFile now is defined even when we are not using the zLib library.
0173 
0174  Revision 1.35  2000/04/13 17:04:58  soliday
0175  Fixed prototype for SDDS_NumberOfErrors and SDDS_ClearErrors
0176 
0177  Revision 1.34  2000/03/30 19:58:35  borland
0178  Added SDDS_DisconnectFile() and SDDS_ReconnectFile(), plus disconnected member
0179  to SDDS_LAYOUT structure.
0180 
0181  Revision 1.33  2000/03/30 17:26:57  soliday
0182  Added SDDS_InitializeAppendToPage
0183 
0184  Revision 1.32  2000/03/27 20:25:47  borland
0185  Added prototype for SDDS_ShortenTable().
0186 
0187  Revision 1.31  2000/02/25 23:15:12  evans
0188  Added SDDS_Free.  Memory allocated with SDDS_Malloc and others should
0189  be freed with SDDS_Free.  It is necessary for WIN32 when degugging
0190  SDDS applications using the release version of the SDDS library
0191  because the memory allocation models for debug and release are
0192  inconsistent.
0193 
0194  Revision 1.30  2000/01/18 20:06:46  soliday
0195  Added support for ZLIB.
0196 
0197  Revision 1.29  1999/11/03 22:42:47  soliday
0198  Added WriteBinaryString declaration
0199 
0200  Revision 1.28  1999/09/16 22:03:15  soliday
0201  Modified the way global variables are exported and imported to a WIN32 dll
0202 
0203  Revision 1.27  1999/09/14 18:03:28  soliday
0204  Added export commands for WIN32 dll files.
0205 
0206  Revision 1.26  1999/06/01 19:17:05  borland
0207  Added SDDS_Calloc.
0208 
0209  Revision 1.25  1999/04/14 13:58:47  borland
0210  Fixed some function types and returns.
0211 
0212  Revision 1.24  1999/02/04 21:13:19  soliday
0213  Added prototype for SDDS_GetColumnsInLong
0214 
0215  Revision 1.23  1998/12/16 21:20:35  borland
0216  Modified prototypes for SDDS_TransferAll* functions and added required
0217  macros.
0218 
0219  Revision 1.22  1998/08/25 01:45:47  borland
0220  Moved SDDS_FILEBUFFER_SIZE definition here from SDDS_binary.c
0221 
0222  Revision 1.21  1998/06/30 21:30:48  borland
0223  Added prototype for SDDS_FreeStringArray().
0224 
0225  Revision 1.20  1997/12/19 16:55:45  borland
0226  Fixed SDDS_RowCount macro (more parentheses).  Added prototype for
0227  SDDS_Malloc.  Added new "type": SDDS_ANY_FLOATING_TYPE.
0228 
0229  Revision 1.19  1997/07/08 14:41:17  borland
0230  Added SDDS_RowCount macro.
0231 
0232  * Revision 1.18  1996/07/05  16:36:02  borland
0233  * Modified prototypes for SDDS_PrintTypedValue and SDDS_SprintTypedValue
0234  * to include new mode argument.
0235  *
0236  * Revision 1.17  1996/03/27  17:51:08  borland
0237  * Added prototype and macros for SDDS_GetErrorMessages().
0238  *
0239  * Revision 1.16  1996/03/21  20:07:32  borland
0240  * Added mode argument to prototype for SDDS_ReadPageSparse().
0241  *
0242  * Revision 1.15  1996/03/21  16:39:50  borland
0243  * Added definitions for major revision of SDDS library.  Added file buffer
0244  * structure to SDDS_DATASET.  Added prototype for SDDS_ReadPageSparse().
0245  *
0246  * Revision 1.14  1996/02/12  17:18:55  borland
0247  * Added prototype for SDDS_SetAutoCheckMode() and mode flags to go with it.
0248  *
0249  * Revision 1.13  1996/01/20  05:38:03  borland
0250  * Added prototypes for SDDS_AppendLayout().
0251  *
0252  * Revision 1.12  1996/01/19  00:18:09  borland
0253  * SDDS.h: Added popenUsed to SDDS_LAYOUT structure.
0254  * scan.h: Added prototypes for unpacking functions.
0255  *
0256  * Revision 1.11  1996/01/18  04:31:56  borland
0257  * Added prototype for SDDS_GetInternalColumn()
0258  *
0259  * Revision 1.10  1996/01/14  01:56:27  borland
0260  * Added prototype and flag definitions for SDDS_FilterByNumScan().
0261  *
0262  * Revision 1.9  1996/01/10  17:23:57  borland
0263  * Added prototype for SDDS_LockFile().
0264  *
0265  * Revision 1.8  1996/01/09  23:22:58  borland
0266  * Added prototypes for SDDS_TransferAll*Definitions routines.
0267  *
0268  * Revision 1.7  1995/12/12  10:02:28  borland
0269  * Added prototype for SDDS_SetNoRowCounts().
0270  *
0271  * Revision 1.6  1995/12/12  04:30:38  borland
0272  * Added layout_written field to SDDS_LAYOUT struct; added  file_had_data
0273  * field to SDDS_DATASET struct; both in support of write/append to
0274  * files with no_row_counts=1.
0275  *
0276  * Revision 1.5  1995/11/13  16:08:13  borland
0277  * Added first_row_in_mem and writing_page entries to SDDS_DATASET structure
0278  * to support partially flushed tabular data.
0279  *
0280  * Revision 1.4  1995/11/08  04:25:53  borland
0281  * Added prototypes for new routines FreeArray, DefineParameterLikeArray,
0282  * and DefineColumnLikeArray.
0283  *
0284  * Revision 1.3  1995/09/12  03:18:41  borland
0285  * Added flag bit #define's for name validity control.
0286  * Added SDDS_CI_* #defines for SDDS_SetRowsOfInterest case-insensitive
0287  *   mode.
0288  * Added SDDS_NOCASE_COMPARE for SDDS_MatchRowsOfInterest case-insenstive
0289  *   mode.
0290  *
0291  * Revision 1.2  1995/09/05  21:14:46  saunders
0292  * First test release of the SDDS1.5 package.
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;   /*MPIO file handle          */
0320   MPI_Comm          comm;       /*communicator              */
0321   MPI_Info          File_info;  /*file information          */
0322   int32_t               myid;           /* This process's rank                  */
0323   int32_t               n_processors;   /* Total number of processes        */
0324   MPI_Offset            file_offset, file_size, column_offset;  /* number of bytes in one row for row major order*/
0325   short                 collective_io;
0326   int32_t               n_page;         /* index of current page*/
0327   int32_t               n_rows;         /* number of rows that current processor holds */
0328   int32_t               total_rows;     /* the total number of rows that all processor hold*/
0329   int32_t               end_of_file;    /* flag for end of MPI_file */
0330   int32_t               master_read;   /*determine if master processor read the page data or not*/
0331   int32_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 */
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 extern char *SDDS_type_name[SDDS_NUM_TYPES];
0394 extern int32_t SDDS_type_size[SDDS_NUM_TYPES];
0395 extern char *SDDS_data_mode[SDDS_NUM_DATA_MODES];
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 /* this shouldn't be changed without changing buffer sizes in namelist routines: */
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     /* these are used internally and are not set by the user: */
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     /* these are used internally and are not set by the user: */
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     /* Address of array of data values, stored contiguously.
0484      * For STRING data, the "data values" are actually the addresses of the individual strings.
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; /*file mode*/
0505     short page_started; /*0 or 1 for page not started or already started*/
0506     int32_t pages_read; /*the number of pages read so far*/
0507     int32_t endOfFile_offset;/*the offset in the end of the file*/
0508     int32_t *pagecount_offset; /*the offset of each read page */ 
0509     int32_t rowcount_offset;  /* ftell() position of row count */
0510     int32_t n_rows_written;   /* number of tabular data rows written to disk */
0511     int32_t last_row_written; /* virtual index of last row written */
0512     int32_t first_row_in_mem; /* virtual index of first row in memory */
0513     short writing_page;    /* 1/0 for writing/not-writing page */
0514     int32_t n_rows_allocated; /* number of tabular data rows for which space is alloc'd */
0515     int32_t n_rows;           /* number of rows stored in memory */
0516     int32_t *row_flag;        /* accept/reject flags for rows stored in memory */
0517     short file_had_data;   /* indicates that file being appended to already had some data in it (i.e.,
0518                             * more than just a header.  Affects no_row_counts=1 output.
0519                             */
0520     short autoRecover;
0521     short autoRecovered;
0522   short parallel_io;        /*flag for parallel SDDS */
0523     int32_t n_of_interest;
0524     int32_t *column_order;          /* column_order[i] = internal index of user's ith column */
0525     int32_t *column_flag;           /* column_flag[i] indicates whether internal ith column has been selected */
0526 
0527     /* array of SDDS_ARRAY structures for storing array data */
0528     SDDS_ARRAY *array;
0529 
0530     /* array for parameter data.  The address of the data for the ith parameter
0531      * is parameter[i].  So *(<type-name> *)parameter[i] gives the data itself.  For type
0532      * SDDS_STRING the "data itself" is actually the address of the string, and the type-name
0533      * is "char *".
0534      */
0535     void **parameter;
0536 
0537     /* array for tabular data.  The starting address for the data for the ith column
0538      * is data[i].  So ((<type-name> *)data[i])[j] gives the jth data value.  
0539      * For type SDDS_STRING the "data value" is actually the address of the string, and
0540      * the type-name is "char *".
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 /* prototypes for routines to prepare and write SDDS files */
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 // epicsShareFuncSDDS extern int32_t SDDS_DefineArray(SDDS_DATASET *SDDS_dataset, char *name, char *symbol, char *units, char *description, 
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 /* prototypes for routines to read and use SDDS files  */
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 /* logic flags for SDDS_AssertRowFlags and SDDS_AssertColumnFlags */
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 /* modes for SDDS_SetColumnsOfInterest and SDDS_SetRowsOfInterest: */
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 /* logic flags for SDDS_SetColumnsOfInterest, SDDS_SetRowsOfInterest, and SDDS_MatchRowsOfInterest: */
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 /* used by MatchRowsOfInterest only at this point: */
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 // epicsShareFuncSDDS extern int32_t SDDS_SetArrayVararg(SDDS_DATASET *SDDS_dataset, char *array_name, int32_t mode, void *data_pointer, ...);
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 /* error-handling and utility routines: */
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   /* SDDSmpi_output.c */
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   /*SDDS_MPI_binary.c writing data*/
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   /*SDDS_MPI_binary.c reading data*/
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   /*SDDSmpi_input.c */
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