NeXus  4.4.3
 All Data Structures Files Functions Variables Typedefs Macros Pages
napi_exports.h
Go to the documentation of this file.
1 /*
2  * code for napi_exports.c
3  */
4 
5 NXstatus CALL_MODE NXISETCACHE(long newVal)
6 {
7  return NXsetcache(newVal);
8 }
9 
10 /*
11 void CALL_MODE NXNXNXREPORTERROR(void *pData, char *string)
12 {
13  NXNXNXReportError(pData, string);
14 }
15 */
16 
17 NXstatus CALL_MODE NXIOPEN(CONSTCHAR *filename, NXaccess am, NXhandle *gHandle)
18 {
19  return NXopen(filename, am, gHandle);
20 }
21 
22 NXstatus CALL_MODE NXICLOSE(NXhandle *fid)
23 {
24  return NXclose(fid);
25 }
26 
27 NXstatus CALL_MODE NXIFLUSH(NXhandle* pHandle)
28 {
29  return NXflush(pHandle);
30 }
31 
32 NXstatus CALL_MODE NXIMAKEGROUP(NXhandle handle, CONSTCHAR *name, CONSTCHAR* NXclass)
33 {
34  return NXmakegroup(handle, name, NXclass);
35 }
36 
37 NXstatus CALL_MODE NXIOPENGROUP(NXhandle handle, CONSTCHAR *name, CONSTCHAR* NXclass)
38 {
39  return NXopengroup(handle, name, NXclass);
40 }
41 
42 NXstatus CALL_MODE NXIOPENPATH(NXhandle handle, CONSTCHAR *path)
43 {
44  return NXopenpath(handle, path);
45 }
46 
47 NXstatus CALL_MODE NXIOPENGROUPPATH (NXhandle handle, CONSTCHAR *path)
48 {
49  return NXopengrouppath(handle, path);
50 }
51 
52 NXstatus CALL_MODE NXICLOSEGROUP(NXhandle handle)
53 {
54  return NXclosegroup(handle);
55 }
56 
57 NXstatus CALL_MODE NXIMAKEDATA (NXhandle handle, CONSTCHAR* label, int datatype, int rank, int dim[])
58 {
59  return NXmakedata (handle, label, datatype, rank, dim);
60 }
61 
62 NXstatus CALL_MODE NXICOMPMAKEDATA (NXhandle handle, CONSTCHAR* label, int datatype, int rank, int dim[], int comp_typ, int bufsize[])
63 {
64  return NXcompmakedata (handle, label, datatype, rank, dim, comp_typ, bufsize);
65 }
66 
67 NXstatus CALL_MODE NXICOMPRESS (NXhandle handle, int compr_type)
68 {
69  return NXcompress (handle, compr_type);
70 }
71 
72 NXstatus CALL_MODE NXIOPENDATA (NXhandle handle, CONSTCHAR* label)
73 {
74  return NXopendata (handle, label);
75 }
76 
77 NXstatus CALL_MODE NXICLOSEDATA(NXhandle handle)
78 {
79  return NXclosedata(handle);
80 }
81 
82 NXstatus CALL_MODE NXIPUTDATA(NXhandle handle, void* data)
83 {
84  return NXputdata(handle, data);
85 }
86 
87 NXstatus CALL_MODE NXIPUTATTR(NXhandle handle, CONSTCHAR* name, void* data, int iDataLen, int iType)
88 {
89  return NXputattr(handle, name, data, iDataLen, iType);
90 }
91 
92 NXstatus CALL_MODE NXIPUTSLAB(NXhandle handle, void* data, int start[], int size[])
93 {
94  return NXputslab(handle, data, start, size);
95 }
96 
97 NXstatus CALL_MODE NXIGETDATAID(NXhandle handle, NXlink* pLink)
98 {
99  return NXgetdataID(handle, pLink);
100 }
101 
102 NXstatus CALL_MODE NXIMAKELINK(NXhandle handle, NXlink* pLink)
103 {
104  return NXmakelink(handle, pLink);
105 }
106 
107 NXstatus CALL_MODE NXIOPENSOURCEGROUP(NXhandle handle)
108 {
109  return NXopensourcegroup(handle);
110 }
111 
112 NXstatus CALL_MODE NXIGETDATA(NXhandle handle, void* data)
113 {
114  return NXgetdata(handle, data);
115 }
116 
117 NXstatus CALL_MODE NXIGETINFO(NXhandle handle, int* rank, int dimension[], int* datatype)
118 {
119  return NXgetinfo(handle, rank, dimension, datatype);
120 }
121 
122 NXstatus CALL_MODE NXIGETNEXTENTRY(NXhandle handle, NXname name, NXname nxclass, int* datatype)
123 {
124  return NXgetnextentry(handle, name, nxclass, datatype);
125 }
126 
127 NXstatus CALL_MODE NXIGETSLAB(NXhandle handle, void* data, int start[], int size[])
128 {
129  return NXgetslab(handle, data, start, size);
130 }
131 
132 NXstatus CALL_MODE NXIGETNEXTATTR(NXhandle handle, NXname pName, int *iLength, int *iType)
133 {
134  return NXgetnextattr(handle, pName, iLength, iType);
135 }
136 
137 NXstatus CALL_MODE NXIGETATTR(NXhandle handle, char* name, void* data, int* iDataLen, int* iType)
138 {
139  return NXgetattr(handle, name, data, iDataLen, iType);
140 }
141 
142 NXstatus CALL_MODE NXIGETATTRINFO(NXhandle handle, int* no_items)
143 {
144  return NXgetattrinfo(handle, no_items);
145 }
146 
147 NXstatus CALL_MODE NXIGETGROUPID(NXhandle handle, NXlink* pLink)
148 {
149  return NXgetgroupID(handle, pLink);
150 }
151 
152 NXstatus CALL_MODE NXIGETGROUPINFO(NXhandle handle, int* no_items, NXname name, NXname nxclass)
153 {
154  return NXgetgroupinfo(handle, no_items, name, nxclass);
155 }
156 
157 NXstatus CALL_MODE NXISAMEID(NXhandle handle, NXlink* pFirstID, NXlink* pSecondID)
158 {
159  return NXsameID(handle, pFirstID, pSecondID);
160 }
161 
162 NXstatus CALL_MODE NXIINITGROUPDIR(NXhandle handle)
163 {
164  return NXinitgroupdir(handle);
165 }
166 NXstatus CALL_MODE NXIINITATTRDIR(NXhandle handle)
167 {
168  return NXinitattrdir(handle);
169 }
170 NXstatus CALL_MODE NXISETNUMBERFORMAT(NXhandle handle, int type, char *format)
171 {
172  return NXsetnumberformat(handle,type, format);
173 }
174 
175 NXstatus CALL_MODE NXIMALLOC(void** data, int rank, int dimensions[], int datatype)
176 {
177  return NXmalloc(data, rank, dimensions, datatype);
178 }
179 
180 NXstatus CALL_MODE NXIFREE(void** data)
181 {
182  return NXfree(data);
183 }
184 
185 #if 0
186 /*-----------------------------------------------------------------------
187  NAPI internals
188 ------------------------------------------------------------------------*/
189 extern void NXMSetError(void *pData, void (*ErrFunc)(void *pD, char *text));
190 extern void (*NXIReportError)(void *pData,char *text);
191 extern void *NXpData;
192 extern char *NXIformatNeXusTime();
193 #endif
194 
195 /* FORTRAN internals */
196 
197 NXstatus CALL_MODE NXIFOPEN(char * filename, NXaccess* am,
198  NexusFunction* pHandle)
199 {
200  return NXfopen(filename, am, pHandle);
201 }
202 
203 NXstatus CALL_MODE NXIFCLOSE (NexusFunction* pHandle)
204 {
205  return NXfclose (pHandle);
206 }
207 
208 NXstatus CALL_MODE NXIFPUTATTR(NXhandle fid, char *name, void *data,
209  int *pDatalen, int *pIType)
210 {
211  return NXfputattr(fid, name, data, pDatalen, pIType);
212 }
213 
214 NXstatus CALL_MODE NXIFCOMPRESS(NXhandle fid, int *compr_type)
215 {
216  return NXfcompress(fid, compr_type);
217 }
218 
219 NXstatus CALL_MODE NXIFCOMPMAKEDATA(NXhandle fid, char *name,
220  int *pDatatype,
221  int *pRank, int dimensions[],
222  int *compression_type, int chunk[])
223 {
224  return NXfcompmakedata(fid, name, pDatatype, pRank, dimensions,
225  compression_type, chunk);
226 }
227 
228 NXstatus CALL_MODE NXIFMAKEDATA(NXhandle fid, char *name, int *pDatatype,
229  int *pRank, int dimensions[])
230 {
231  return NXfmakedata(fid, name, pDatatype, pRank, dimensions);
232 }
233 
235 {
236  return NXfflush(pHandle);
237 }
238 
239 NXstatus CALL_MODE NXIINQUIREFILE(NXhandle handle, char *filename, int filenameBufferLength)
240 {
241  return NXinquirefile(handle, filename, filenameBufferLength);
242 }
243 
244 NXstatus CALL_MODE NXIISEXTERNALGROUP(NXhandle fid, CONSTCHAR *name, CONSTCHAR *nxclass, char *url, int urlLen)
245 {
246  return NXisexternalgroup(fid, name, nxclass, url, urlLen);
247 }
248 
249 NXstatus CALL_MODE NXILINKEXTERNAL(NXhandle fid, CONSTCHAR *name, CONSTCHAR *nxclass, CONSTCHAR *url)
250 {
251  return NXlinkexternal(fid, name, nxclass, url);
252 }
253 
254 NXstatus CALL_MODE NXIMAKENAMEDLINK(NXhandle fid, CONSTCHAR *newname, NXlink* pLink)
255 {
256  return NXmakenamedlink(fid, newname, pLink);
257 }
258 
259 NXstatus CALL_MODE NXIGETRAWINFO(NXhandle handle, int* rank, int dimension[], int* datatype)
260 {
261  return NXgetrawinfo(handle, rank, dimension, datatype);
262 }
263 
NXstatus CALL_MODE NXIGETDATA(NXhandle handle, void *data)
Definition: napi_exports.h:112
#define NXfcompmakedata
NXstatus NXgetattrinfo(NXhandle fid, int *iN)
Definition: napi.c:1372
NXstatus NXgetslab(NXhandle fid, void *data, const int iStart[], const int iSize[])
Definition: napi.c:1326
NXstatus NXisexternalgroup(NXhandle fid, CONSTCHAR *name, CONSTCHAR *nxclass, char *url, int urlLen)
Definition: napi.c:1478
NXstatus NXgetattr(NXhandle fid, const char *name, void *data, int *datalen, int *iType)
Definition: napi.c:1361
NXstatus CALL_MODE NXIFPUTATTR(NXhandle fid, char *name, void *data, int *pDatalen, int *pIType)
Definition: napi_exports.h:208
void NXMSetError(void *pData, void(*NewError)(void *pD, char *text))
Definition: napi.c:319
NXstatus CALL_MODE NXIFCOMPRESS(NXhandle fid, int *compr_type)
Definition: napi_exports.h:214
NXstatus CALL_MODE NXIPUTDATA(NXhandle handle, void *data)
Definition: napi_exports.h:82
#define NXfputattr
NXstatus NXopen(CONSTCHAR *userfilename, NXaccess am, NXhandle *gHandle)
Definition: napi.c:463
NXstatus CALL_MODE NXIGETATTR(NXhandle handle, char *name, void *data, int *iDataLen, int *iType)
Definition: napi_exports.h:137
NXstatus CALL_MODE NXIOPEN(CONSTCHAR *filename, NXaccess am, NXhandle *gHandle)
Definition: napi_exports.h:17
NXstatus CALL_MODE NXIOPENGROUP(NXhandle handle, CONSTCHAR *name, CONSTCHAR *NXclass)
Definition: napi_exports.h:37
NXstatus CALL_MODE NXIGETATTRINFO(NXhandle handle, int *no_items)
Definition: napi_exports.h:142
NXstatus CALL_MODE NXIGETGROUPINFO(NXhandle handle, int *no_items, NXname name, NXname nxclass)
Definition: napi_exports.h:152
NXstatus CALL_MODE NXIGETSLAB(NXhandle handle, void *data, int start[], int size[])
Definition: napi_exports.h:127
NXstatus CALL_MODE NXIFMAKEDATA(NXhandle fid, char *name, int *pDatatype, int *pRank, int dimensions[])
Definition: napi_exports.h:228
NXstatus NXputattr(NXhandle fid, CONSTCHAR *name, const void *data, int datalen, int iType)
Definition: napi.c:1016
NXstatus CALL_MODE NXIINITGROUPDIR(NXhandle handle)
Definition: napi_exports.h:162
NXstatus NXinitattrdir(NXhandle fid)
Definition: napi.c:1407
NXstatus CALL_MODE NXIMALLOC(void **data, int rank, int dimensions[], int datatype)
Definition: napi_exports.h:175
NXstatus CALL_MODE NXIGETGROUPID(NXhandle handle, NXlink *pLink)
Definition: napi_exports.h:147
NXstatus CALL_MODE NXIOPENPATH(NXhandle handle, CONSTCHAR *path)
Definition: napi_exports.h:42
NXstatus CALL_MODE NXILINKEXTERNAL(NXhandle fid, CONSTCHAR *name, CONSTCHAR *nxclass, CONSTCHAR *url)
Definition: napi_exports.h:249
NXstatus CALL_MODE NXIPUTSLAB(NXhandle handle, void *data, int start[], int size[])
Definition: napi_exports.h:92
NXstatus NXopensourcegroup(NXhandle fid)
Definition: napi.c:1096
#define NXfopen
NXstatus NXcompmakedata(NXhandle fid, CONSTCHAR *name, int datatype, int rank, int dimensions[], int compress_type, int chunk_size[])
Definition: napi.c:887
NXstatus CALL_MODE NXIGETRAWINFO(NXhandle handle, int *rank, int dimension[], int *datatype)
Definition: napi_exports.h:259
#define CALL_MODE
Definition: napi_exports.c:9
#define NXfclose
NXstatus NXmakenamedlink(NXhandle fid, CONSTCHAR *newname, NXlink *sLink)
Definition: napi.c:1081
NXstatus CALL_MODE NXICLOSEGROUP(NXhandle handle)
Definition: napi_exports.h:52
NXstatus CALL_MODE NXIINQUIREFILE(NXhandle handle, char *filename, int filenameBufferLength)
Definition: napi_exports.h:239
NXstatus CALL_MODE NXICOMPRESS(NXhandle handle, int compr_type)
Definition: napi_exports.h:67
NXstatus NXsetcache(long newVal)
Definition: napi.c:250
NXstatus CALL_MODE NXIGETNEXTATTR(NXhandle handle, NXname pName, int *iLength, int *iType)
Definition: napi_exports.h:132
NXstatus NXgetgroupinfo(NXhandle fid, int *iN, NXname pName, NXname pClass)
Definition: napi.c:1388
NXstatus CALL_MODE NXIGETDATAID(NXhandle handle, NXlink *pLink)
Definition: napi_exports.h:97
NXstatus NXopengroup(NXhandle fid, CONSTCHAR *name, CONSTCHAR *nxclass)
Definition: napi.c:782
NXstatus CALL_MODE NXISAMEID(NXhandle handle, NXlink *pFirstID, NXlink *pSecondID)
Definition: napi_exports.h:157
#define NXfcompress
NXstatus NXopengrouppath(NXhandle hfil, CONSTCHAR *path)
Definition: napi.c:1894
NXstatus CALL_MODE NXIFFLUSH(NexusFunction *pHandle)
Definition: napi_exports.h:234
NXstatus CALL_MODE NXIOPENDATA(NXhandle handle, CONSTCHAR *label)
Definition: napi_exports.h:72
NXstatus CALL_MODE NXIMAKELINK(NXhandle handle, NXlink *pLink)
Definition: napi_exports.h:102
#define NXfflush
NXstatus NXgetnextentry(NXhandle fid, NXname name, NXname nxclass, int *datatype)
Definition: napi.c:1189
NXstatus CALL_MODE NXIINITATTRDIR(NXhandle handle)
Definition: napi_exports.h:166
NXstatus CALL_MODE NXIFOPEN(char *filename, NXaccess *am, NexusFunction *pHandle)
Definition: napi_exports.h:197
NXstatus CALL_MODE NXIGETNEXTENTRY(NXhandle handle, NXname name, NXname nxclass, int *datatype)
Definition: napi_exports.h:122
NXstatus NXflush(NXhandle *pHandle)
Definition: napi.c:1111
void NXIReportError(void *pData, char *string)
Definition: napi.c:298
NXstatus CALL_MODE NXIOPENSOURCEGROUP(NXhandle handle)
Definition: napi_exports.h:107
NXstatus NXgetinfo(NXhandle fid, int *rank, int dimension[], int *iType)
Definition: napi.c:1286
NXstatus CALL_MODE NXIISEXTERNALGROUP(NXhandle fid, CONSTCHAR *name, CONSTCHAR *nxclass, char *url, int urlLen)
Definition: napi_exports.h:244
NXstatus NXgetrawinfo(NXhandle fid, int *rank, int dimension[], int *iType)
Definition: napi.c:1270
NXstatus NXinitgroupdir(NXhandle fid)
Definition: napi.c:1433
NXstatus NXinquirefile(NXhandle handle, char *filename, int filenameBufferLength)
Definition: napi.c:1440
NXstatus CALL_MODE NXIFLUSH(NXhandle *pHandle)
Definition: napi_exports.h:27
NXstatus NXopendata(NXhandle fid, CONSTCHAR *name)
Definition: napi.c:931
NXstatus NXcompress(NXhandle fid, int compress_type)
Definition: napi.c:923
NXstatus NXmakelink(NXhandle fid, NXlink *sLink)
Definition: napi.c:1073
NXstatus CALL_MODE NXIMAKEGROUP(NXhandle handle, CONSTCHAR *name, CONSTCHAR *NXclass)
Definition: napi_exports.h:32
NXstatus NXgetdata(NXhandle fid, void *data)
Definition: napi.c:1238
NXstatus CALL_MODE NXIGETINFO(NXhandle handle, int *rank, int dimension[], int *datatype)
Definition: napi_exports.h:117
NXstatus CALL_MODE NXIOPENGROUPPATH(NXhandle handle, CONSTCHAR *path)
Definition: napi_exports.h:47
NXstatus NXputslab(NXhandle fid, const void *data, const int iStart[], const int iSize[])
Definition: napi.c:1040
NXstatus CALL_MODE NXISETNUMBERFORMAT(NXhandle handle, int type, char *format)
Definition: napi_exports.h:170
NXstatus NXsameID(NXhandle fileid, NXlink *pFirstID, NXlink *pSecondID)
Definition: napi.c:1398
NXstatus NXclose(NXhandle *fid)
Definition: napi.c:688
NXstatus NXlinkexternal(NXhandle fid, CONSTCHAR *name, CONSTCHAR *nxclass, CONSTCHAR *url)
Definition: napi.c:1561
NXstatus NXgetgroupID(NXhandle fileid, NXlink *sRes)
Definition: napi.c:1380
NXstatus CALL_MODE NXIFCLOSE(NexusFunction *pHandle)
Definition: napi_exports.h:203
NXstatus CALL_MODE NXIMAKEDATA(NXhandle handle, CONSTCHAR *label, int datatype, int rank, int dim[])
Definition: napi_exports.h:57
NXstatus CALL_MODE NXIMAKENAMEDLINK(NXhandle fid, CONSTCHAR *newname, NXlink *pLink)
Definition: napi_exports.h:254
NXstatus CALL_MODE NXICOMPMAKEDATA(NXhandle handle, CONSTCHAR *label, int datatype, int rank, int dim[], int comp_typ, int bufsize[])
Definition: napi_exports.h:62
NXstatus CALL_MODE NXIPUTATTR(NXhandle handle, CONSTCHAR *name, void *data, int iDataLen, int iType)
Definition: napi_exports.h:87
NXstatus NXmakegroup(NXhandle fid, CONSTCHAR *name, CONSTCHAR *nxclass)
Definition: napi.c:718
NXstatus NXgetdataID(NXhandle fid, NXlink *sRes)
Definition: napi.c:1065
NXstatus NXopenpath(NXhandle hfil, CONSTCHAR *path)
Definition: napi.c:1861
NXstatus NXmakedata(NXhandle fid, CONSTCHAR *name, int datatype, int rank, int dimensions[])
Definition: napi.c:858
NXstatus NXmalloc(void **data, int rank, const int dimensions[], int datatype)
Definition: napi.c:1128
NXstatus CALL_MODE NXISETCACHE(long newVal)
Definition: napi_exports.h:5
char * NXIformatNeXusTime()
Definition: napi.c:1973
NXstatus CALL_MODE NXICLOSE(NXhandle *fid)
Definition: napi_exports.h:22
NXstatus NXclosedata(NXhandle fid)
Definition: napi.c:973
NXstatus NXfree(void **data)
Definition: napi.c:1172
NXstatus NXputdata(NXhandle fid, const void *data)
Definition: napi.c:1008
NXstatus CALL_MODE NXICLOSEDATA(NXhandle handle)
Definition: napi_exports.h:77
#define NXfmakedata
NXstatus NXclosegroup(NXhandle fid)
Definition: napi.c:824
NXstatus NXsetnumberformat(NXhandle fid, int type, char *format)
Definition: napi.c:1415
NXstatus CALL_MODE NXIFREE(void **data)
Definition: napi_exports.h:180
NXstatus NXgetnextattr(NXhandle fileid, NXname pName, int *iLength, int *iType)
Definition: napi.c:1351
NXstatus CALL_MODE NXIFCOMPMAKEDATA(NXhandle fid, char *name, int *pDatatype, int *pRank, int dimensions[], int *compression_type, int chunk[])
Definition: napi_exports.h:219