diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index fe418b81..5a1d0dce 100755 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -90,6 +90,8 @@ set( HEADERS include/udaPutAPI.h include/udaStructs.h include/udaTypes.h + include/logging.h + include/errorLog.h ) install( FILES uda.h ${CMAKE_BINARY_DIR}/source/version.h DESTINATION include/uda ) install( FILES ${HEADERS} DESTINATION include/uda ) diff --git a/source/include/accAPI.h b/source/include/accAPI.h index d6c0df5e..43027610 100644 --- a/source/include/accAPI.h +++ b/source/include/accAPI.h @@ -19,103 +19,103 @@ LIBRARY_API DATA_BLOCK* acc_getCurrentDataBlock(CLIENT_FLAGS* client_flags); LIBRARY_API int acc_getCurrentDataBlockIndex(CLIENT_FLAGS* client_flags); -LIBRARY_API int acc_growIdamDataBlocks(CLIENT_FLAGS* client_flags); +LIBRARY_API int acc_growUdaDataBlocks(CLIENT_FLAGS* client_flags); -LIBRARY_API int acc_getIdamNewDataHandle(CLIENT_FLAGS* client_flags); +LIBRARY_API int acc_getUdaNewDataHandle(CLIENT_FLAGS* client_flags); LIBRARY_API void acc_freeDataBlocks(); -LIBRARY_API void setIdamPrivateFlag(unsigned int flag); +LIBRARY_API void setUdaPrivateFlag(unsigned int flag); -LIBRARY_API void resetIdamPrivateFlag(unsigned int flag); +LIBRARY_API void resetUdaPrivateFlag(unsigned int flag); -LIBRARY_API void setIdamClientFlag(CLIENT_FLAGS* client_flags, unsigned int flag); +LIBRARY_API void setUdaClientFlag(CLIENT_FLAGS* client_flags, unsigned int flag); -LIBRARY_API void resetIdamClientFlag(CLIENT_FLAGS* client_flags, unsigned int flag); +LIBRARY_API void resetUdaClientFlag(CLIENT_FLAGS* client_flags, unsigned int flag); -LIBRARY_API void setIdamProperty(const char* property, CLIENT_FLAGS* client_flags); +LIBRARY_API void setUdaProperty(const char* property, CLIENT_FLAGS* client_flags); -LIBRARY_API int getIdamProperty(const char* property, const CLIENT_FLAGS* client_flags); +LIBRARY_API int getUdaProperty(const char* property, const CLIENT_FLAGS* client_flags); -LIBRARY_API void resetIdamProperty(const char* property, CLIENT_FLAGS* client_flags); +LIBRARY_API void resetUdaProperty(const char* property, CLIENT_FLAGS* client_flags); -LIBRARY_API void resetIdamProperties(CLIENT_FLAGS* client_flags); +LIBRARY_API void resetUdaProperties(CLIENT_FLAGS* client_flags); -LIBRARY_API CLIENT_BLOCK saveIdamProperties(const CLIENT_FLAGS* client_flags); +LIBRARY_API CLIENT_BLOCK saveUdaProperties(const CLIENT_FLAGS* client_flags); -LIBRARY_API void restoreIdamProperties(CLIENT_BLOCK cb, CLIENT_FLAGS* client_flags); +LIBRARY_API void restoreUdaProperties(CLIENT_BLOCK cb, CLIENT_FLAGS* client_flags); -LIBRARY_API CLIENT_BLOCK* getIdamProperties(int handle); +LIBRARY_API CLIENT_BLOCK* getUdaProperties(int handle); -LIBRARY_API CLIENT_BLOCK* getIdamDataProperties(int handle); +LIBRARY_API CLIENT_BLOCK* getUdaDataProperties(int handle); #ifndef __APPLE__ -LIBRARY_API int getIdamMemoryFree(); +LIBRARY_API int getUdaMemoryFree(); -LIBRARY_API int getIdamMemoryUsed(); +LIBRARY_API int getUdaMemoryUsed(); #endif -LIBRARY_API void putIdamErrorModel(int handle, int model, int param_n, const float* params); +LIBRARY_API void putUdaErrorModel(int handle, int model, int param_n, const float* params); -LIBRARY_API void putIdamDimErrorModel(int handle, int ndim, int model, int param_n, const float* params); +LIBRARY_API void putUdaDimErrorModel(int handle, int ndim, int model, int param_n, const float* params); -LIBRARY_API void putIdamServer(const char* host, int port); +LIBRARY_API void putUdaServer(const char* host, int port); -LIBRARY_API void putIdamServerHost(const char* host); +LIBRARY_API void putUdaServerHost(const char* host); -LIBRARY_API void putIdamServerPort(int port); +LIBRARY_API void putUdaServerPort(int port); -LIBRARY_API void putIdamServerSocket(int socket); +LIBRARY_API void putUdaServerSocket(int socket); -LIBRARY_API void getIdamServer(const char** host, int* port, int* socket); +LIBRARY_API void getUdaServer(const char** host, int* port, int* socket); LIBRARY_API UDA_ERROR_STACK* getUdaServerErrorStack(); -LIBRARY_API int getIdamErrorCode(int handle); +LIBRARY_API int getUdaErrorCode(int handle); -LIBRARY_API const char* getIdamErrorMsg(int handle); +LIBRARY_API const char* getUdaErrorMsg(int handle); -LIBRARY_API int getIdamSourceStatus(int handle); +LIBRARY_API int getUdaSourceStatus(int handle); -LIBRARY_API int getIdamSignalStatus(int handle); +LIBRARY_API int getUdaSignalStatus(int handle); -LIBRARY_API int getIdamDataStatus(int handle); +LIBRARY_API int getUdaDataStatus(int handle); -LIBRARY_API int getIdamLastHandle(CLIENT_FLAGS* client_flags); +LIBRARY_API int getUdaLastHandle(CLIENT_FLAGS* client_flags); -LIBRARY_API int getIdamDataNum(int handle); +LIBRARY_API int getUdaDataNum(int handle); -LIBRARY_API int getIdamRank(int handle); +LIBRARY_API int getUdaRank(int handle); -LIBRARY_API int getIdamOrder(int handle); +LIBRARY_API int getUdaOrder(int handle); -LIBRARY_API unsigned int getIdamCachePermission(int handle); +LIBRARY_API unsigned int getUdaCachePermission(int handle); -LIBRARY_API unsigned int getIdamTotalDataBlockSize(int handle); +LIBRARY_API unsigned int getUdaTotalDataBlockSize(int handle); -LIBRARY_API int getIdamDataType(int handle); +LIBRARY_API int getUdaDataType(int handle); -LIBRARY_API int getIdamDataOpaqueType(int handle); +LIBRARY_API int getUdaDataOpaqueType(int handle); -LIBRARY_API void* getIdamDataOpaqueBlock(int handle); +LIBRARY_API void* getUdaDataOpaqueBlock(int handle); -LIBRARY_API int getIdamDataOpaqueCount(int handle); +LIBRARY_API int getUdaDataOpaqueCount(int handle); -LIBRARY_API void getIdamErrorModel(int handle, int* model, int* param_n, float* params); +LIBRARY_API void getUdaErrorModel(int handle, int* model, int* param_n, float* params); -LIBRARY_API int getIdamErrorType(int handle); +LIBRARY_API int getUdaErrorType(int handle); -LIBRARY_API int getIdamDataTypeId(const char* type); +LIBRARY_API int getUdaDataTypeId(const char* type); -LIBRARY_API int getIdamDataTypeSize(int type); +LIBRARY_API int getUdaDataTypeSize(int type); -LIBRARY_API void getIdamErrorModel(int handle, int* model, int* param_n, float* params); +LIBRARY_API void getUdaErrorModel(int handle, int* model, int* param_n, float* params); -LIBRARY_API int getIdamErrorAsymmetry(int handle); +LIBRARY_API int getUdaErrorAsymmetry(int handle); -LIBRARY_API int getIdamErrorModelId(const char* model); +LIBRARY_API int getUdaErrorModelId(const char* model); LIBRARY_API char* acc_getSyntheticData(int handle); @@ -125,161 +125,161 @@ LIBRARY_API void acc_setSyntheticData(int handle, char* data); LIBRARY_API void acc_setSyntheticDimData(int handle, int ndim, char* data); -LIBRARY_API char* getIdamSyntheticData(int handle); +LIBRARY_API char* getUdaSyntheticData(int handle); -LIBRARY_API char* getIdamData(int handle); +LIBRARY_API char* getUdaData(int handle); -LIBRARY_API void getIdamDataTdi(int handle, char* data); +LIBRARY_API void getUdaDataTdi(int handle, char* data); -LIBRARY_API char* getIdamAsymmetricError(int handle, int above); +LIBRARY_API char* getUdaAsymmetricError(int handle, int above); -LIBRARY_API char* getIdamDataErrLo(int handle); +LIBRARY_API char* getUdaDataErrLo(int handle); -LIBRARY_API char* getIdamDataErrHi(int handle); +LIBRARY_API char* getUdaDataErrHi(int handle); -LIBRARY_API int getIdamDataErrAsymmetry(int handle); +LIBRARY_API int getUdaDataErrAsymmetry(int handle); -LIBRARY_API void acc_setIdamDataErrAsymmetry(int handle, int asymmetry); +LIBRARY_API void acc_setUdaDataErrAsymmetry(int handle, int asymmetry); -LIBRARY_API void acc_setIdamDataErrType(int handle, int type); +LIBRARY_API void acc_setUdaDataErrType(int handle, int type); -LIBRARY_API void acc_setIdamDataErrLo(int handle, char* errlo); +LIBRARY_API void acc_setUdaDataErrLo(int handle, char* errlo); -LIBRARY_API char* getIdamDimErrLo(int handle, int ndim); +LIBRARY_API char* getUdaDimErrLo(int handle, int ndim); -LIBRARY_API char* getIdamDimErrHi(int handle, int ndim); +LIBRARY_API char* getUdaDimErrHi(int handle, int ndim); -LIBRARY_API int getIdamDimErrAsymmetry(int handle, int ndim); +LIBRARY_API int getUdaDimErrAsymmetry(int handle, int ndim); -LIBRARY_API void acc_setIdamDimErrAsymmetry(int handle, int ndim, int asymmetry); +LIBRARY_API void acc_setUdaDimErrAsymmetry(int handle, int ndim, int asymmetry); -LIBRARY_API void acc_setIdamDimErrType(int handle, int ndim, int type); +LIBRARY_API void acc_setUdaDimErrType(int handle, int ndim, int type); -LIBRARY_API void acc_setIdamDimErrLo(int handle, int ndim, char* errlo); +LIBRARY_API void acc_setUdaDimErrLo(int handle, int ndim, char* errlo); -LIBRARY_API char* getIdamError(int handle); +LIBRARY_API char* getUdaError(int handle); -LIBRARY_API void getIdamDoubleData(int handle, double* fp); +LIBRARY_API void getUdaDoubleData(int handle, double* fp); -LIBRARY_API void getIdamFloatData(int handle, float* fp); +LIBRARY_API void getUdaFloatData(int handle, float* fp); -LIBRARY_API void getIdamGenericData(int handle, void* data); +LIBRARY_API void getUdaGenericData(int handle, void* data); -LIBRARY_API void getIdamFloatAsymmetricError(int handle, int above, float* fp); +LIBRARY_API void getUdaFloatAsymmetricError(int handle, int above, float* fp); -LIBRARY_API void getIdamFloatError(int handle, float* fp); +LIBRARY_API void getUdaFloatError(int handle, float* fp); -LIBRARY_API void getIdamDBlock(int handle, DATA_BLOCK* db); +LIBRARY_API void getUdaDBlock(int handle, DATA_BLOCK* db); -LIBRARY_API DATA_BLOCK* getIdamDataBlock(int handle); +LIBRARY_API DATA_BLOCK* getUdaDataBlock(int handle); -LIBRARY_API const char* getIdamDataLabel(int handle); +LIBRARY_API const char* getUdaDataLabel(int handle); -LIBRARY_API void getIdamDataLabelTdi(int handle, char* label); +LIBRARY_API void getUdaDataLabelTdi(int handle, char* label); -LIBRARY_API const char* getIdamDataUnits(int handle); +LIBRARY_API const char* getUdaDataUnits(int handle); -LIBRARY_API void getIdamDataUnitsTdi(int handle, char* units); +LIBRARY_API void getUdaDataUnitsTdi(int handle, char* units); -LIBRARY_API const char* getIdamDataDesc(int handle); +LIBRARY_API const char* getUdaDataDesc(int handle); -LIBRARY_API void getIdamDataDescTdi(int handle, char* desc); +LIBRARY_API void getUdaDataDescTdi(int handle, char* desc); -LIBRARY_API int getIdamDimNum(int handle, int ndim); +LIBRARY_API int getUdaDimNum(int handle, int ndim); -LIBRARY_API int getIdamDimType(int handle, int ndim); +LIBRARY_API int getUdaDimType(int handle, int ndim); -LIBRARY_API int getIdamDimErrorType(int handle, int ndim); +LIBRARY_API int getUdaDimErrorType(int handle, int ndim); -LIBRARY_API int getIdamDimErrorAsymmetry(int handle, int ndim); +LIBRARY_API int getUdaDimErrorAsymmetry(int handle, int ndim); -LIBRARY_API void getIdamDimErrorModel(int handle, int ndim, int* model, int* param_n, float* params); +LIBRARY_API void getUdaDimErrorModel(int handle, int ndim, int* model, int* param_n, float* params); -LIBRARY_API char* getIdamSyntheticDimData(int handle, int ndim); +LIBRARY_API char* getUdaSyntheticDimData(int handle, int ndim); -LIBRARY_API char* getIdamDimData(int handle, int ndim); +LIBRARY_API char* getUdaDimData(int handle, int ndim); -LIBRARY_API const char* getIdamDimLabel(int handle, int ndim); +LIBRARY_API const char* getUdaDimLabel(int handle, int ndim); -LIBRARY_API const char* getIdamDimUnits(int handle, int ndim); +LIBRARY_API const char* getUdaDimUnits(int handle, int ndim); -LIBRARY_API void getIdamDimLabelTdi(int handle, int ndim, char* label); +LIBRARY_API void getUdaDimLabelTdi(int handle, int ndim, char* label); -LIBRARY_API void getIdamDimUnitsTdi(int handle, int ndim, char* units); +LIBRARY_API void getUdaDimUnitsTdi(int handle, int ndim, char* units); -LIBRARY_API void getIdamDoubleDimData(int handle, int ndim, double* fp); +LIBRARY_API void getUdaDoubleDimData(int handle, int ndim, double* fp); -LIBRARY_API void getIdamFloatDimData(int handle, int ndim, float* fp); +LIBRARY_API void getUdaFloatDimData(int handle, int ndim, float* fp); -LIBRARY_API void getIdamGenericDimData(int handle, int ndim, void* data); +LIBRARY_API void getUdaGenericDimData(int handle, int ndim, void* data); -LIBRARY_API DIMS* getIdamDimBlock(int handle, int ndim); +LIBRARY_API DIMS* getUdaDimBlock(int handle, int ndim); -LIBRARY_API char* getIdamDimAsymmetricError(int handle, int ndim, int above); +LIBRARY_API char* getUdaDimAsymmetricError(int handle, int ndim, int above); -LIBRARY_API char* getIdamDimError(int handle, int ndim); +LIBRARY_API char* getUdaDimError(int handle, int ndim); -LIBRARY_API void getIdamFloatDimAsymmetricError(int handle, int ndim, int above, float* fp); +LIBRARY_API void getUdaFloatDimAsymmetricError(int handle, int ndim, int above, float* fp); -LIBRARY_API void getIdamFloatDimError(int handle, int ndim, float* fp); +LIBRARY_API void getUdaFloatDimError(int handle, int ndim, float* fp); -LIBRARY_API DATA_SYSTEM* getIdamDataSystem(int handle); +LIBRARY_API DATA_SYSTEM* getUdaDataSystem(int handle); -LIBRARY_API SYSTEM_CONFIG* getIdamSystemConfig(int handle); +LIBRARY_API SYSTEM_CONFIG* getUdaSystemConfig(int handle); -LIBRARY_API DATA_SOURCE* getIdamDataSource(int handle); +LIBRARY_API DATA_SOURCE* getUdaDataSource(int handle); -LIBRARY_API SIGNAL* getIdamSignal(int handle); +LIBRARY_API SIGNAL* getUdaSignal(int handle); -LIBRARY_API SIGNAL_DESC* getIdamSignalDesc(int handle); +LIBRARY_API SIGNAL_DESC* getUdaSignalDesc(int handle); -LIBRARY_API const char* getIdamFileFormat(int handle); +LIBRARY_API const char* getUdaFileFormat(int handle); -LIBRARY_API void initIdamDataBlock(DATA_BLOCK* str); +LIBRARY_API void initUdaDataBlock(DATA_BLOCK* str); -LIBRARY_API void initIdamRequestBlock(REQUEST_BLOCK* str); +LIBRARY_API void initUdaRequestBlock(REQUEST_BLOCK* str); LIBRARY_API int idamDataCheckSum(void* data, int data_n, int type); -LIBRARY_API int getIdamDataCheckSum(int handle); +LIBRARY_API int getUdaDataCheckSum(int handle); -LIBRARY_API int getIdamDimDataCheckSum(int handle, int ndim); +LIBRARY_API int getUdaDimDataCheckSum(int handle, int ndim); -LIBRARY_API void lockIdamThread(CLIENT_FLAGS* client_flags); +LIBRARY_API void lockUdaThread(CLIENT_FLAGS* client_flags); LIBRARY_API void unlockUdaThread(CLIENT_FLAGS* client_flags); -LIBRARY_API void freeIdamThread(CLIENT_FLAGS* client_flags); +LIBRARY_API void freeUdaThread(CLIENT_FLAGS* client_flags); -LIBRARY_API int getIdamThreadLastHandle(); +LIBRARY_API int getUdaThreadLastHandle(); -LIBRARY_API void putIdamThreadLastHandle(int handle); +LIBRARY_API void putUdaThreadLastHandle(int handle); -LIBRARY_API int getIdamMaxThreadCount(); +LIBRARY_API int getUdaMaxThreadCount(); -LIBRARY_API SERVER_BLOCK getIdamThreadServerBlock(); +LIBRARY_API SERVER_BLOCK getUdaThreadServerBlock(); -LIBRARY_API CLIENT_BLOCK getIdamThreadClientBlock(); +LIBRARY_API CLIENT_BLOCK getUdaThreadClientBlock(); -LIBRARY_API void putIdamThreadServerBlock(SERVER_BLOCK* str); +LIBRARY_API void putUdaThreadServerBlock(SERVER_BLOCK* str); -LIBRARY_API void putIdamThreadClientBlock(CLIENT_BLOCK* str); +LIBRARY_API void putUdaThreadClientBlock(CLIENT_BLOCK* str); -LIBRARY_API int setIdamDataTree(int handle); +LIBRARY_API int setUdaDataTree(int handle); // Return a specific data tree -LIBRARY_API NTREE* getIdamDataTree(int handle); +LIBRARY_API NTREE* getUdaDataTree(int handle); // Return a user defined data structure definition -LIBRARY_API USERDEFINEDTYPE* getIdamUserDefinedType(int handle); +LIBRARY_API USERDEFINEDTYPE* getUdaUserDefinedType(int handle); -LIBRARY_API USERDEFINEDTYPELIST* getIdamUserDefinedTypeList(int handle); +LIBRARY_API USERDEFINEDTYPELIST* getUdaUserDefinedTypeList(int handle); -LIBRARY_API LOGMALLOCLIST* getIdamLogMallocList(int handle); +LIBRARY_API LOGMALLOCLIST* getUdaLogMallocList(int handle); -LIBRARY_API NTREE* findIdamNTreeStructureDefinition(NTREE* node, const char* target); +LIBRARY_API NTREE* findUdaNTreeStructureDefinition(NTREE* node, const char* target); #ifdef __cplusplus } diff --git a/source/include/client.h b/source/include/client.h index a5525052..05793474 100644 --- a/source/include/client.h +++ b/source/include/client.h @@ -13,8 +13,8 @@ extern "C" { #endif #ifdef FATCLIENT -# define idamClient idamClientFat -# define idamFreeAll idamFreeAllFat +# define udaClient udaClientFat +# define udaFreeAll udaFreeAllFat # define udaClientFlags udaClientFlagsFat #endif @@ -74,37 +74,37 @@ LIBRARY_API const char* udaGetBuildVersion(); */ LIBRARY_API const char* udaGetBuildDate(); -LIBRARY_API const char* getIdamServerHost(); +LIBRARY_API const char* getUdaServerHost(); -LIBRARY_API int getIdamServerPort(); +LIBRARY_API int getUdaServerPort(); -LIBRARY_API int getIdamServerSocket(); +LIBRARY_API int getUdaServerSocket(); -LIBRARY_API const char* getIdamClientDOI(); +LIBRARY_API const char* getUdaClientDOI(); -LIBRARY_API const char* getIdamServerDOI(); +LIBRARY_API const char* getUdaServerDOI(); -LIBRARY_API const char* getIdamClientOSName(); +LIBRARY_API const char* getUdaClientOSName(); -LIBRARY_API const char* getIdamServerOSName(); +LIBRARY_API const char* getUdaServerOSName(); -LIBRARY_API int getIdamClientVersion(); +LIBRARY_API int getUdaClientVersion(); -LIBRARY_API int getIdamServerVersion(); +LIBRARY_API int getUdaServerVersion(); -LIBRARY_API int getIdamServerErrorCode(); +LIBRARY_API int getUdaServerErrorCode(); -LIBRARY_API const char* getIdamServerErrorMsg(); +LIBRARY_API const char* getUdaServerErrorMsg(); -LIBRARY_API int getIdamServerErrorStackSize(); +LIBRARY_API int getUdaServerErrorStackSize(); -LIBRARY_API int getIdamServerErrorStackRecordType(int record); +LIBRARY_API int getUdaServerErrorStackRecordType(int record); -LIBRARY_API int getIdamServerErrorStackRecordCode(int record); +LIBRARY_API int getUdaServerErrorStackRecordCode(int record); -LIBRARY_API const char* getIdamServerErrorStackRecordLocation(int record); +LIBRARY_API const char* getUdaServerErrorStackRecordLocation(int record); -LIBRARY_API const char* getIdamServerErrorStackRecordMsg(int record); +LIBRARY_API const char* getUdaServerErrorStackRecordMsg(int record); LIBRARY_API void closeAllConnections(); diff --git a/source/include/clientAPI.h b/source/include/clientAPI.h index 6fff9982..648682b6 100644 --- a/source/include/clientAPI.h +++ b/source/include/clientAPI.h @@ -8,14 +8,14 @@ extern "C" { #endif -LIBRARY_API int idamClientAPI(const char* file, const char* signal, int pass, int exp_number); -LIBRARY_API int idamClientFileAPI(const char* file, const char* signal, const char* format); -LIBRARY_API int idamClientFileAPI2(const char* file, const char* format, const char* owner, const char* signal, +LIBRARY_API int udaClientAPI(const char* file, const char* signal, int pass, int exp_number); +LIBRARY_API int udaClientFileAPI(const char* file, const char* signal, const char* format); +LIBRARY_API int udaClientFileAPI2(const char* file, const char* format, const char* owner, const char* signal, int exp_number, int pass); -LIBRARY_API int idamClientTestAPI(const char* file, const char* signal, int pass, int exp_number); +LIBRARY_API int udaClientTestAPI(const char* file, const char* signal, int pass, int exp_number); #ifdef __cplusplus } #endif -#endif // UDA_CLIENT_CLIENTAPI_H \ No newline at end of file +#endif // UDA_CLIENT_CLIENTAPI_H diff --git a/source/clientserver/errorLog.h b/source/include/errorLog.h similarity index 100% rename from source/clientserver/errorLog.h rename to source/include/errorLog.h diff --git a/source/include/legacy.h b/source/include/legacy.h index 8859f19a..41509cf6 100644 --- a/source/include/legacy.h +++ b/source/include/legacy.h @@ -5,6 +5,12 @@ # warning "using UDA legacy name mappings" +/* + * definitions from pluginStructs.h + */ + +# define IDAM_PLUGIN_INTERFACE UDA_PLUGIN_INTERFACE + /* * definitions from udaGetAPI.h */ @@ -29,6 +35,20 @@ int idamGetBatchAPIWithHost(const char** uda_signals, const char** sources, int return udGaetBatchAPIWithHost(uda_signals, sources, count, handles, host, port); } +/* + * definitions from udaPutAPI.h* + */ + +inline int idamPutListAPI(const char* putInstruction, PUTDATA_BLOCK_LIST* inPutDataBlockList) +{ + return udaPutListAPI(putInstruction, inPutDataBlockList); +} + +inline int idamPutAPI(const char* putInstruction, PUTDATA_BLOCK* inPutData) +{ + return udaPutAPI(putInstruction, inPutData); +} + /* * definitions from client.h */ @@ -132,11 +152,22 @@ inline char* getIdamServerErrorStackRecordMsg(int record) return udaGetServerErrorStackRecordMsg(record); } +// TODO: where did these come from? + # define setUserDefinedTypeList udaSetUserDefinedTypeList # define setLogMallocList udaSetLogMallocList /* - * defines from accAPI.h + * definitions from clientMDS.h + */ + +inline int idamClientMDS(const char* server, const char* tree, const char* node, int treenum) +{ + return udaClientMDS(server, tree, node, treenum); +} + +/* + * definitions from accAPI.h */ /* @@ -153,23 +184,22 @@ inline char* getIdamServerErrorStackRecordMsg(int record) inline int acc_growIdamDataBlocks() { - return acc_growUdaDataBlocks(); + return acc_growUdaDataBlocks(); } inline int acc_getIdamNewDataHandle() { - return acc_getUdaNewDataHandle(); + return acc_getUdaNewDataHandle(); } - inline void setIdamPrivateFlag(unsigned int flag) { - return setUdaPrivateFlag(flag); + return setUdaPrivateFlag(flag); } inline void resetIdamPrivateFlag(unsigned int flag) { - return resetUdaPrivateFlag(flag); + return resetUdaPrivateFlag(flag); } inline void setIdamClientFlag(unsigned int flag) @@ -199,12 +229,12 @@ inline void resetIdamProperty(const char* property) inline void resetIdamProperties() { - return resetUdaProperties(); + return resetUdaProperties(); } inline CLIENT_BLOCK saveIdamProperties() { - return saveUdaProperties(); + return saveUdaProperties(); } inline void restoreIdamProperties(CLIENT_BLOCK cb) @@ -214,15 +244,15 @@ inline void restoreIdamProperties(CLIENT_BLOCK cb) inline CLIENT_BLOCK* getIdamProperties(int handle) { - return getUdaProperties(handle); + return getUdaProperties(handle); } inline CLIENT_BLOCK* getIdamDataProperties(int handle) { - return getUdaDataProperties(handle); + return getUdaDataProperties(handle); } -#ifndef __APPLE__ +# ifndef __APPLE__ inline int getIdamMemoryFree() { @@ -234,7 +264,7 @@ inline int getIdamMemoryUsed() return getUdaMemoryUsed() } -#endif +# endif inline void putIdamErrorModel(int handle, int model, int param_n, const float* params) { @@ -253,17 +283,17 @@ inline void putIdamServer(const char* host, int port) inline void putIdamServerHost(const char* host) { - return putUdaServerHost(host); + return putUdaServerHost(host); } inline void putIdamServerPort(int port) { - return putUdaServerPort(port); + return putUdaServerPort(port); } inline void putIdamServerSocket(int socket) { - return putUdaServerSocket(socket); + return putUdaServerSocket(socket); } inline void getIdamServer(const char** host, int* port, int* socket) @@ -273,77 +303,77 @@ inline void getIdamServer(const char** host, int* port, int* socket) inline int getIdamErrorCode(int handle) { - return getUdaErrorCode(handle); + return getUdaErrorCode(handle); } inline const char* getIdamErrorMsg(int handle) { - return getUdaErrorMsg(handle); + return getUdaErrorMsg(handle); } inline int getIdamSourceStatus(int handle) { - return getUdaSourceStatus(handle); + return getUdaSourceStatus(handle); } inline int getIdamSignalStatus(int handle) { - return getUdaSignalStatus(handle); + return getUdaSignalStatus(handle); } inline int getIdamDataStatus(int handle) { - return getUdaDataStatus(handle); + return getUdaDataStatus(handle); } inline int getIdamLastHandle() { - return getUdaLastHandle(); + return getUdaLastHandle(); } inline int getIdamDataNum(int handle) { - return getUdaDataNum(handle); + return getUdaDataNum(handle); } inline int getIdamRank(int handle) { - return getUdaRank(handle); + return getUdaRank(handle); } inline int getIdamOrder(int handle) { - return getUdaOrder(handle); + return getUdaOrder(handle); } inline unsigned int getIdamCachePermission(int handle) { - return getUdaCachePermission(handle); + return getUdaCachePermission(handle); } inline unsigned int getIdamTotalDataBlockSize(int handle) { - return getUdaTotalDataBlockSize(handle); + return getUdaTotalDataBlockSize(handle); } inline int getIdamDataType(int handle) { - return getUdaDataType(handle); + return getUdaDataType(handle); } inline int getIdamDataOpaqueType(int handle) { - return getUdaDataOpaqueType(handle); + return getUdaDataOpaqueType(handle); } inline void* getIdamDataOpaqueBlock(int handle) { - return getUdaDataOpaqueBlock(handle); + return getUdaDataOpaqueBlock(handle); } inline int getIdamDataOpaqueCount(int handle) { - return getUdaDataOpaqueCount(handle); + return getUdaDataOpaqueCount(handle); } inline void getIdamErrorModel(int handle, int* model, int* param_n, float* params) @@ -353,17 +383,17 @@ inline void getIdamErrorModel(int handle, int* model, int* param_n, float* param inline int getIdamErrorType(int handle) { - return getUdaErrorType(handle); + return getUdaErrorType(handle); } inline int getIdamDataTypeId(const char* type) { - return getUdaDataTypeId(type); + return getUdaDataTypeId(type); } inline int getIdamDataTypeSize(int type) { - return getUdaDataTypeSize(type); + return getUdaDataTypeSize(type); } inline void getIdamErrorModel(int handle, int* model, int* param_n, float* params) @@ -373,22 +403,22 @@ inline void getIdamErrorModel(int handle, int* model, int* param_n, float* param inline int getIdamErrorAsymmetry(int handle) { - return getUdaErrorAsymmetry(handle); + return getUdaErrorAsymmetry(handle); } inline int getIdamErrorModelId(const char* model) { - return getUdaErrorModelId(model); + return getUdaErrorModelId(model); } inline char* getIdamSyntheticData(int handle) { - return getUdaSyntheticData(handle); + return getUdaSyntheticData(handle); } inline char* getIdamData(int handle) { - return getUdaData(handle); + return getUdaData(handle); } inline void getIdamDataTdi(int handle, char* data) @@ -403,17 +433,17 @@ inline char* getIdamAsymmetricError(int handle, int above) inline char* getIdamDataErrLo(int handle) { - return getUdaDataErrLo(handle); + return getUdaDataErrLo(handle); } inline char* getIdamDataErrHi(int handle) { - return getUdaDataErrHi(handle); + return getUdaDataErrHi(handle); } inline int getIdamDataErrAsymmetry(int handle) { - return getUdaDataErrAsymmetry(handle); + return getUdaDataErrAsymmetry(handle); } inline void acc_setIdamDataErrAsymmetry(int handle, int asymmetry) @@ -463,7 +493,7 @@ inline void acc_setIdamDimErrLo(int handle, int ndim, char* errlo) inline char* getIdamError(int handle) { - return getUdaError(handle); + return getUdaError(handle); } inline void getIdamDoubleData(int handle, double* fp) @@ -498,12 +528,12 @@ inline void getIdamDBlock(int handle, DATA_BLOCK* db) inline DATA_BLOCK* getIdamDataBlock(int handle) { - return getUdaDataBlock(handle); + return getUdaDataBlock(handle); } inline const char* getIdamDataLabel(int handle) { - return getUdaDataLabel(handle); + return getUdaDataLabel(handle); } inline void getIdamDataLabelTdi(int handle, char* label) @@ -513,7 +543,7 @@ inline void getIdamDataLabelTdi(int handle, char* label) inline const char* getIdamDataUnits(int handle) { - return getUdaDataUnits(handle); + return getUdaDataUnits(handle); } inline void getIdamDataUnitsTdi(int handle, char* units) @@ -523,7 +553,7 @@ inline void getIdamDataUnitsTdi(int handle, char* units) inline const char* getIdamDataDesc(int handle) { - return getUdaDataDesc(handle); + return getUdaDataDesc(handle); } inline void getIdamDataDescTdi(int handle, char* desc) @@ -628,47 +658,47 @@ inline void getIdamFloatDimError(int handle, int ndim, float* fp) inline DATA_SYSTEM* getIdamDataSystem(int handle) { - return getUdaDataSystem(handle); + return getUdaDataSystem(handle); } inline SYSTEM_CONFIG* getIdamSystemConfig(int handle) { - return getUdaSystemConfig(handle); + return getUdaSystemConfig(handle); } inline DATA_SOURCE* getIdamDataSource(int handle) { - return getUdaDataSource(handle); + return getUdaDataSource(handle); } inline SIGNAL* getIdamSignal(int handle) { - return getUdaSignal(handle); + return getUdaSignal(handle); } inline SIGNAL_DESC* getIdamSignalDesc(int handle) { - return getUdaSignalDesc(handle); + return getUdaSignalDesc(handle); } inline const char* getIdamFileFormat(int handle) { - return getUdaFileFormat(handle); + return getUdaFileFormat(handle); } inline void initIdamDataBlock(DATA_BLOCK* str) { - return initUdaDataBlock(str); + return initUdaDataBlock(str); } inline void initIdamRequestBlock(REQUEST_BLOCK* str) { - return initUdaRequestBlock(str); + return initUdaRequestBlock(str); } /* - * DELETE - * / + * DELETE ? + */ inline int idamDataCheckSum(void* data, int data_n, int type) { udaDataCheckSum(data, data_n, type); @@ -676,7 +706,7 @@ inline int idamDataCheckSum(void* data, int data_n, int type) inline int getIdamDataCheckSum(int handle) { - return getUdaDataCheckSum(handle); + return getUdaDataCheckSum(handle); } inline int getIdamDimDataCheckSum(int handle, int ndim) @@ -686,7 +716,7 @@ inline int getIdamDimDataCheckSum(int handle, int ndim) inline void lockIdamThread() { - return lockUdaThread(); + return lockUdaThread(); } inline void unlockIdamThread() @@ -696,7 +726,7 @@ inline void unlockIdamThread() inline void freeIdamThread() { - return freeUdaThread(); + return freeUdaThread(); } inline int getIdamThreadLastHandle() @@ -706,7 +736,7 @@ inline int getIdamThreadLastHandle() inline void putIdamThreadLastHandle(int handle) { - return putUdaThreadLastHandle(handle); + return putUdaThreadLastHandle(handle); } inline int getIdamMaxThreadCount() @@ -724,49 +754,127 @@ inline CLIENT_BLOCK getIdamThreadClientBlock() return getUdaThreadClientBlock() } -inline void putIdamThreadServerBlock(SERVER_BLOCK* str) +inline void putIdamThreadServerBlock(SERVER_BLOCK * str) { - return putUdaThreadServerBlock(str); + return putUdaThreadServerBlock(str); } -inline void putIdamThreadClientBlock(CLIENT_BLOCK* str) +inline void putIdamThreadClientBlock(CLIENT_BLOCK * str) { - return putUdaThreadClientBlock(str); + return putUdaThreadClientBlock(str); } inline int setIdamDataTree(int handle) { - return setUdaDataTree(handle); + return setUdaDataTree(handle); } // Return a specific data tree inline NTREE* getIdamDataTree(int handle) { - return getUdaDataTree(handle); + return getUdaDataTree(handle); } // Return a user defined data structure definition inline USERDEFINEDTYPE* getIdamUserDefinedType(int handle) { - return getUdaUserDefinedType(handle); + return getUdaUserDefinedType(handle); } inline USERDEFINEDTYPELIST* getIdamUserDefinedTypeList(int handle) { - return getUdaUserDefinedTypeList(handle); + return getUdaUserDefinedTypeList(handle); } inline LOGMALLOCLIST* getIdamLogMallocList(int handle) { - return getUdaLogMallocList(handle); + return getUdaLogMallocList(handle); } -inline NTREE* findIdamNTreeStructureDefinition(NTREE* node, const char* target) +inline NTREE* findIdamNTreeStructureDefinition(NTREE * node, const char* target) { return findUdaNTreeStructureDefinition(node, target) } +/* + * definitions from clientAPI.h + */ + +inline int idamClientAPI(const char* file, const char* signal, int pass, int exp_number) +{ + return udaClientAPI(file, signal, pass, exp_number); +} + +inline int idamClientFileAPI(const char* file, const char* signal, const char* format) +{ + return udaClientFileAPI(file, signal, format); +} + +inline int idamClientFileAPI2(const char* file, const char* format, const char* owner, const char* signal, + int exp_number, int pass) +{ + return udaClientFileAPI2(file, format, owner, signal, exp_number, pass); +} + +inline int idamClientTestAPI(const char* file, const char* signal, int pass, int exp_number) +{ + return udaClientTestAPI(file, signal, pass, exp_number); +} + +/* + * definitions from accessors.h + */ + +// LIBRARY_API NTREE* findNTreeStructureComponent2(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target, +// const char** lastname); +// LIBRARY_API NTREE* findNTreeStructure2(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target, +// const char** lastname); +// LIBRARY_API NTREE* findNTreeStructureComponent(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target); +// LIBRARY_API NTREE* findNTreeChildStructureComponent(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target); +// LIBRARY_API NTREE* findNTreeStructure(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target); +// LIBRARY_API NTREE* findNTreeChildStructure(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target); +// LIBRARY_API NTREE* findNTreeStructureMalloc(NTREE* ntree, void* data); +// LIBRARY_API NTREE* findNTreeStructureDefinition(NTREE* ntree, const char* target); +// LIBRARY_API NTREE* findNTreeStructureComponentDefinition(NTREE* tree, const char* target); + +inline NTREE* idam_findNTreeStructureClass(NTREE * tree, int cls) +{ + return uda_findNTreeStructureClass(tree, cls); +} + +inline int idam_maxCountVlenStructureArray(NTREE * tree, const char* target, int reset) +{ + return uda_maxCountVlenStructureArray(tree, target, reset); +} + +inline int idam_regulariseVlenStructures(LOGMALLOCLIST * logmalloclist, NTREE * tree, + USERDEFINEDTYPELIST * userdefinedtypelist, const char* target, + unsigned int count) +{ + return uda_regulariseVlenStructures(LOGMALLOCLIST * logmalloclist, NTREE * tree, + USERDEFINEDTYPELIST * userdefinedtypelist, const char* target, + unsigned int count); +} + +inline int idam_regulariseVlenData(LOGMALLOCLIST * logmalloclist, NTREE * tree, + USERDEFINEDTYPELIST * userdefinedtypelist) +{ + return uda_regulariseVlenData(LOGMALLOCLIST * logmalloclist, NTREE * tree, + USERDEFINEDTYPELIST * userdefinedtypelist); +} +// +// LIBRARY_API int getNodeStructureDataCount(LOGMALLOCLIST* logmalloclist, NTREE* ntree); +// LIBRARY_API int getNodeStructureDataSize(LOGMALLOCLIST* logmalloclist, NTREE* ntree); +// LIBRARY_API int getNodeStructureDataRank(LOGMALLOCLIST* logmalloclist, NTREE* ntree); +// LIBRARY_API const char* getNodeStructureDataDataType(LOGMALLOCLIST* logmalloclist, NTREE* ntree); +// LIBRARY_API void* getNodeStructureData(NTREE* ntree); +// LIBRARY_API void printImage(const char* image, int imagecount); +// LIBRARY_API void defineField(COMPOUNDFIELD* field, const char* name, const char* desc, int* offset, +// unsigned short type_id); +// LIBRARY_API void defineCompoundField(COMPOUNDFIELD* field, const char* type, const char* name, char* desc, int +// offset, +// int size); #endif // UDA_LEGACY_H diff --git a/source/logging/logging.h b/source/include/logging.h similarity index 100% rename from source/logging/logging.h rename to source/include/logging.h diff --git a/source/include/udaGetAPI.h b/source/include/udaGetAPI.h index 1b8be7c0..01305d98 100644 --- a/source/include/udaGetAPI.h +++ b/source/include/udaGetAPI.h @@ -8,16 +8,16 @@ extern "C" { #endif #ifdef FATCLIENT -# define idamGetAPI idamGetAPIFat -# define idamGetBatchAPI idamGetBatchAPIFat -# define idamGetAPIWithHost idamGetAPIWithHostFat -# define idamGetBatchAPIWithHost idamGetBatchAPIWithHostFat +# define udaGetAPI udaGetAPIFat +# define udaGetBatchAPI udaGetBatchAPIFat +# define udaGetAPIWithHost udaGetAPIWithHostFat +# define udaGetBatchAPIWithHost udaGetBatchAPIWithHostFat #endif -LIBRARY_API int idamGetAPI(const char* data_object, const char* data_source); -LIBRARY_API int idamGetBatchAPI(const char** uda_signals, const char** sources, int count, int* handles); -LIBRARY_API int idamGetAPIWithHost(const char* data_object, const char* data_source, const char* host, int port); -LIBRARY_API int idamGetBatchAPIWithHost(const char** uda_signals, const char** sources, int count, int* handles, +LIBRARY_API int udaGetAPI(const char* data_object, const char* data_source); +LIBRARY_API int udaGetBatchAPI(const char** uda_signals, const char** sources, int count, int* handles); +LIBRARY_API int udaGetAPIWithHost(const char* data_object, const char* data_source, const char* host, int port); +LIBRARY_API int udaGetBatchAPIWithHost(const char** uda_signals, const char** sources, int count, int* handles, const char* host, int port); #ifdef __cplusplus diff --git a/source/include/udaPutAPI.h b/source/include/udaPutAPI.h index 654a2967..5470e035 100644 --- a/source/include/udaPutAPI.h +++ b/source/include/udaPutAPI.h @@ -5,16 +5,16 @@ #include "udaStructs.h" #ifdef FATCLIENT -# define idamPutListAPI idamPutListAPIFat -# define idamPutAPI idamPutAPIFat +# define udaPutListAPI udaPutListAPIFat +# define udaPutAPI udaPutAPIFat #endif #ifdef __cplusplus extern "C" { #endif -LIBRARY_API int idamPutListAPI(const char* putInstruction, PUTDATA_BLOCK_LIST* inPutDataBlockList); -LIBRARY_API int idamPutAPI(const char* putInstruction, PUTDATA_BLOCK* inPutData); +LIBRARY_API int udaPutListAPI(const char* putInstruction, PUTDATA_BLOCK_LIST* inPutDataBlockList); +LIBRARY_API int udaPutAPI(const char* putInstruction, PUTDATA_BLOCK* inPutData); #ifdef __cplusplus }