| Revision 1649,
1.6 KB
checked in by Freddie Akeroyd, 7 months ago
(diff) |
|
XML now working with int64 dimensions. Refs #258
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 | /* |
|---|
| 2 | This is a module which implements the notion of a dataset. Its is |
|---|
| 3 | designed for the use with scripting languages. |
|---|
| 4 | |
|---|
| 5 | copyright: GPL |
|---|
| 6 | |
|---|
| 7 | Mark Koennecke, October 2002 |
|---|
| 8 | */ |
|---|
| 9 | #ifndef NXDATASET |
|---|
| 10 | #define NXDATASET |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | #define MAGIC 7776622 |
|---|
| 14 | |
|---|
| 15 | #include "napiconfig.h" |
|---|
| 16 | |
|---|
| 17 | typedef struct { |
|---|
| 18 | int magic; |
|---|
| 19 | int rank; |
|---|
| 20 | int type; |
|---|
| 21 | int64_t *dim; |
|---|
| 22 | char *format; |
|---|
| 23 | union { |
|---|
| 24 | void *ptr; |
|---|
| 25 | float *fPtr; |
|---|
| 26 | double *dPtr; |
|---|
| 27 | int *iPtr; |
|---|
| 28 | short int *sPtr; |
|---|
| 29 | char *cPtr; |
|---|
| 30 | int64_t *lPtr; |
|---|
| 31 | } u; |
|---|
| 32 | }*pNXDS, NXDS; |
|---|
| 33 | |
|---|
| 34 | /* |
|---|
| 35 | include NeXus type codes if not already defined |
|---|
| 36 | */ |
|---|
| 37 | #ifndef NX_FLOAT32 |
|---|
| 38 | |
|---|
| 39 | #define NX_FLOAT32 5 |
|---|
| 40 | #define NX_FLOAT64 6 |
|---|
| 41 | #define NX_INT8 20 |
|---|
| 42 | #define NX_UINT8 21 |
|---|
| 43 | #define NX_INT16 22 |
|---|
| 44 | #define NX_UINT16 23 |
|---|
| 45 | #define NX_INT32 24 |
|---|
| 46 | #define NX_UINT32 25 |
|---|
| 47 | #define NX_INT64 26 |
|---|
| 48 | #define NX_UINT64 27 |
|---|
| 49 | #define NX_CHAR 4 |
|---|
| 50 | |
|---|
| 51 | #define NX_MAXRANK 32 |
|---|
| 52 | |
|---|
| 53 | #endif |
|---|
| 54 | |
|---|
| 55 | |
|---|
| 56 | pNXDS createNXDataset(int rank, int typecode, int64_t dim[]); |
|---|
| 57 | pNXDS createTextNXDataset(char *name); |
|---|
| 58 | |
|---|
| 59 | void dropNXDataset(pNXDS dataset); |
|---|
| 60 | |
|---|
| 61 | int getNXDatasetRank(pNXDS dataset); |
|---|
| 62 | int getNXDatasetDim(pNXDS dataset, int which); |
|---|
| 63 | int getNXDatasetType(pNXDS dataset); |
|---|
| 64 | int getNXDatasetLength(pNXDS dataset); |
|---|
| 65 | int getNXDatasetByteLength(pNXDS dataset); |
|---|
| 66 | |
|---|
| 67 | double getNXDatasetValue(pNXDS dataset, int64_t pos[]); |
|---|
| 68 | double getNXDatasetValueAt(pNXDS dataset, int64_t address); |
|---|
| 69 | char *getNXDatasetText(pNXDS dataset); |
|---|
| 70 | |
|---|
| 71 | int putNXDatasetValue(pNXDS dataset, int64_t pos[], double value); |
|---|
| 72 | int putNXDatasetValueAt(pNXDS dataset, int64_t address, double value); |
|---|
| 73 | |
|---|
| 74 | #endif |
|---|
Note: See
TracBrowser
for help on using the repository browser.