From 4af76f73102e5682b4c500aac0d1a745ff24a3fc Mon Sep 17 00:00:00 2001 From: sdixon Date: Fri, 26 Jan 2024 10:05:53 +0000 Subject: [PATCH] fixing pyuda build and renaming missed init struct api functions --- source/c_api/accAPI.cpp | 32 +++--- source/c_api/clientAPI.cpp | 4 +- source/c_api/clientMDS.cpp | 4 +- source/c_api/udaGetAPI.cpp | 4 +- source/c_api/udaPutAPI.cpp | 8 +- source/cache/cache.cpp | 2 +- source/client/connection.cpp | 2 +- source/client/makeClientRequestBlock.cpp | 2 +- source/client/udaClient.cpp | 10 +- source/client2/client.cpp | 14 +-- source/client2/handle.cpp | 2 +- source/client2/make_request_block.cpp | 2 +- source/clientserver/allocData.cpp | 2 +- source/clientserver/initStructs.cpp | 36 +++---- source/clientserver/nameValueSubstitution.cpp | 4 +- source/clientserver/protocol.cpp | 4 +- source/clientserver/protocol2.cpp | 12 +-- source/clientserver/udaStructs.cpp | 4 +- source/include/accAPI.h | 4 +- source/include/initStructs.h | 30 +++--- .../plugins/bytes/readBytesNonOptimally.cpp | 2 +- source/plugins/hdf5/readHDF58.cpp | 4 +- source/plugins/help/help_plugin.cpp | 2 +- source/plugins/testplugin/testplugin.cpp | 42 ++++---- source/plugins/uda/uda_plugin.cpp | 2 +- source/plugins/udaPlugin.cpp | 30 +++--- source/plugins/viewport/viewport.cpp | 4 +- source/server/fatServer.cpp | 12 +-- source/server/serverGetData.cpp | 22 ++--- source/server/serverPlugin.cpp | 8 +- source/server/serverSubsetData.cpp | 8 +- source/server/udaLegacyServer.cpp | 20 ++-- source/server/udaServer.cpp | 22 ++--- source/server2/get_data.cpp | 22 ++--- source/server2/server.cpp | 20 ++-- source/server2/server_plugin.cpp | 6 +- source/server2/server_subset_data.cpp | 8 +- source/wrappers/c++/client.cpp | 8 +- source/wrappers/idl/idam_dlm.c | 4 +- .../python/pyuda/cpyuda/capnp_tree.pyx | 4 +- .../wrappers/python/pyuda/cpyuda/client.pyx | 48 ++++----- source/wrappers/python/pyuda/cpyuda/dim.pyx | 16 +-- .../wrappers/python/pyuda/cpyuda/result.pyx | 50 +++++----- .../python/pyuda/cpyuda/tree_node.pyx | 24 ++--- source/wrappers/python/pyuda/cpyuda/uda.pxd | 98 +++++++++---------- 45 files changed, 334 insertions(+), 334 deletions(-) diff --git a/source/c_api/accAPI.cpp b/source/c_api/accAPI.cpp index 5b9b8eb7..f50efdea 100644 --- a/source/c_api/accAPI.cpp +++ b/source/c_api/accAPI.cpp @@ -133,8 +133,8 @@ void udaLockThread() idamState[i].socket = -1; idamState[i].lastHandle = -1; // initEnvironment(&(idamState[i].environment)); - initClientBlock(&(idamState[i].client_block), 0, ""); - initServerBlock(&(idamState[i].server_block), 0); + udaInitClientBlock(&(idamState[i].client_block), 0, ""); + udaInitServerBlock(&(idamState[i].server_block), 0); threadList[i] = 0; // and the thread identifiers } } @@ -212,8 +212,8 @@ void udaFreeThread() idamState[threadCount].socket = -1; idamState[threadCount].lastHandle = -1; // initEnvironment(&(idamState[threadCount].environment)); - initClientBlock(&(idamState[threadCount].client_block), 0, ""); - initServerBlock(&(idamState[threadCount].server_block), 0); + udaInitClientBlock(&(idamState[threadCount].client_block), 0, ""); + udaInitServerBlock(&(idamState[threadCount].server_block), 0); threadList[threadCount] = 0; } udaUnlockThread(); @@ -273,7 +273,7 @@ int udaGrowDataBlocks() } data_blocks.push_back({}); - initDataBlock(&data_blocks.back()); + udaInitDataBlock(&data_blocks.back()); data_blocks.back().handle = data_blocks.size() - 1; udaPutThreadLastHandle(data_blocks.size() - 1); @@ -302,7 +302,7 @@ int udaGetNewDataHandle() udaFree(newHandleIndex); } else { // Application has responsibility for freeing heap in the Data Block - initDataBlock(&data_blocks[newHandleIndex]); + udaInitDataBlock(&data_blocks[newHandleIndex]); } data_blocks[newHandleIndex].handle = newHandleIndex; return newHandleIndex; @@ -311,10 +311,10 @@ int udaGetNewDataHandle() if ((newHandleIndex = findNewHandleIndex()) < 0) { // Search for an unused handle or issue a new one newHandleIndex = data_blocks.size(); data_blocks.push_back({}); - initDataBlock(&data_blocks[newHandleIndex]); + udaInitDataBlock(&data_blocks[newHandleIndex]); data_blocks[newHandleIndex].handle = newHandleIndex; } else { - initDataBlock(&data_blocks[newHandleIndex]); + udaInitDataBlock(&data_blocks[newHandleIndex]); data_blocks[newHandleIndex].handle = newHandleIndex; } @@ -3650,15 +3650,15 @@ const char* udaGetFileFormat(int handle) //----------------------------------------------------------------------------------------------------------- // Various Utilities -void udaInitDataBlock(DATA_BLOCK* str) -{ - initDataBlock(str); -} +// void udaInitDataBlock(DATA_BLOCK* str) +// { +// udaInitDataBlock(str); +// } -void udaInitRequestBlock(REQUEST_BLOCK* str) -{ - initRequestBlock(str); -} +// void udaInitRequestBlock(REQUEST_BLOCK* str) +// { +// udaInitRequestBlock(str); +// } int udaDataCheckSum(void* data, int data_n, int type) { diff --git a/source/c_api/clientAPI.cpp b/source/c_api/clientAPI.cpp index a1b53237..9b3a94b8 100644 --- a/source/c_api/clientAPI.cpp +++ b/source/c_api/clientAPI.cpp @@ -33,7 +33,7 @@ int udaClientAPI(const char* file, const char* signal, int pass, int exp_number) //------------------------------------------------------------------------- // Initialise the Client Data Request Structure - initRequestBlock(&request_block); + udaInitRequestBlock(&request_block); //------------------------------------------------------------------------------ // Build the Request Data Block (Version and API dependent) @@ -107,7 +107,7 @@ int udaClientFileAPI(const char* file, const char* signal, const char* format) //------------------------------------------------------------------------- // Initialise the Client Data Request Structure - initRequestBlock(&request_block); + udaInitRequestBlock(&request_block); //------------------------------------------------------------------------------ // Build the Request Data Block (Version and API dependent) diff --git a/source/c_api/clientMDS.cpp b/source/c_api/clientMDS.cpp index 02ce691a..5aa0852a 100644 --- a/source/c_api/clientMDS.cpp +++ b/source/c_api/clientMDS.cpp @@ -32,12 +32,12 @@ int udaClientMDS(const char* server, const char* tree, const char* node, int tre // Passed Args REQUEST_BLOCK request_block; - initRequestBlock(&request_block); + udaInitRequestBlock(&request_block); request_block.num_requests = 1; request_block.requests = (REQUEST_DATA*)malloc(sizeof(REQUEST_DATA)); auto request = &request_block.requests[0]; - initRequestData(request); + udaInitRequestData(request); request->request = REQUEST_READ_MDS; request->exp_number = treenum; diff --git a/source/c_api/udaGetAPI.cpp b/source/c_api/udaGetAPI.cpp index 17a29a3c..e02bbafd 100644 --- a/source/c_api/udaGetAPI.cpp +++ b/source/c_api/udaGetAPI.cpp @@ -202,7 +202,7 @@ int udaGetAPIWithHost(const char* data_object, const char* data_source, const ch // Initialise the Client Data Request Structure REQUEST_BLOCK request_block; - initRequestBlock(&request_block); + udaInitRequestBlock(&request_block); //------------------------------------------------------------------------------ // Build the Request Data Block (Version and API dependent) @@ -316,7 +316,7 @@ int udaGetBatchAPIWithHost(const char** signals, const char** sources, int count // Initialise the Client Data Request Structure REQUEST_BLOCK request_block; - initRequestBlock(&request_block); + udaInitRequestBlock(&request_block); //------------------------------------------------------------------------------ // Build the Request Data Block (Version and API dependent) diff --git a/source/c_api/udaPutAPI.cpp b/source/c_api/udaPutAPI.cpp index 690dadd2..2f57514f 100644 --- a/source/c_api/udaPutAPI.cpp +++ b/source/c_api/udaPutAPI.cpp @@ -45,7 +45,7 @@ int udaPutListAPI(const char* putInstruction, PUTDATA_BLOCK_LIST* inPutDataBlock putDataBlockList = inPutDataBlockList; } else { putDataBlockList = &emptyPutDataBlockList; - initPutDataBlockList(putDataBlockList); + udaInitPutDataBlockList(putDataBlockList); } //------------------------------------------------------------------------- @@ -72,7 +72,7 @@ int udaPutListAPI(const char* putInstruction, PUTDATA_BLOCK_LIST* inPutDataBlock //------------------------------------------------------------------------- // Initialise the Client Data Request Structure - initRequestBlock(&request_block); + udaInitRequestBlock(&request_block); //------------------------------------------------------------------------------ // Build the Request Data Block (Version and API dependent) @@ -123,7 +123,7 @@ int udaPutAPI(const char* putInstruction, PUTDATA_BLOCK* inPutData) putData = inPutData; } else { putData = &emptyPutDataBlock; - initIdamPutDataBlock(putData); + udaInitPutDataBlock(putData); } //------------------------------------------------------------------------- @@ -151,7 +151,7 @@ int udaPutAPI(const char* putInstruction, PUTDATA_BLOCK* inPutData) //------------------------------------------------------------------------- // Initialise the Client Data Request Structure - initRequestBlock(&request_block); + udaInitRequestBlock(&request_block); //------------------------------------------------------------------------------ // Build the Request Data Block (Version and API dependent) diff --git a/source/cache/cache.cpp b/source/cache/cache.cpp index c558ff54..6d79f374 100644 --- a/source/cache/cache.cpp +++ b/source/cache/cache.cpp @@ -29,7 +29,7 @@ DATA_BLOCK* readCacheData(FILE* fp, LOGMALLOCLIST* logmalloclist, USERDEFINEDTYP xdrstdio_create(&xdrs, fp, XDR_DECODE); DATA_BLOCK_LIST data_block_list; - initDataBlockList(&data_block_list); + udaInitDataBlockList(&data_block_list); int token; protocol2(&xdrs, UDA_PROTOCOL_DATA_BLOCK_LIST, XDR_RECEIVE, &token, logmalloclist, userdefinedtypelist, diff --git a/source/client/connection.cpp b/source/client/connection.cpp index d320a92a..3d8f83cb 100644 --- a/source/client/connection.cpp +++ b/source/client/connection.cpp @@ -568,7 +568,7 @@ int createConnection(XDR* client_input, XDR* client_output, time_t* tv_server_st return 0; } -void closeAllConnections() +void udaCloseAllConnections() { closeConnection(ClosedownType::CLOSE_ALL); } diff --git a/source/client/makeClientRequestBlock.cpp b/source/client/makeClientRequestBlock.cpp index 6ffdd564..4aec2069 100644 --- a/source/client/makeClientRequestBlock.cpp +++ b/source/client/makeClientRequestBlock.cpp @@ -145,7 +145,7 @@ int makeClientRequestBlock(const char** signals, const char** sources, int count int err = 0; for (int i = 0; i < count; ++i) { REQUEST_DATA* request = &request_block->requests[i]; - initRequestData(request); + udaInitRequestData(request); if ((err = makeRequestData(signals[i], sources[i], request))) { return err; } diff --git a/source/client/udaClient.cpp b/source/client/udaClient.cpp index d0226167..01205dd3 100644 --- a/source/client/udaClient.cpp +++ b/source/client/udaClient.cpp @@ -193,7 +193,7 @@ void copyDataBlock(DATA_BLOCK* str, DATA_BLOCK* in) memcpy(str->data_label, in->data_label, STRING_LENGTH); memcpy(str->data_desc, in->data_desc, STRING_LENGTH); memcpy(str->error_msg, in->error_msg, STRING_LENGTH); - initClientBlock(&str->client_block, 0, ""); + udaInitClientBlock(&str->client_block, 0, ""); } void copyClientBlock(CLIENT_BLOCK* str, const CLIENT_FLAGS* client_flags) @@ -407,7 +407,7 @@ int idamClient(REQUEST_BLOCK* request_block, int* indices) udaFreeErrorStack(&server_block.idamerrorstack); // Free Previous Stack Heap } - initServerBlock(&server_block, 0); // Reset previous Error Messages from the Server & Free Heap + udaInitServerBlock(&server_block, 0); // Reset previous Error Messages from the Server & Free Heap udaInitErrorStack(); //------------------------------------------------------------------------- @@ -565,7 +565,7 @@ int idamClient(REQUEST_BLOCK* request_block, int* indices) if (initServer && system_startup) { userid(client_username); - initClientBlock(&client_block, client_version, client_username); + udaInitClientBlock(&client_block, client_version, client_username); system_startup = false; // Don't call again! } @@ -1004,7 +1004,7 @@ int idamClient(REQUEST_BLOCK* request_block, int* indices) // Fat Client Server DATA_BLOCK_LIST data_block_list0; - initDataBlockList(&data_block_list0); + udaInitDataBlockList(&data_block_list0); err = fatServer(client_block, &server_block, request_block, &data_block_list0); for (int i = 0; i < data_block_list0.count; ++i) { @@ -1417,7 +1417,7 @@ void udaFree(int handle) // closeIdamError(&server_block.idamerrorstack); udaFreeErrorStack(&server_block.idamerrorstack); - initDataBlock(data_block); + udaInitDataBlock(data_block); data_block->handle = -1; // Flag this as ready for re-use } diff --git a/source/client2/client.cpp b/source/client2/client.cpp index 8e614ff5..1b1caf22 100644 --- a/source/client2/client.cpp +++ b/source/client2/client.cpp @@ -32,7 +32,7 @@ void copy_data_block(DATA_BLOCK* str, DATA_BLOCK* in) memcpy(str->data_label, in->data_label, STRING_LENGTH); memcpy(str->data_desc, in->data_desc, STRING_LENGTH); memcpy(str->error_msg, in->error_msg, STRING_LENGTH); - initClientBlock(&str->client_block, 0, ""); + udaInitClientBlock(&str->client_block, 0, ""); } void copy_client_block(CLIENT_BLOCK* str, const ClientFlags* client_flags) @@ -155,7 +155,7 @@ uda::client::Client::Client() : connection_{environment_}, protocol_version_{Cli userid(username); client_username_ = username; - initClientBlock(&client_block_, ClientVersion, client_username_.c_str()); + udaInitClientBlock(&client_block_, ClientVersion, client_username_.c_str()); //---------------------------------------------------------------- // Check if Output Requested @@ -328,7 +328,7 @@ int get_data_status(DATA_BLOCK* data_block) int uda::client::Client::get_requests(RequestBlock& request_block, int* indices) { - initServerBlock(&server_block_, 0); + udaInitServerBlock(&server_block_, 0); udaInitErrorStack(); time_t tv_server_start = 0; @@ -595,7 +595,7 @@ int uda::client::Client::send_putdata(const RequestBlock& request_block) int uda::client::Client::get(std::string_view data_signal, std::string_view data_source) { REQUEST_BLOCK request_block; - initRequestBlock(&request_block); + udaInitRequestBlock(&request_block); auto signal_ptr = data_signal.data(); auto source_ptr = data_source.data(); @@ -619,7 +619,7 @@ int uda::client::Client::get(std::string_view data_signal, std::string_view data std::vector uda::client::Client::get(std::vector>& requests) { REQUEST_BLOCK request_block; - initRequestBlock(&request_block); + udaInitRequestBlock(&request_block); std::vector signals; std::transform(requests.begin(), requests.end(), std::back_inserter(signals), @@ -1202,7 +1202,7 @@ void uda::client::Client::set_full_ntree(NTREE* full_ntree) int uda::client::Client::put(std::string_view put_instruction, PUTDATA_BLOCK* putdata_block) { REQUEST_BLOCK request_block; - initRequestBlock(&request_block); + udaInitRequestBlock(&request_block); auto signal_ptr = put_instruction.data(); auto source_ptr = ""; @@ -1231,7 +1231,7 @@ int uda::client::Client::put(std::string_view put_instruction, PUTDATA_BLOCK* pu int uda::client::Client::put(std::string_view put_instruction, PUTDATA_BLOCK_LIST* putdata_block_list) { REQUEST_BLOCK request_block; - initRequestBlock(&request_block); + udaInitRequestBlock(&request_block); auto signal_ptr = put_instruction.data(); auto source_ptr = ""; diff --git a/source/client2/handle.cpp b/source/client2/handle.cpp index ffa51eba..a252f4c5 100644 --- a/source/client2/handle.cpp +++ b/source/client2/handle.cpp @@ -172,6 +172,6 @@ void uda::client::free_handle(int handle) // closeIdamError(&server_block.idamerrorstack); - initDataBlock(data_block); + udaInitDataBlock(data_block); data_block->handle = -1; // Flag this as ready for re-use } diff --git a/source/client2/make_request_block.cpp b/source/client2/make_request_block.cpp index 045ef46b..46959164 100644 --- a/source/client2/make_request_block.cpp +++ b/source/client2/make_request_block.cpp @@ -125,7 +125,7 @@ int uda::client::make_request_block(const Environment* environment, const char** int err = 0; for (int i = 0; i < count; ++i) { REQUEST_DATA* request = &request_block->requests[i]; - initRequestData(request); + udaInitRequestData(request); if ((err = make_request_data(environment, signals[i], sources[i], request))) { return err; } diff --git a/source/clientserver/allocData.cpp b/source/clientserver/allocData.cpp index 2c53b083..c1724a97 100644 --- a/source/clientserver/allocData.cpp +++ b/source/clientserver/allocData.cpp @@ -61,7 +61,7 @@ int allocData(DATA_BLOCK* data_block) return ERROR_ALLOCATING_HEAP; } for (unsigned int i = 0; i < data_block->rank; i++) { - initDimBlock(&data_block->dims[i]); + udaInitDimBlock(&data_block->dims[i]); } } diff --git a/source/clientserver/initStructs.cpp b/source/clientserver/initStructs.cpp index 018e12e2..9e93490f 100644 --- a/source/clientserver/initStructs.cpp +++ b/source/clientserver/initStructs.cpp @@ -14,14 +14,14 @@ #include "udaTypes.h" #include -void initNameValueList(NAMEVALUELIST* nameValueList) +void udaInitNameValueList(NAMEVALUELIST* nameValueList) { nameValueList->pairCount = 0; nameValueList->listSize = 0; nameValueList->nameValue = nullptr; } -void initRequestData(REQUEST_DATA* str) +void udaInitRequestData(REQUEST_DATA* str) { str->request = 0; str->exp_number = 0; @@ -39,13 +39,13 @@ void initRequestData(REQUEST_DATA* str) str->source[0] = '\0'; str->subset[0] = '\0'; str->datasubset.nbound = 0; - initNameValueList(&str->nameValueList); + udaInitNameValueList(&str->nameValueList); str->put = 0; - initPutDataBlockList(&str->putDataBlockList); + udaInitPutDataBlockList(&str->putDataBlockList); } -void initRequestBlock(REQUEST_BLOCK* str) +void udaInitRequestBlock(REQUEST_BLOCK* str) { str->num_requests = 0; str->requests = nullptr; @@ -55,7 +55,7 @@ void initRequestBlock(REQUEST_BLOCK* str) # define getpid _getpid #endif -void initClientBlock(CLIENT_BLOCK* str, int version, const char* clientname) +void udaInitClientBlock(CLIENT_BLOCK* str, int version, const char* clientname) { str->version = version; str->timeout = TIMEOUT; @@ -89,7 +89,7 @@ void initClientBlock(CLIENT_BLOCK* str, int version, const char* clientname) #endif } -void initServerBlock(SERVER_BLOCK* str, int version) +void udaInitServerBlock(SERVER_BLOCK* str, int version) { str->version = version; str->error = 0; @@ -105,13 +105,13 @@ void initServerBlock(SERVER_BLOCK* str, int version) #endif } -void initDataBlockList(DATA_BLOCK_LIST* str) +void udaInitDataBlockList(DATA_BLOCK_LIST* str) { str->count = 0; str->data = nullptr; } -void initDataBlock(DATA_BLOCK* str) +void udaInitDataBlock(DATA_BLOCK* str) { str->handle = 0; str->errcode = 0; @@ -143,10 +143,10 @@ void initDataBlock(DATA_BLOCK* str) memset(str->data_label, '\0', STRING_LENGTH); memset(str->data_desc, '\0', STRING_LENGTH); memset(str->error_msg, '\0', STRING_LENGTH); - initClientBlock(&(str->client_block), 0, ""); + udaInitClientBlock(&(str->client_block), 0, ""); } -void initDimBlock(DIMS* str) +void udaInitDimBlock(DIMS* str) { str->dim = nullptr; str->synthetic = nullptr; @@ -173,7 +173,7 @@ void initDimBlock(DIMS* str) str->dim_label[0] = '\0'; } -void initDataSystem(DATA_SYSTEM* str) +void udaInitDataSystem(DATA_SYSTEM* str) { str->system_id = 0; str->version = 0; @@ -187,7 +187,7 @@ void initDataSystem(DATA_SYSTEM* str) str->xml_creation[0] = '\0'; } -void initSystemConfig(SYSTEM_CONFIG* str) +void udaInitSystemConfig(SYSTEM_CONFIG* str) { str->config_id = 0; str->system_id = 0; @@ -199,7 +199,7 @@ void initSystemConfig(SYSTEM_CONFIG* str) str->xml_creation[0] = '\0'; } -void initDataSource(DATA_SOURCE* str) +void udaInitDataSource(DATA_SOURCE* str) { str->source_id = 0; str->config_id = 0; @@ -233,7 +233,7 @@ void initDataSource(DATA_SOURCE* str) str->xml_creation[0] = '\0'; } -void initSignal(SIGNAL* str) +void udaInitSignal(SIGNAL* str) { str->source_id = 0; str->signal_desc_id = 0; @@ -251,7 +251,7 @@ void initSignal(SIGNAL* str) str->xml_creation[0] = '\0'; } -void initSignalDesc(SIGNAL_DESC* str) +void udaInitSignalDesc(SIGNAL_DESC* str) { str->signal_desc_id = 0; str->meta_id = 0; @@ -274,7 +274,7 @@ void initSignalDesc(SIGNAL_DESC* str) str->xml_creation[0] = '\0'; } -void initIdamPutDataBlock(PUTDATA_BLOCK* str) +void udaInitPutDataBlock(PUTDATA_BLOCK* str) { str->data_type = UDA_TYPE_UNKNOWN; str->rank = 0; @@ -288,7 +288,7 @@ void initIdamPutDataBlock(PUTDATA_BLOCK* str) str->blockName = nullptr; } -void initPutDataBlockList(PUTDATA_BLOCK_LIST* putDataBlockList) +void udaInitPutDataBlockList(PUTDATA_BLOCK_LIST* putDataBlockList) { putDataBlockList->putDataBlock = nullptr; putDataBlockList->blockCount = 0; diff --git a/source/clientserver/nameValueSubstitution.cpp b/source/clientserver/nameValueSubstitution.cpp index 18b66e0e..9cef0dad 100644 --- a/source/clientserver/nameValueSubstitution.cpp +++ b/source/clientserver/nameValueSubstitution.cpp @@ -40,7 +40,7 @@ int name_value_substitution(NAMEVALUELIST* nameValueList, char* tpass) } NAMEVALUELIST newNameValueList; - initNameValueList(&newNameValueList); + udaInitNameValueList(&newNameValueList); unsigned short strip = 0; // Do Not Remove enclosing quotes from name value pairs if (name_value_pairs(tpass, &newNameValueList, strip) == -1) { @@ -241,7 +241,7 @@ void embedded_value_substitution(NAMEVALUELIST* nameValueList) continue; } - initNameValueList(&newNameValueList); + udaInitNameValueList(&newNameValueList); UDA_LOG(UDA_LOG_DEBUG, "Extracting Name Value Pairs from [%d]: %s\n", i, nameValueList->nameValue[i].value); diff --git a/source/clientserver/protocol.cpp b/source/clientserver/protocol.cpp index c0a217ee..d0c04edb 100644 --- a/source/clientserver/protocol.cpp +++ b/source/clientserver/protocol.cpp @@ -153,7 +153,7 @@ int protocol(XDR* xdrs, int protocol_id, int direction, int* token, LOGMALLOCLIS if (data_block->rank > 0) { // Check if there are Dimensional Data to Receive for (unsigned int i = 0; i < data_block->rank; i++) { - initDimBlock(&data_block->dims[i]); + udaInitDimBlock(&data_block->dims[i]); } if (!xdr_data_dim1(xdrs, data_block)) { @@ -327,7 +327,7 @@ int protocol(XDR* xdrs, int protocol_id, int direction, int* token, LOGMALLOCLIS for (unsigned int i = 0; i < blockCount; i++) { // Fetch multiple put blocks - initIdamPutDataBlock(&putData); + udaInitPutDataBlock(&putData); if (!xdr_putdata_block1(xdrs, &putData)) { err = UDA_PROTOCOL_ERROR_61; diff --git a/source/clientserver/protocol2.cpp b/source/clientserver/protocol2.cpp index 262461a4..4cf9a26e 100644 --- a/source/clientserver/protocol2.cpp +++ b/source/clientserver/protocol2.cpp @@ -560,7 +560,7 @@ static int handle_putdata_block_list(XDR* xdrs, int direction, int* token, LOGMA // Fetch multiple put blocks PUTDATA_BLOCK putData; - initIdamPutDataBlock(&putData); + udaInitPutDataBlock(&putData); if (!xdr_putdata_block1(xdrs, &putData)) { err = UDA_PROTOCOL_ERROR_61; @@ -598,7 +598,7 @@ static int handle_putdata_block_list(XDR* xdrs, int direction, int* token, LOGMA // *** Add to malloclog and test to ensure it is freed after use *** - initDataBlock(data_block); + udaInitDataBlock(data_block); data_block->opaque_type = UDA_OPAQUE_TYPE_STRUCTURES; data_block->data_n = (int)putData.count; // This number (also rank and shape) data_block->opaque_block = putData.opaque_block; // User Defined Type @@ -660,7 +660,7 @@ static int handle_putdata_block_list(XDR* xdrs, int direction, int* token, LOGMA // *** putdata.opaque_count is not used or needed - count is sufficient DATA_BLOCK data_block; - initDataBlock(&data_block); + udaInitDataBlock(&data_block); data_block.opaque_type = UDA_OPAQUE_TYPE_STRUCTURES; data_block.data_n = (int)putDataBlockList->putDataBlock[i].count; // This number (also rank and shape) @@ -740,7 +740,7 @@ static int handle_data_block(XDR* xdrs, int direction, const void* str, int prot if (data_block->rank > 0) { // Check if there are Dimensional Data to Receive for (unsigned int i = 0; i < data_block->rank; i++) { - initDimBlock(&data_block->dims[i]); + udaInitDimBlock(&data_block->dims[i]); } if (!xdr_data_dim1(xdrs, data_block)) { @@ -902,7 +902,7 @@ static int handle_data_block_list(XDR* xdrs, int direction, const void* str, int data_block_list->data = (DATA_BLOCK*)malloc(data_block_list->count * sizeof(DATA_BLOCK)); for (int i = 0; i < data_block_list->count; ++i) { DATA_BLOCK* data_block = &data_block_list->data[i]; - initDataBlock(data_block); + udaInitDataBlock(data_block); err = handle_data_block(xdrs, XDR_RECEIVE, data_block, protocolVersion); if (err != 0) { err = UDA_PROTOCOL_ERROR_2; @@ -956,7 +956,7 @@ static int handle_request_block(XDR* xdrs, int direction, const void* str, int p } request_block->requests = (REQUEST_DATA*)malloc(request_block->num_requests * sizeof(REQUEST_DATA)); for (int i = 0; i < request_block->num_requests; ++i) { - initRequestData(&request_block->requests[i]); + udaInitRequestData(&request_block->requests[i]); if (!xdr_request_data(xdrs, &request_block->requests[i], protocolVersion)) { err = UDA_PROTOCOL_ERROR_2; break; diff --git a/source/clientserver/udaStructs.cpp b/source/clientserver/udaStructs.cpp index 07a7ea49..1f1876f6 100644 --- a/source/clientserver/udaStructs.cpp +++ b/source/clientserver/udaStructs.cpp @@ -9,7 +9,7 @@ void freePutDataBlockList(PUTDATA_BLOCK_LIST* putDataBlockList) if (putDataBlockList->putDataBlock != nullptr && putDataBlockList->blockListSize > 0) { free(putDataBlockList->putDataBlock); } - // initPutDataBlockList(putDataBlockList); + // udaInitPutDataBlockList(putDataBlockList); } // void freeRequestData(REQUEST_DATA* request_data) @@ -33,7 +33,7 @@ void freeClientPutDataBlockList(PUTDATA_BLOCK_LIST* putDataBlockList) if (putDataBlockList->putDataBlock != nullptr && putDataBlockList->blockListSize > 0) { free(putDataBlockList->putDataBlock); } - // initPutDataBlockList(putDataBlockList); + // udaInitPutDataBlockList(putDataBlockList); } void freeDataBlock(DATA_BLOCK* data_block) diff --git a/source/include/accAPI.h b/source/include/accAPI.h index 2381bde0..2354f714 100644 --- a/source/include/accAPI.h +++ b/source/include/accAPI.h @@ -235,9 +235,9 @@ LIBRARY_API SIGNAL_DESC* udaGetSignalDesc(int handle); LIBRARY_API const char* udaGetFileFormat(int handle); -LIBRARY_API void udaInitDataBlock(DATA_BLOCK* str); +// LIBRARY_API void udaInitDataBlock(DATA_BLOCK* str); -LIBRARY_API void udaInitRequestBlock(REQUEST_BLOCK* str); +// LIBRARY_API void udaInitRequestBlock(REQUEST_BLOCK* str); LIBRARY_API int udaDataCheckSum(void* data, int data_n, int type); diff --git a/source/include/initStructs.h b/source/include/initStructs.h index ba215cf6..56a16d89 100644 --- a/source/include/initStructs.h +++ b/source/include/initStructs.h @@ -8,21 +8,21 @@ extern "C" { #endif -LIBRARY_API void initNameValueList(NAMEVALUELIST* nameValueList); -LIBRARY_API void initRequestData(REQUEST_DATA* str); -LIBRARY_API void initRequestBlock(REQUEST_BLOCK* str); -LIBRARY_API void initClientBlock(CLIENT_BLOCK* str, int version, const char* clientname); -LIBRARY_API void initServerBlock(SERVER_BLOCK* str, int version); -LIBRARY_API void initDataBlock(DATA_BLOCK* str); -LIBRARY_API void initDataBlockList(DATA_BLOCK_LIST* str); -LIBRARY_API void initDimBlock(DIMS* str); -LIBRARY_API void initDataSystem(DATA_SYSTEM* str); -LIBRARY_API void initSystemConfig(SYSTEM_CONFIG* str); -LIBRARY_API void initDataSource(DATA_SOURCE* str); -LIBRARY_API void initSignal(SIGNAL* str); -LIBRARY_API void initSignalDesc(SIGNAL_DESC* str); -LIBRARY_API void initIdamPutDataBlock(PUTDATA_BLOCK* str); -LIBRARY_API void initPutDataBlockList(PUTDATA_BLOCK_LIST* putDataBlockList); +LIBRARY_API void udaInitNameValueList(NAMEVALUELIST* nameValueList); +LIBRARY_API void udaInitRequestData(REQUEST_DATA* str); +LIBRARY_API void udaInitRequestBlock(REQUEST_BLOCK* str); +LIBRARY_API void udaInitClientBlock(CLIENT_BLOCK* str, int version, const char* clientname); +LIBRARY_API void udaInitServerBlock(SERVER_BLOCK* str, int version); +LIBRARY_API void udaInitDataBlock(DATA_BLOCK* str); +LIBRARY_API void udaInitDataBlockList(DATA_BLOCK_LIST* str); +LIBRARY_API void udaInitDimBlock(DIMS* str); +LIBRARY_API void udaInitDataSystem(DATA_SYSTEM* str); +LIBRARY_API void udaInitSystemConfig(SYSTEM_CONFIG* str); +LIBRARY_API void udaInitDataSource(DATA_SOURCE* str); +LIBRARY_API void udaInitSignal(SIGNAL* str); +LIBRARY_API void udaInitSignalDesc(SIGNAL_DESC* str); +LIBRARY_API void udaInitPutDataBlock(PUTDATA_BLOCK* str); +LIBRARY_API void udaInitPutDataBlockList(PUTDATA_BLOCK_LIST* putDataBlockList); #ifdef __cplusplus } diff --git a/source/plugins/bytes/readBytesNonOptimally.cpp b/source/plugins/bytes/readBytesNonOptimally.cpp index a5933871..84f227ba 100644 --- a/source/plugins/bytes/readBytesNonOptimally.cpp +++ b/source/plugins/bytes/readBytesNonOptimally.cpp @@ -131,7 +131,7 @@ int readBytes(const std::string& path, UDA_PLUGIN_INTERFACE* plugin_interface) data_block->rank = 1; data_block->dims = (DIMS*)malloc(sizeof(DIMS)); - initDimBlock(data_block->dims); + udaInitDimBlock(data_block->dims); data_block->dims[0].data_type = UDA_TYPE_UNSIGNED_INT; data_block->dims[0].dim_n = data_block->data_n; diff --git a/source/plugins/hdf5/readHDF58.cpp b/source/plugins/hdf5/readHDF58.cpp index 05d1a0a1..a1e208d0 100644 --- a/source/plugins/hdf5/readHDF58.cpp +++ b/source/plugins/hdf5/readHDF58.cpp @@ -242,7 +242,7 @@ int readHDF5Att(hid_t file_id, char* object, hid_t att_id, char* attname, DATA_B } for (unsigned int i = 0; i < data_block->rank; i++) { - initDimBlock(&data_block->dims[i]); + udaInitDimBlock(&data_block->dims[i]); data_block->dims[i].compressed = 1; data_block->dims[i].method = 0; data_block->dims[i].dim_n = (int)shape[data_block->rank - i - 1]; @@ -479,7 +479,7 @@ int readHDF5(DATA_SOURCE data_source, SIGNAL_DESC signal_desc, DATA_BLOCK* data_ { for (unsigned int i = 0; i < data_block->rank; i++) { - initDimBlock(&data_block->dims[i]); + udaInitDimBlock(&data_block->dims[i]); } } diff --git a/source/plugins/help/help_plugin.cpp b/source/plugins/help/help_plugin.cpp index 76222fc2..11424c3e 100644 --- a/source/plugins/help/help_plugin.cpp +++ b/source/plugins/help/help_plugin.cpp @@ -81,7 +81,7 @@ int HelpPlugin::ping(UDA_PLUGIN_INTERFACE* plugin_interface) // return to the client DATA_BLOCK* data_block = plugin_interface->data_block; - initDataBlock(data_block); + udaInitDataBlock(data_block); data_block->data_type = UDA_TYPE_COMPOUND; data_block->rank = 0; diff --git a/source/plugins/testplugin/testplugin.cpp b/source/plugins/testplugin/testplugin.cpp index 0e137247..90a717dc 100644 --- a/source/plugins/testplugin/testplugin.cpp +++ b/source/plugins/testplugin/testplugin.cpp @@ -203,13 +203,13 @@ int TestPlugin::test0(UDA_PLUGIN_INTERFACE* plugin_interface) const char* help = "Hello World!"; - initDataBlock(data_block); + udaInitDataBlock(data_block); data_block->rank = 1; data_block->dims = (DIMS*)malloc(data_block->rank * sizeof(DIMS)); for (unsigned int i = 0; i < data_block->rank; i++) { - initDimBlock(&data_block->dims[i]); + udaInitDimBlock(&data_block->dims[i]); } if (STR_IEQUALS(request->function, "test0")) { @@ -301,12 +301,12 @@ int TestPlugin::test2(UDA_PLUGIN_INTERFACE* plugin_interface) } free(sarr); - initDataBlock(data_block); + udaInitDataBlock(data_block); data_block->rank = 2; data_block->dims = (DIMS*)malloc(data_block->rank * sizeof(DIMS)); for (unsigned int i = 0; i < data_block->rank; i++) { - initDimBlock(&data_block->dims[i]); + udaInitDimBlock(&data_block->dims[i]); } if (STR_IEQUALS(request->function, "test2")) { @@ -788,7 +788,7 @@ int TestPlugin::test9(UDA_PLUGIN_INTERFACE* plugin_interface) data_block->dims = (DIMS*)malloc(data_block->rank * sizeof(DIMS)); for (unsigned int i = 0; i < data_block->rank; i++) { - initDimBlock(&data_block->dims[i]); + udaInitDimBlock(&data_block->dims[i]); } data_block->dims[0].data_type = UDA_TYPE_UNSIGNED_INT; @@ -895,7 +895,7 @@ int TestPlugin::test9A(UDA_PLUGIN_INTERFACE* plugin_interface) data_block->dims = (DIMS*)malloc(data_block->rank * sizeof(DIMS)); for (unsigned int i = 0; i < data_block->rank; i++) { - initDimBlock(&data_block->dims[i]); + udaInitDimBlock(&data_block->dims[i]); } data_block->dims[0].data_type = UDA_TYPE_UNSIGNED_INT; @@ -1456,7 +1456,7 @@ int TestPlugin::test18(UDA_PLUGIN_INTERFACE* plugin_interface) data_block->dims = (DIMS*)malloc(data_block->rank * sizeof(DIMS)); for (unsigned int i = 0; i < data_block->rank; i++) { - initDimBlock(&data_block->dims[i]); + udaInitDimBlock(&data_block->dims[i]); } data_block->dims[0].data_type = UDA_TYPE_UNSIGNED_INT; @@ -1605,7 +1605,7 @@ int TestPlugin::test19(UDA_PLUGIN_INTERFACE* plugin_interface) data_block->dims = (DIMS*)malloc(data_block->rank * sizeof(DIMS)); for (unsigned int i = 0; i < data_block->rank; i++) { - initDimBlock(&data_block->dims[i]); + udaInitDimBlock(&data_block->dims[i]); } data_block->dims[0].data_type = UDA_TYPE_UNSIGNED_INT; @@ -2997,7 +2997,7 @@ int TestPlugin::test50(UDA_PLUGIN_INTERFACE* plugin_interface) UDA_LOG(UDA_LOG_DEBUG, "test50: %s\n", work.c_str()); - initDataBlock(data_block); + udaInitDataBlock(data_block); data_block->rank = 0; data_block->data_n = work.size(); @@ -3215,7 +3215,7 @@ int TestPlugin::test60(UDA_PLUGIN_INTERFACE* plugin_interface) udaAddUserDefinedType(userdefinedtypelist, usertype); DATA_BLOCK* data_block = plugin_interface->data_block; - initDataBlock(data_block); + udaInitDataBlock(data_block); data_block->rank = 0; data_block->data_n = 1; @@ -3383,7 +3383,7 @@ int TestPlugin::test61(UDA_PLUGIN_INTERFACE* plugin_interface) udaAddUserDefinedType(userdefinedtypelist, usertype); DATA_BLOCK* data_block = plugin_interface->data_block; - initDataBlock(data_block); + udaInitDataBlock(data_block); data_block->rank = 0; data_block->data_n = 1; @@ -3443,7 +3443,7 @@ int TestPlugin::test62(UDA_PLUGIN_INTERFACE* plugin_interface) udaAddMalloc(plugin_interface->logmalloclist, (void*)enumlist->enumarray_shape, 1, sizeof(int), "int"); DATA_BLOCK* data_block = plugin_interface->data_block; - initDataBlock(data_block); + udaInitDataBlock(data_block); data_block->rank = 0; data_block->data_n = 1; @@ -3575,7 +3575,7 @@ int TestPlugin::scalartest(UDA_PLUGIN_INTERFACE* plugin_interface) { DATA_BLOCK* data_block = plugin_interface->data_block; - initDataBlock(data_block); + udaInitDataBlock(data_block); auto p = (int*)malloc(sizeof(int)); *p = 10; @@ -3590,7 +3590,7 @@ int TestPlugin::array1dtest(UDA_PLUGIN_INTERFACE* plugin_interface) { DATA_BLOCK* data_block = plugin_interface->data_block; - initDataBlock(data_block); + udaInitDataBlock(data_block); constexpr int N = 100; auto p = (double*)malloc(N * sizeof(double)); @@ -3603,7 +3603,7 @@ int TestPlugin::array1dtest(UDA_PLUGIN_INTERFACE* plugin_interface) data_block->rank = 1; data_block->dims = (DIMS*)malloc(sizeof(DIMS)); - initDimBlock(data_block->dims); + udaInitDimBlock(data_block->dims); data_block->dims[0].dim_n = 100; data_block->dims[0].data_type = UDA_TYPE_INT; data_block->dims[0].compressed = 1; @@ -3616,7 +3616,7 @@ int TestPlugin::array1dtest(UDA_PLUGIN_INTERFACE* plugin_interface) int TestPlugin::emptytest(UDA_PLUGIN_INTERFACE* plugin_interface) { DATA_BLOCK* data_block = plugin_interface->data_block; - initDataBlock(data_block); + udaInitDataBlock(data_block); return 0; } @@ -3674,7 +3674,7 @@ int TestPlugin::capnp_test(UDA_PLUGIN_INTERFACE* plugin_interface) auto buffer = uda_capnp_serialise(tree); DATA_BLOCK* data_block = plugin_interface->data_block; - initDataBlock(data_block); + udaInitDataBlock(data_block); data_block->data_n = static_cast(buffer.size); data_block->data = buffer.data; @@ -3730,7 +3730,7 @@ int TestPlugin::nested_capnp_test(UDA_PLUGIN_INTERFACE* plugin_interface) auto buffer = uda_capnp_serialise(tree); DATA_BLOCK* data_block = plugin_interface->data_block; - initDataBlock(data_block); + udaInitDataBlock(data_block); data_block->data_n = static_cast(buffer.size); data_block->data = buffer.data; @@ -3769,7 +3769,7 @@ int TestPlugin::long_capnp_test(UDA_PLUGIN_INTERFACE* plugin_interface) auto buffer = uda_capnp_serialise(tree); DATA_BLOCK* data_block = plugin_interface->data_block; - initDataBlock(data_block); + udaInitDataBlock(data_block); data_block->data_n = static_cast(buffer.size); data_block->data = buffer.data; @@ -3799,7 +3799,7 @@ int TestPlugin::large_capnp_test(UDA_PLUGIN_INTERFACE* plugin_interface) auto buffer = uda_capnp_serialise(tree); DATA_BLOCK* data_block = plugin_interface->data_block; - initDataBlock(data_block); + udaInitDataBlock(data_block); data_block->data_n = static_cast(buffer.size); data_block->data = buffer.data; @@ -4038,7 +4038,7 @@ int TestPlugin::testudt(UDA_PLUGIN_INTERFACE* plugin_interface) // Return IDAM status - initDataBlock(data_block); + udaInitDataBlock(data_block); data_block->rank = 0; data_block->data_n = 1; diff --git a/source/plugins/uda/uda_plugin.cpp b/source/plugins/uda/uda_plugin.cpp index 69bbcbc4..355c24c2 100644 --- a/source/plugins/uda/uda_plugin.cpp +++ b/source/plugins/uda/uda_plugin.cpp @@ -511,7 +511,7 @@ int uda::plugins::uda::Plugin::get(UDA_PLUGIN_INTERFACE* plugin_interface) // Write the structure components element by element! (Ignore the CLIENT_BLOCK component) DATA_BLOCK db; - initDataBlock(&db); + udaInitDataBlock(&db); auto odb = (OLD_DATA_BLOCK*)udaGetDataBlock(handle); diff --git a/source/plugins/udaPlugin.cpp b/source/plugins/udaPlugin.cpp index f330edfb..0e189376 100644 --- a/source/plugins/udaPlugin.cpp +++ b/source/plugins/udaPlugin.cpp @@ -64,7 +64,7 @@ int initPlugin(const UDA_PLUGIN_INTERFACE* plugin_interface) int setReturnDataFloatArray(DATA_BLOCK* data_block, float* values, size_t rank, const size_t* shape, const char* description) { - initDataBlock(data_block); + udaInitDataBlock(data_block); if (description != nullptr) { strncpy(data_block->data_desc, description, STRING_LENGTH); @@ -77,7 +77,7 @@ int setReturnDataFloatArray(DATA_BLOCK* data_block, float* values, size_t rank, size_t len = 1; for (size_t i = 0; i < rank; ++i) { - initDimBlock(&data_block->dims[i]); + udaInitDimBlock(&data_block->dims[i]); data_block->dims[i].data_type = UDA_TYPE_UNSIGNED_INT; data_block->dims[i].dim_n = (int)shape[i]; @@ -102,7 +102,7 @@ int setReturnDataFloatArray(DATA_BLOCK* data_block, float* values, size_t rank, int setReturnDataDoubleArray(DATA_BLOCK* data_block, double* values, size_t rank, const size_t* shape, const char* description) { - initDataBlock(data_block); + udaInitDataBlock(data_block); if (description != nullptr) { strncpy(data_block->data_desc, description, STRING_LENGTH); @@ -115,7 +115,7 @@ int setReturnDataDoubleArray(DATA_BLOCK* data_block, double* values, size_t rank size_t len = 1; for (size_t i = 0; i < rank; ++i) { - initDimBlock(&data_block->dims[i]); + udaInitDimBlock(&data_block->dims[i]); data_block->dims[i].data_type = UDA_TYPE_UNSIGNED_INT; data_block->dims[i].dim_n = (int)shape[i]; @@ -140,7 +140,7 @@ int setReturnDataDoubleArray(DATA_BLOCK* data_block, double* values, size_t rank int setReturnDataIntArray(DATA_BLOCK* data_block, int* values, size_t rank, const size_t* shape, const char* description) { - initDataBlock(data_block); + udaInitDataBlock(data_block); if (description != nullptr) { strncpy(data_block->data_desc, description, STRING_LENGTH); @@ -153,7 +153,7 @@ int setReturnDataIntArray(DATA_BLOCK* data_block, int* values, size_t rank, cons size_t len = 1; for (size_t i = 0; i < rank; ++i) { - initDimBlock(&data_block->dims[i]); + udaInitDimBlock(&data_block->dims[i]); data_block->dims[i].data_type = UDA_TYPE_UNSIGNED_INT; data_block->dims[i].dim_n = (int)shape[i]; @@ -177,7 +177,7 @@ int setReturnDataIntArray(DATA_BLOCK* data_block, int* values, size_t rank, cons int setReturnDataDoubleScalar(DATA_BLOCK* data_block, double value, const char* description) { - initDataBlock(data_block); + udaInitDataBlock(data_block); auto data = (double*)malloc(sizeof(double)); data[0] = value; @@ -197,7 +197,7 @@ int setReturnDataDoubleScalar(DATA_BLOCK* data_block, double value, const char* int setReturnDataFloatScalar(DATA_BLOCK* data_block, float value, const char* description) { - initDataBlock(data_block); + udaInitDataBlock(data_block); auto data = (float*)malloc(sizeof(float)); data[0] = value; @@ -217,7 +217,7 @@ int setReturnDataFloatScalar(DATA_BLOCK* data_block, float value, const char* de int setReturnDataIntScalar(DATA_BLOCK* data_block, int value, const char* description) { - initDataBlock(data_block); + udaInitDataBlock(data_block); int* data = (int*)malloc(sizeof(int)); data[0] = value; @@ -237,7 +237,7 @@ int setReturnDataIntScalar(DATA_BLOCK* data_block, int value, const char* descri int setReturnDataLongScalar(DATA_BLOCK* data_block, long value, const char* description) { - initDataBlock(data_block); + udaInitDataBlock(data_block); long* data = (long*)malloc(sizeof(long)); data[0] = value; @@ -257,7 +257,7 @@ int setReturnDataLongScalar(DATA_BLOCK* data_block, long value, const char* desc int setReturnDataShortScalar(DATA_BLOCK* data_block, short value, const char* description) { - initDataBlock(data_block); + udaInitDataBlock(data_block); auto data = (short*)malloc(sizeof(short)); data[0] = value; @@ -277,7 +277,7 @@ int setReturnDataShortScalar(DATA_BLOCK* data_block, short value, const char* de int setReturnDataString(DATA_BLOCK* data_block, const char* value, const char* description) { - initDataBlock(data_block); + udaInitDataBlock(data_block); data_block->data_type = UDA_TYPE_STRING; data_block->data = strdup(value); @@ -286,7 +286,7 @@ int setReturnDataString(DATA_BLOCK* data_block, const char* value, const char* d data_block->dims = (DIMS*)malloc(data_block->rank * sizeof(DIMS)); for (unsigned int i = 0; i < data_block->rank; i++) { - initDimBlock(&data_block->dims[i]); + udaInitDimBlock(&data_block->dims[i]); } if (description != nullptr) { @@ -309,7 +309,7 @@ int setReturnDataString(DATA_BLOCK* data_block, const char* value, const char* d int setReturnData(DATA_BLOCK* data_block, void* value, size_t size, UDA_TYPE type, int rank, const int* shape, const char* description) { - initDataBlock(data_block); + udaInitDataBlock(data_block); data_block->data_type = type; data_block->data = (char*)malloc(size); @@ -320,7 +320,7 @@ int setReturnData(DATA_BLOCK* data_block, void* value, size_t size, UDA_TYPE typ data_block->dims = (DIMS*)malloc(data_block->rank * sizeof(DIMS)); for (unsigned int i = 0; i < data_block->rank; i++) { - initDimBlock(&data_block->dims[i]); + udaInitDimBlock(&data_block->dims[i]); } if (description != nullptr) { diff --git a/source/plugins/viewport/viewport.cpp b/source/plugins/viewport/viewport.cpp index d97fdad7..424707a0 100644 --- a/source/plugins/viewport/viewport.cpp +++ b/source/plugins/viewport/viewport.cpp @@ -574,12 +574,12 @@ int ViewportPlugin::get(UDA_PLUGIN_INTERFACE* plugin_interface) // Return viewport data DATA_BLOCK* data_block = plugin_interface->data_block; - initDataBlock(data_block); + udaInitDataBlock(data_block); data_block->rank = 1; data_block->dims = (DIMS*)malloc(data_block->rank * sizeof(DIMS)); for (unsigned int i = 0; i < data_block->rank; i++) { - initDimBlock(&data_block->dims[i]); + udaInitDimBlock(&data_block->dims[i]); } data_block->data_n = pixelWidth2; diff --git a/source/server/fatServer.cpp b/source/server/fatServer.cpp index 3adc5ddd..c3b9c39f 100644 --- a/source/server/fatServer.cpp +++ b/source/server/fatServer.cpp @@ -113,8 +113,8 @@ int fatServer(CLIENT_BLOCK client_block, SERVER_BLOCK* server_block, REQUEST_BLO // Initialise the Error Stack & the Server Status Structure // Reinitialised after each logging action - initServerBlock(server_block, server_version); - initDataBlockList(&data_blocks); + udaInitServerBlock(server_block, server_version); + udaInitDataBlockList(&data_blocks); initActions(&actions_desc); // There may be a Sequence of Actions to Apply initActions(&actions_sig); @@ -293,9 +293,9 @@ int handleRequestFat(REQUEST_BLOCK* request_block, REQUEST_BLOCK* request_block0 //---------------------------------------------------------------------- // Initialise Data Structures - initDataSource(&metadata_block->data_source); - initSignalDesc(&metadata_block->signal_desc); - initSignal(&metadata_block->signal_rec); + udaInitDataSource(&metadata_block->data_source); + udaInitSignalDesc(&metadata_block->signal_desc); + udaInitSignal(&metadata_block->signal_rec); //---------------------------------------------------------------------------------------------- // Decode the API Arguments: determine appropriate data plug-in to use @@ -329,7 +329,7 @@ int handleRequestFat(REQUEST_BLOCK* request_block, REQUEST_BLOCK* request_block0 assert(i == data_blocks->count); data_blocks->data = (DATA_BLOCK*)realloc(data_blocks->data, (data_blocks->count + 1) * sizeof(DATA_BLOCK)); auto data_block = &data_blocks->data[i]; - initDataBlock(data_block); + udaInitDataBlock(data_block); err = udaGetData(&depth, request, *client_block, data_block, &metadata_block->data_source, &metadata_block->signal_rec, &metadata_block->signal_desc, actions_desc, actions_sig, &pluginList, log_malloc_list, user_defined_type_list, &socket_list, protocol_version); diff --git a/source/server/serverGetData.cpp b/source/server/serverGetData.cpp index 03f6d02c..3d2a7cd2 100644 --- a/source/server/serverGetData.cpp +++ b/source/server/serverGetData.cpp @@ -382,10 +382,10 @@ int udaGetData(int* depth, REQUEST_DATA* request_data, CLIENT_BLOCK client_block initActions(&actions_comp_desc2); initActions(&actions_comp_sig2); - initDataBlock(&data_block2); - initDataSource(&data_source2); - initSignal(&signal_rec2); - initSignalDesc(&signal_desc2); + udaInitDataBlock(&data_block2); + udaInitDataSource(&data_source2); + udaInitSignal(&signal_rec2); + udaInitSignalDesc(&signal_desc2); // Check if the source file was originally defined in the client API? @@ -431,7 +431,7 @@ int udaGetData(int* depth, REQUEST_DATA* request_data, CLIENT_BLOCK client_block initActions(&actions_comp_desc2); initActions(&actions_comp_sig2); - initDataBlock(&data_block2); + udaInitDataBlock(&data_block2); // Check if the source file was originally defined in the client API? @@ -515,8 +515,8 @@ int udaGetData(int* depth, REQUEST_DATA* request_data, CLIENT_BLOCK client_block initActions(&actions_comp_desc2); initActions(&actions_comp_sig2); - initDataBlock(&data_block2); - initSignalDesc(&signal_desc2); // Added 06Nov2008 + udaInitDataBlock(&data_block2); + udaInitSignalDesc(&signal_desc2); // Added 06Nov2008 // Check if the source file was originally defined in the client API? @@ -583,7 +583,7 @@ int udaGetData(int* depth, REQUEST_DATA* request_data, CLIENT_BLOCK client_block initActions(&actions_comp_desc2); initActions(&actions_comp_sig2); - initDataBlock(&data_block2); + udaInitDataBlock(&data_block2); // Check if the source file was originally defined in the client API? @@ -631,7 +631,7 @@ int udaGetData(int* depth, REQUEST_DATA* request_data, CLIENT_BLOCK client_block initActions(&actions_comp_desc2); initActions(&actions_comp_sig2); - initDataBlock(&data_block2); + udaInitDataBlock(&data_block2); // Check if the source file was originally defined in the client API? @@ -1118,7 +1118,7 @@ int read_data(REQUEST_DATA* request, CLIENT_BLOCK client_block, DATA_BLOCK* data // Initialise the Data Block - initDataBlock(data_block); + udaInitDataBlock(data_block); idam_plugin_interface.interfaceVersion = 1; idam_plugin_interface.pluginVersion = 0; @@ -1274,7 +1274,7 @@ int read_data(REQUEST_DATA* request, CLIENT_BLOCK client_block, DATA_BLOCK* data //---------------------------------------------------------------------------- // Initialise the Data Block Structure - initDataBlock(data_block); + udaInitDataBlock(data_block); //---------------------------------------------------------------------------- // Status values diff --git a/source/server/serverPlugin.cpp b/source/server/serverPlugin.cpp index 612321e9..17039ff4 100644 --- a/source/server/serverPlugin.cpp +++ b/source/server/serverPlugin.cpp @@ -43,7 +43,7 @@ void resetPlugins(const PLUGINLIST* plugin_list) { REQUEST_DATA request_block; UDA_PLUGIN_INTERFACE idam_plugin_interface; - initRequestData(&request_block); + udaInitRequestData(&request_block); strcpy(request_block.function, "reset"); idam_plugin_interface.interfaceVersion = 1; @@ -377,7 +377,7 @@ int udaProvenancePlugin(CLIENT_BLOCK* client_block, REQUEST_DATA* original_reque } REQUEST_DATA request; - initRequestData(&request); + udaInitRequestData(&request); strcpy(request.api_delim, "::"); strcpy(request.source, ""); @@ -411,7 +411,7 @@ int udaProvenancePlugin(CLIENT_BLOCK* client_block, REQUEST_DATA* original_reque // Initialise the Data Block - initDataBlock(&data_block); + udaInitDataBlock(&data_block); UDA_LOG(UDA_LOG_DEBUG, "Creating plugin interface\n"); @@ -570,7 +570,7 @@ int udaServerMetaDataPlugin(const PLUGINLIST* plugin_list, int plugin_id, REQUES } DATA_BLOCK data_block; - initDataBlock(&data_block); + udaInitDataBlock(&data_block); data_block.signal_rec = signal_rec; USERDEFINEDTYPELIST userdefinedtypelist; diff --git a/source/server/serverSubsetData.cpp b/source/server/serverSubsetData.cpp index a75a9927..6c0ae176 100644 --- a/source/server/serverSubsetData.cpp +++ b/source/server/serverSubsetData.cpp @@ -306,7 +306,7 @@ int process_subset_operation(int ii, SUBSET subset, DATA_BLOCK* data_block, LOGM data_block->dims = (DIMS*)realloc((void*)data_block->dims, rank * sizeof(DIMS)); for (int k = k0; k < rank; k++) { - initDimBlock(&data_block->dims[k]); + udaInitDimBlock(&data_block->dims[k]); if (shape == nullptr) { data_block->dims[k].dim_n = data_n; } else { @@ -328,7 +328,7 @@ int process_subset_operation(int ii, SUBSET subset, DATA_BLOCK* data_block, LOGM data_block->dims = (DIMS*)realloc((void*)data_block->dims, data_block->rank * sizeof(DIMS)); for (unsigned int k = k0; k < data_block->rank; k++) { - initDimBlock(&data_block->dims[k]); + udaInitDimBlock(&data_block->dims[k]); data_block->dims[k].dim_n = udt->compoundfield[i].shape[k - k0]; data_block->dims[k].data_type = UDA_TYPE_UNSIGNED_INT; data_block->dims[k].compressed = 1; @@ -376,7 +376,7 @@ int process_subset_operation(int ii, SUBSET subset, DATA_BLOCK* data_block, LOGM // Decompress the dimensional data if necessary & free Heap Associated with Compression DIMS new_dim; - initDimBlock(&new_dim); // Holder for the Sub-setted Dimension (part copy of the original) + udaInitDimBlock(&new_dim); // Holder for the Sub-setted Dimension (part copy of the original) auto dim = &(data_block->dims[dim_id]); // the original dimension to be subset @@ -1050,7 +1050,7 @@ int apply_count(SUBSET subset, DATA_BLOCK* data_block) if (p1 == nullptr) { count[0] = (unsigned int)data_block->data_n; freeDataBlock(data_block); - initDataBlock(data_block); + udaInitDataBlock(data_block); data_block->data_n = 1; data_block->data = (char*)count; data_block->data_type = UDA_TYPE_UNSIGNED_INT; diff --git a/source/server/udaLegacyServer.cpp b/source/server/udaLegacyServer.cpp index f05e2576..844d9b3a 100644 --- a/source/server/udaLegacyServer.cpp +++ b/source/server/udaLegacyServer.cpp @@ -76,8 +76,8 @@ int legacyServer(CLIENT_BLOCK client_block, const PLUGINLIST* pluginlist, LOGMAL udaInitErrorStack(); - initServerBlock(&server_block, server_version); - initDataBlock(&data_block); + udaInitServerBlock(&server_block, server_version); + udaInitDataBlock(&data_block); initActions(&actions_desc); // There may be a Sequence of Actions to Apply initActions(&actions_sig); @@ -99,13 +99,13 @@ int legacyServer(CLIENT_BLOCK client_block, const PLUGINLIST* pluginlist, LOGMAL // Initialise the Client Structure - only if this is not the first time in the wait loop if (normalLegacyWait) { - initClientBlock(&client_block, 0, ""); + udaInitClientBlock(&client_block, 0, ""); } //---------------------------------------------------------------------------- // Initialise the Request Structure - initRequestBlock(&request_block); + udaInitRequestBlock(&request_block); //---------------------------------------------------------------------------- // Client and Server States @@ -312,16 +312,16 @@ int legacyServer(CLIENT_BLOCK client_block, const PLUGINLIST* pluginlist, LOGMAL //---------------------------------------------------------------------- // Initialise Data Structures - initDataSource(&data_source); - initSignalDesc(&signal_desc); - initSignal(&signal_rec); + udaInitDataSource(&data_source); + udaInitSignalDesc(&signal_desc); + udaInitSignal(&signal_rec); //---------------------------------------------------------------------------------------------- // If this is a PUT request then receive the putData structure REQUEST_DATA* request_data = &request_block.requests[0]; - initPutDataBlockList(&(request_data->putDataBlockList)); + udaInitPutDataBlockList(&(request_data->putDataBlockList)); if (request_data->put) { @@ -752,8 +752,8 @@ int legacyServer(CLIENT_BLOCK client_block, const PLUGINLIST* pluginlist, LOGMAL UDA_LOG(UDA_LOG_DEBUG, "udaCloseError\n"); udaCloseError(); - UDA_LOG(UDA_LOG_DEBUG, "initServerBlock\n"); - initServerBlock(&server_block, server_version); + UDA_LOG(UDA_LOG_DEBUG, "udaInitServerBlock\n"); + udaInitServerBlock(&server_block, server_version); UDA_LOG(UDA_LOG_DEBUG, "At End of Error Trap\n"); diff --git a/source/server/udaServer.cpp b/source/server/udaServer.cpp index 591326ee..227d95fa 100644 --- a/source/server/udaServer.cpp +++ b/source/server/udaServer.cpp @@ -130,10 +130,10 @@ int udaServer(CLIENT_BLOCK client_block) // Reinitialised after each logging action udaInitErrorStack(); - initServerBlock(&server_block, server_version); + udaInitServerBlock(&server_block, server_version); initActions(&actions_desc); // There may be a Sequence of Actions to Apply initActions(&actions_sig); - initRequestBlock(&request_block); + udaInitRequestBlock(&request_block); uda::cache::UdaCache* cache = uda::cache::open_cache(); @@ -381,7 +381,7 @@ int handleRequest(REQUEST_BLOCK* request_block, CLIENT_BLOCK* client_block, SERV int err = 0; - initClientBlock(client_block, 0, ""); + udaInitClientBlock(client_block, 0, ""); UDA_LOG(UDA_LOG_DEBUG, "Waiting to receive Client Block\n"); @@ -673,9 +673,9 @@ int handleRequest(REQUEST_BLOCK* request_block, CLIENT_BLOCK* client_block, SERV //---------------------------------------------------------------------- // Initialise Data Structures - initDataSource(&metadata_block->data_source); - initSignalDesc(&metadata_block->signal_desc); - initSignal(&metadata_block->signal_rec); + udaInitDataSource(&metadata_block->data_source); + udaInitSignalDesc(&metadata_block->signal_desc); + udaInitSignal(&metadata_block->signal_rec); //---------------------------------------------------------------------------------------------- // If this is a PUT request then receive the putData structure @@ -683,7 +683,7 @@ int handleRequest(REQUEST_BLOCK* request_block, CLIENT_BLOCK* client_block, SERV for (int i = 0; i < request_block->num_requests; ++i) { REQUEST_DATA* request = &request_block->requests[0]; - initPutDataBlockList(&request->putDataBlockList); + udaInitPutDataBlockList(&request->putDataBlockList); if (request->put) { if ((err = protocol2(server_input, UDA_PROTOCOL_PUTDATA_BLOCK_LIST, XDR_RECEIVE, nullptr, log_malloc_list, @@ -910,8 +910,8 @@ int doServerLoop(REQUEST_BLOCK* request_block, DATA_BLOCK_LIST* data_block_list, UDA_LOG(UDA_LOG_DEBUG, "udaCloseError\n"); udaCloseError(); - UDA_LOG(UDA_LOG_DEBUG, "initServerBlock\n"); - initServerBlock(server_block, server_version); + UDA_LOG(UDA_LOG_DEBUG, "udaInitServerBlock\n"); + udaInitServerBlock(server_block, server_version); //---------------------------------------------------------------------------- // Server Wait Loop @@ -987,7 +987,7 @@ int authenticateClient(CLIENT_BLOCK* client_block, SERVER_BLOCK* server_block) { static int authenticationNeeded = 1; // No data access until this is set TRUE - initClientBlock(client_block, 0, ""); + udaInitClientBlock(client_block, 0, ""); if (authenticationNeeded && protocolVersion >= UDA_SECURITY_VERSION) { // User or intermediate server Must Authenticate @@ -1037,7 +1037,7 @@ int handshakeClient(CLIENT_BLOCK* client_block, SERVER_BLOCK* server_block, int* { // Exchange version details - once only - initClientBlock(client_block, 0, ""); + udaInitClientBlock(client_block, 0, ""); // Receive the client block, respecting earlier protocol versions diff --git a/source/server2/get_data.cpp b/source/server2/get_data.cpp index b30111c3..3162a960 100644 --- a/source/server2/get_data.cpp +++ b/source/server2/get_data.cpp @@ -568,10 +568,10 @@ int uda::Server::get_data(int* depth, RequestData* request_data, DataBlock* data initActions(&actions_comp_desc2); initActions(&actions_comp_sig2); - initDataBlock(&data_block2); - initDataSource(&data_source2); - initSignal(&signal_rec2); - initSignalDesc(&signal_desc2); + udaInitDataBlock(&data_block2); + udaInitDataSource(&data_source2); + udaInitSignal(&signal_rec2); + udaInitSignalDesc(&signal_desc2); // Check if the source file was originally defined in the client API? @@ -615,7 +615,7 @@ int uda::Server::get_data(int* depth, RequestData* request_data, DataBlock* data initActions(&actions_comp_desc2); initActions(&actions_comp_sig2); - initDataBlock(&data_block2); + udaInitDataBlock(&data_block2); // Check if the source file was originally defined in the client API? @@ -697,8 +697,8 @@ int uda::Server::get_data(int* depth, RequestData* request_data, DataBlock* data initActions(&actions_comp_desc2); initActions(&actions_comp_sig2); - initDataBlock(&data_block2); - initSignalDesc(&signal_desc2); // Added 06Nov2008 + udaInitDataBlock(&data_block2); + udaInitSignalDesc(&signal_desc2); // Added 06Nov2008 // Check if the source file was originally defined in the client API? @@ -768,7 +768,7 @@ int uda::Server::get_data(int* depth, RequestData* request_data, DataBlock* data initActions(&actions_comp_desc2); initActions(&actions_comp_sig2); - initDataBlock(&data_block2); + udaInitDataBlock(&data_block2); // Check if the source file was originally defined in the client API? @@ -814,7 +814,7 @@ int uda::Server::get_data(int* depth, RequestData* request_data, DataBlock* data initActions(&actions_comp_desc2); initActions(&actions_comp_sig2); - initDataBlock(&data_block2); + udaInitDataBlock(&data_block2); // Check if the source file was originally defined in the client API? @@ -1088,7 +1088,7 @@ int uda::Server::read_data(RequestData* request, DATA_BLOCK* data_block) // Initialise the Data Block - initDataBlock(data_block); + udaInitDataBlock(data_block); auto plugin_list = plugins_.as_plugin_list(); plugin_interface.interfaceVersion = 1; @@ -1243,7 +1243,7 @@ int uda::Server::read_data(RequestData* request, DATA_BLOCK* data_block) //---------------------------------------------------------------------------- // Initialise the Data Block Structure - initDataBlock(data_block); + udaInitDataBlock(data_block); //---------------------------------------------------------------------------- // Status values diff --git a/source/server2/server.cpp b/source/server2/server.cpp index ab974db8..b68e6424 100644 --- a/source/server2/server.cpp +++ b/source/server2/server.cpp @@ -53,10 +53,10 @@ void print_data_block_list(const std::vector& data_blocks) uda::Server::Server() : error_stack_{}, environment_{}, sockets_{} { - initServerBlock(&server_block_, ServerVersion); + udaInitServerBlock(&server_block_, ServerVersion); initActions(&actions_desc_); // There may be a Sequence of Actions to Apply initActions(&actions_sig_); - initRequestBlock(&request_block_); + udaInitRequestBlock(&request_block_); cache_ = cache::open_cache(); } @@ -292,8 +292,8 @@ void uda::Server::loop() UDA_LOG(UDA_LOG_DEBUG, "udaCloseError\n"); udaCloseError(); - UDA_LOG(UDA_LOG_DEBUG, "initServerBlock\n"); - initServerBlock(&server_block_, ServerVersion); + UDA_LOG(UDA_LOG_DEBUG, "udaInitServerBlock\n"); + udaInitServerBlock(&server_block_, ServerVersion); //---------------------------------------------------------------------------- // Server Wait Loop @@ -313,7 +313,7 @@ int uda::Server::handle_request() int err = 0; - initClientBlock(&client_block_, 0, ""); + udaInitClientBlock(&client_block_, 0, ""); err = protocol_.recv_client_block(server_block_, &client_block_, &fatal_error_, server_tot_block_time_, &server_timeout_, log_malloc_list_, user_defined_type_list_); @@ -580,9 +580,9 @@ int uda::Server::handle_request() //---------------------------------------------------------------------- // Initialise Data Structures - initDataSource(&metadata_block_.data_source); - initSignalDesc(&metadata_block_.signal_desc); - initSignal(&metadata_block_.signal_rec); + udaInitDataSource(&metadata_block_.data_source); + udaInitSignalDesc(&metadata_block_.signal_desc); + udaInitSignal(&metadata_block_.signal_rec); //---------------------------------------------------------------------------------------------- // If this is a PUT request then receive the putData structure @@ -590,7 +590,7 @@ int uda::Server::handle_request() for (int i = 0; i < request_block_.num_requests; ++i) { REQUEST_DATA* request = &request_block_.requests[0]; - initPutDataBlockList(&request->putDataBlockList); + udaInitPutDataBlockList(&request->putDataBlockList); if (request->put) { err = protocol_.recv_putdata_block_list(&request->putDataBlockList, log_malloc_list_, @@ -828,7 +828,7 @@ void uda::Server::handshake_client() { // Exchange version details - once only - initClientBlock(&client_block_, 0, ""); + udaInitClientBlock(&client_block_, 0, ""); // Receive the client block, respecting earlier protocol versions diff --git a/source/server2/server_plugin.cpp b/source/server2/server_plugin.cpp index 31961760..15203fcf 100644 --- a/source/server2/server_plugin.cpp +++ b/source/server2/server_plugin.cpp @@ -292,7 +292,7 @@ int uda::provenancePlugin(ClientBlock* client_block, RequestData* original_reque } RequestData request = {}; - initRequestData(&request); + udaInitRequestData(&request); strcpy(request.api_delim, "::"); strcpy(request.source, ""); @@ -326,7 +326,7 @@ int uda::provenancePlugin(ClientBlock* client_block, RequestData* original_reque // Initialise the Data Block - initDataBlock(&data_block); + udaInitDataBlock(&data_block); UDA_LOG(UDA_LOG_DEBUG, "Creating plugin interface\n"); @@ -482,7 +482,7 @@ int uda::call_metadata_plugin(const PluginData& plugin, RequestData* request_blo } DataBlock data_block = {}; - initDataBlock(&data_block); + udaInitDataBlock(&data_block); data_block.signal_rec = &metadata.signal_rec; UserDefinedTypeList userdefinedtypelist = {}; diff --git a/source/server2/server_subset_data.cpp b/source/server2/server_subset_data.cpp index 83393b56..87ebf19d 100644 --- a/source/server2/server_subset_data.cpp +++ b/source/server2/server_subset_data.cpp @@ -344,7 +344,7 @@ int uda::serverSubsetData(DATA_BLOCK* data_block, ACTION action, LOGMALLOCLIST* data_block->dims = (DIMS*)realloc((void*)data_block->dims, rank * sizeof(DIMS)); for (int k = k0; k < rank; k++) { - initDimBlock(&data_block->dims[k]); + udaInitDimBlock(&data_block->dims[k]); if (shape == nullptr) { data_block->dims[k].dim_n = data_n; } else { @@ -367,7 +367,7 @@ int uda::serverSubsetData(DATA_BLOCK* data_block, ACTION action, LOGMALLOCLIST* (DIMS*)realloc((void*)data_block->dims, data_block->rank * sizeof(DIMS)); for (unsigned int k = k0; k < data_block->rank; k++) { - initDimBlock(&data_block->dims[k]); + udaInitDimBlock(&data_block->dims[k]); data_block->dims[k].dim_n = udt->compoundfield[i].shape[k - k0]; data_block->dims[k].data_type = UDA_TYPE_UNSIGNED_INT; data_block->dims[k].compressed = 1; @@ -414,7 +414,7 @@ int uda::serverSubsetData(DATA_BLOCK* data_block, ACTION action, LOGMALLOCLIST* //---------------------------------------------------------------------------------------------------------------------------- // Decompress the dimensional data if necessary & free Heap Associated with Compression - initDimBlock(&newdim); // Holder for the Subsetted Dimension (part copy of the original) + udaInitDimBlock(&newdim); // Holder for the Subsetted Dimension (part copy of the original) dim = &(data_block->dims[dimid]); // the original dimension to be subset @@ -891,7 +891,7 @@ int uda::serverSubsetData(DATA_BLOCK* data_block, ACTION action, LOGMALLOCLIST* if (p1 == nullptr) { count[0] = (unsigned int)data_block->data_n; freeDataBlock(data_block); - initDataBlock(data_block); + udaInitDataBlock(data_block); data_block->data_n = 1; data_block->data = (char*)count; data_block->data_type = UDA_TYPE_UNSIGNED_INT; diff --git a/source/wrappers/c++/client.cpp b/source/wrappers/c++/client.cpp index bdd81aac..05052d4f 100644 --- a/source/wrappers/c++/client.cpp +++ b/source/wrappers/c++/client.cpp @@ -377,7 +377,7 @@ void uda::Client::put(const uda::Signal& signal) udaPutAPI(request.c_str(), nullptr); PUTDATA_BLOCK pdblock{}; - initIdamPutDataBlock(&pdblock); + udaInitPutDataBlock(&pdblock); const uda::Array& array = signal.array(); @@ -396,7 +396,7 @@ void uda::Client::put(const uda::Signal& signal) template void put_scalar(const std::string& instruction, T data) { PUTDATA_BLOCK putdata_block{}; - initIdamPutDataBlock(&putdata_block); + udaInitPutDataBlock(&putdata_block); putdata_block.data_type = typeIDToUDAType(typeid(T)); putdata_block.rank = 0; @@ -461,7 +461,7 @@ void uda::Client::put(const std::string& instruction, double data) template void put_vector(const std::string& instruction, const std::vector& data) { PUTDATA_BLOCK putdata_block{}; - initIdamPutDataBlock(&putdata_block); + udaInitPutDataBlock(&putdata_block); putdata_block.data_type = typeIDToUDAType(typeid(T)); putdata_block.rank = 1; @@ -540,7 +540,7 @@ void uda::Client::put(const std::string& instruction, const uda::Array& data) }; PUTDATA_BLOCK putdata_block{}; - initIdamPutDataBlock(&putdata_block); + udaInitPutDataBlock(&putdata_block); putdata_block.data_type = typeIDToUDAType(data.type()); putdata_block.rank = static_cast(data.dims().size()); diff --git a/source/wrappers/idl/idam_dlm.c b/source/wrappers/idl/idam_dlm.c index 5a16c0c8..fd5e6e72 100755 --- a/source/wrappers/idl/idam_dlm.c +++ b/source/wrappers/idl/idam_dlm.c @@ -743,10 +743,10 @@ IDL_VPTR IDL_CDECL idamputapi(int argc, IDL_VPTR argv[], char* argk) // Array?, data[] PUTDATA_BLOCK putData; - initIdamPutDataBlock(&putData); + udaInitPutDataBlock(&putData); PUTDATA_BLOCK_LIST putDataBlockList; - initPutDataBlockList(&putDataBlockList); + udaInitPutDataBlockList(&putDataBlockList); int rank = 0, count = 0; int type = IDL_TYP_UNDEF; diff --git a/source/wrappers/python/pyuda/cpyuda/capnp_tree.pyx b/source/wrappers/python/pyuda/cpyuda/capnp_tree.pyx index a7abba8d..e35434a6 100644 --- a/source/wrappers/python/pyuda/cpyuda/capnp_tree.pyx +++ b/source/wrappers/python/pyuda/cpyuda/capnp_tree.pyx @@ -29,8 +29,8 @@ cdef class CapnpTreeNode: tree_node = CapnpTreeNode() tree_node._handle = handle if tree == NULL: - data = uda.getIdamData(int(handle)) - num = uda.getIdamDataNum(int(handle)) + data = uda.udaGetData(int(handle)) + num = uda.udaGetDataNum(int(handle)) tree_node._tree = uda.uda_capnp_deserialise(data, num) tree_node._node = uda.uda_capnp_read_root(tree_node._tree) else: diff --git a/source/wrappers/python/pyuda/cpyuda/client.pyx b/source/wrappers/python/pyuda/cpyuda/client.pyx index 098f9659..e3c9e87f 100644 --- a/source/wrappers/python/pyuda/cpyuda/client.pyx +++ b/source/wrappers/python/pyuda/cpyuda/client.pyx @@ -42,17 +42,17 @@ def set_property(prop_name, value): raise ValueError('invalid property ' + prop_name) if _properties[prop_name][1]: prop_string = prop_name + '=' + str(value) - uda.setIdamProperty(prop_string.encode()) + uda.udaSetProperty(prop_string.encode()) elif value: - uda.setIdamProperty(prop_name.encode()) + uda.udaSetProperty(prop_name.encode()) else: - uda.resetIdamProperty(prop_name.encode()) + uda.udaResetProperty(prop_name.encode()) def get_property(prop_name): if prop_name.lower() not in _properties: raise ValueError('invalid property ' + prop_name) - prop = uda.getIdamProperty(prop_name.encode()) + prop = uda.udaGetProperty(prop_name.encode()) if _properties[prop_name][1]: return prop else: @@ -60,11 +60,11 @@ def get_property(prop_name): def get_server_host_name(): - return uda.getIdamServerHost().decode() + return uda.udaGetServerHost().decode() def get_server_port(): - return uda.getIdamServerPort() + return uda.udaGetServerPort() def get_build_version(): @@ -76,24 +76,24 @@ def get_build_date(): def set_server_host_name(host_name): - uda.putIdamServerHost(host_name.encode()) + uda.udaPutServerHost(host_name.encode()) def set_server_port(port): - uda.putIdamServerPort(port) + uda.udaPutServerPort(port) def close_connection(): - uda.closeAllConnections() + uda.udaCloseAllConnections() def get_data(signal, source): - handle = uda.idamGetAPI(signal.encode(), source.encode()) + handle = uda.udaGetAPI(signal.encode(), source.encode()) cdef const char* err_msg cdef int err_code if handle < 0: - err_msg = uda.getIdamErrorMsg(handle) - err_code = uda.getIdamErrorCode(handle) + err_msg = uda.udaGetErrorMsg(handle) + err_code = uda.udaGetErrorCode(handle) if err_msg == NULL or string.strlen(err_msg) == 0: raise UDAException("unknown error occured") elif err_code < 0: @@ -119,10 +119,10 @@ def get_data_batch(signals, sources): bytes = source.encode() source_bytes.append(bytes) sources_array[i] = bytes - rc = uda.idamGetBatchAPI(signals_array, sources_array, len(signals), handles) + rc = uda.udaGetBatchAPI(signals_array, sources_array, len(signals), handles) if rc < 0: - err_msg = uda.getIdamErrorMsg(rc) - err_code = uda.getIdamErrorCode(rc) + err_msg = uda.udaGetErrorMsg(rc) + err_code = uda.udaGetErrorCode(rc) if err_msg == NULL or string.strlen(err_msg) == 0: raise UDAException("unknown error occured") elif err_code < 0: @@ -140,7 +140,7 @@ def get_data_batch(signals, sources): cdef put_nothing(const char* instruction): - cdef int handle = uda.idamPutAPI(instruction, NULL) + cdef int handle = uda.udaPutAPI(instruction, NULL) return Result(Handle(handle)) @@ -203,7 +203,7 @@ cdef put_ndarray_string(const char* instruction, np.ndarray data): raise UDAException("String arrays with more than 1 dimension are not supported for putting to the server") cdef uda.PUTDATA_BLOCK put_data - uda.initIdamPutDataBlock(&put_data) + uda.udaInitPutDataBlock(&put_data) cdef np.npy_intp* shape = np.PyArray_DIMS(data) cdef int size = data.dtype.itemsize @@ -227,14 +227,14 @@ cdef put_ndarray_string(const char* instruction, np.ndarray data): put_string = bytearray(fixed_len_array).decode().encode() put_data.data = put_string - cdef int handle = uda.idamPutAPI(instruction, &put_data) + cdef int handle = uda.udaPutAPI(instruction, &put_data) free(put_data.shape) return Result(Handle(handle)) cdef put_ndarray(const char* instruction, np.ndarray data): cdef uda.PUTDATA_BLOCK put_data - uda.initIdamPutDataBlock(&put_data) + uda.udaInitPutDataBlock(&put_data) cdef int rank = np.PyArray_NDIM(data) cdef np.npy_intp* shape = np.PyArray_DIMS(data) @@ -250,14 +250,14 @@ cdef put_ndarray(const char* instruction, np.ndarray data): i += 1 put_data.data = np.PyArray_BYTES(data) - cdef int handle = uda.idamPutAPI(instruction, &put_data) + cdef int handle = uda.udaPutAPI(instruction, &put_data) free(put_data.shape) return Result(Handle(handle)) cdef put_scalar(const char* instruction, object data): cdef uda.PUTDATA_BLOCK put_data - uda.initIdamPutDataBlock(&put_data) + uda.udaInitPutDataBlock(&put_data) cdef np.dtype type = np.PyArray_DescrFromScalar(data) cdef char* bytes = malloc(type.itemsize) @@ -269,14 +269,14 @@ cdef put_scalar(const char* instruction, object data): put_data.shape = NULL put_data.data = bytes - cdef int handle = uda.idamPutAPI(instruction, &put_data) + cdef int handle = uda.udaPutAPI(instruction, &put_data) free(bytes) return Result(Handle(handle)) cdef put_string(const char* instruction, const char* data): cdef uda.PUTDATA_BLOCK put_data - uda.initIdamPutDataBlock(&put_data) + uda.udaInitPutDataBlock(&put_data) cdef int string_length = strlen(data) @@ -286,7 +286,7 @@ cdef put_string(const char* instruction, const char* data): put_data.shape = NULL put_data.data = data - cdef int handle = uda.idamPutAPI(instruction, &put_data) + cdef int handle = uda.udaPutAPI(instruction, &put_data) return Result(Handle(handle)) diff --git a/source/wrappers/python/pyuda/cpyuda/dim.pyx b/source/wrappers/python/pyuda/cpyuda/dim.pyx index 7a207705..374397f9 100644 --- a/source/wrappers/python/pyuda/cpyuda/dim.pyx +++ b/source/wrappers/python/pyuda/cpyuda/dim.pyx @@ -19,35 +19,35 @@ cdef class Dim: self._data_type = data_type def label(self): - cdef const char* label = uda.getIdamDimLabel(int(self._handle), self._num) + cdef const char* label = uda.udaGetDimLabel(int(self._handle), self._num) return label.decode(errors='replace') def units(self): - cdef const char* units = uda.getIdamDimUnits(int(self._handle), self._num) + cdef const char* units = uda.udaGetDimUnits(int(self._handle), self._num) return units.decode(errors='replace') cdef int _size(self): - cdef int size = uda.getIdamDimNum(int(self._handle), self._num) + cdef int size = uda.udaGetDimNum(int(self._handle), self._num) return size cdef int _type(self): - cdef int type = uda.getIdamDimType(int(self._handle), self._num) + cdef int type = uda.udaGetDimType(int(self._handle), self._num) return type def type(self): cdef int type if self._data_type == DataType.DATA: - type = uda.getIdamDimType(int(self._handle), self._num) + type = uda.udaGetDimType(int(self._handle), self._num) else: - type = uda.getIdamDimErrorType(int(self._handle), self._num) + type = uda.udaGetDimErrorType(int(self._handle), self._num) return type cdef const char* _data(self): cdef const char* data if self._data_type == DataType.DATA: - data = uda.getIdamDimData(int(self._handle), self._num) + data = uda.udaGetDimData(int(self._handle), self._num) else: - data = uda.getIdamDimError(int(self._handle), self._num) + data = uda.udaGetDimError(int(self._handle), self._num) return data def data(self): diff --git a/source/wrappers/python/pyuda/cpyuda/result.pyx b/source/wrappers/python/pyuda/cpyuda/result.pyx index ca874e54..ff147cd9 100644 --- a/source/wrappers/python/pyuda/cpyuda/result.pyx +++ b/source/wrappers/python/pyuda/cpyuda/result.pyx @@ -19,16 +19,16 @@ cdef class Result: def __init__(self, Handle handle): self._handle = handle - self._is_tree = 1 if uda.setIdamDataTree(int(handle)) != 0 else 0 + self._is_tree = 1 if uda.udaSetDataTree(int(handle)) != 0 else 0 cdef uda.SIGNAL_DESC* signal_desc cdef uda.DATA_SOURCE* source self._meta = {} - if int(handle) >= 0 and uda.getIdamProperties(int(handle)).get_meta: - signal_desc = uda.getIdamSignalDesc(int(handle)) + if int(handle) >= 0 and uda.udaGetProperties(int(handle)).get_meta: + signal_desc = uda.udaGetSignalDesc(int(handle)) self._meta["signal_name"] = signal_desc.signal_name self._meta["signal_alias"] = signal_desc.signal_alias - source = uda.getIdamDataSource(int(handle)) + source = uda.udaGetDataSource(int(handle)) self._meta["path"] = source.path self._meta["filename"] = source.filename self._meta["format"] = source.format @@ -37,33 +37,33 @@ cdef class Result: self._meta["pass_date"] = source.pass_date def error_message(self): - return uda.getIdamErrorMsg(int(self._handle)) + return uda.udaGetErrorMsg(int(self._handle)) def error_code(self): - return uda.getIdamErrorCode(int(self._handle)) + return uda.udaGetErrorCode(int(self._handle)) def rank(self): - cdef int rank = uda.getIdamRank(int(self._handle)) + cdef int rank = uda.udaGetRank(int(self._handle)) return rank cdef int _size(self): - cdef int size = uda.getIdamDataNum(int(self._handle)) + cdef int size = uda.udaGetDataNum(int(self._handle)) return size cdef int _type(self, int data_type): cdef int type if data_type == DataType.DATA: - type = uda.getIdamDataType(int(self._handle)) + type = uda.udaGetDataType(int(self._handle)) else: - type = uda.getIdamErrorType(int(self._handle)) + type = uda.udaGetErrorType(int(self._handle)) return type def is_string(self): - cdef int type = uda.getIdamDataType(int(self._handle)) + cdef int type = uda.udaGetDataType(int(self._handle)) return type == 17 def is_capnp(self): - cdef int type = uda.getIdamDataType(int(self._handle)) + cdef int type = uda.udaGetDataType(int(self._handle)) IF CAPNP: return type == 22 ELSE: @@ -80,16 +80,16 @@ cdef class Result: cdef const char* _get_data(self, int data_type): cdef const char* data if data_type == DataType.DATA: - data = uda.getIdamData(int(self._handle)) + data = uda.udaGetData(int(self._handle)) else: - data = uda.getIdamError(int(self._handle)) + data = uda.udaGetError(int(self._handle)) return data cdef _data(self, int data_type): cdef const char* data = self._get_data(data_type) cdef int size cdef int type = self._type(data_type) - cdef int rank = uda.getIdamRank(int(self._handle)) + cdef int rank = uda.udaGetRank(int(self._handle)) cdef int i cdef np.npy_intp shape[1024] if rank == 0: @@ -97,7 +97,7 @@ cdef class Result: shape[0] = size else: for i in range(rank): - size = uda.getIdamDimNum(int(self._handle), rank - 1 - i) + size = uda.udaGetDimNum(int(self._handle), rank - 1 - i) shape[i] = size arr = to_python_i(type, rank, shape, data) if isinstance(arr, np.ndarray): @@ -112,19 +112,19 @@ cdef class Result: return self._data(DataType.ERRORS) def label(self): - return uda.getIdamDataLabel(int(self._handle)).decode(errors='replace') if int(self._handle) >= 0 else "" + return uda.udaGetDataLabel(int(self._handle)).decode(errors='replace') if int(self._handle) >= 0 else "" def units(self): - return uda.getIdamDataUnits(int(self._handle)).decode(errors='replace') if int(self._handle) >= 0 else "" + return uda.udaGetDataUnits(int(self._handle)).decode(errors='replace') if int(self._handle) >= 0 else "" def description(self): - return uda.getIdamDataDesc(int(self._handle)).decode(errors='replace') if int(self._handle) >= 0 else "" + return uda.udaGetDataDesc(int(self._handle)).decode(errors='replace') if int(self._handle) >= 0 else "" def shape(self): - cdef int rank = uda.getIdamRank(int(self._handle)) + cdef int rank = uda.udaGetRank(int(self._handle)) shape = numpy.zeros(rank, dtype=numpy.int32) for i in range(rank): - shape[i] = uda.getIdamDimNum(int(self._handle), rank - 1 - i) + shape[i] = uda.udaGetDimNum(int(self._handle), rank - 1 - i) return shape def dim(self, num, data_type): @@ -134,20 +134,20 @@ cdef class Result: return bool(self._is_tree) def tree(self): - cdef uda.NTREE* root = uda.getIdamDataTree(int(self._handle)) + cdef uda.NTREE* root = uda.udaGetDataTree(int(self._handle)) return TreeNode.new_(self._handle, root) def meta(self): return self._meta def has_time_dim(self): - cdef int order = uda.getIdamOrder(int(self._handle)) + cdef int order = uda.udaGetOrder(int(self._handle)) return order >= 0 def time_order(self): - cdef int order = uda.getIdamOrder(int(self._handle)) + cdef int order = uda.udaGetOrder(int(self._handle)) return order def time_dim(self, data_type): - cdef int order = uda.getIdamOrder(int(self._handle)) + cdef int order = uda.udaGetOrder(int(self._handle)) return Dim(self._handle, order, data_type) diff --git a/source/wrappers/python/pyuda/cpyuda/tree_node.pyx b/source/wrappers/python/pyuda/cpyuda/tree_node.pyx index 6a5285f5..c112bf0d 100644 --- a/source/wrappers/python/pyuda/cpyuda/tree_node.pyx +++ b/source/wrappers/python/pyuda/cpyuda/tree_node.pyx @@ -29,10 +29,10 @@ cdef class TreeNode: return tree_node def _load_children(self): - cdef int num_children = uda.getNodeChildrenCount(self._node) + cdef int num_children = uda.udaGetNodeChildrenCount(self._node) cdef uda.NTREE* child for i in range(num_children): - child = uda.getNodeChild(self._node, i) + child = uda.udaGetNodeChild(self._node, i) self._children.append(TreeNode.new_(self._handle, child)) def children(self): @@ -42,15 +42,15 @@ cdef class TreeNode: return self._children def name(self): - cdef const char* name = uda.getNodeStructureName(self._node) + cdef const char* name = uda.udaGetNodeStructureName(self._node) return name.decode() if name is not NULL else "" cdef _load_atomic_data(self, int idx, uda.LOGMALLOCLIST* logmalloclist): - cdef const char** anames = uda.getNodeAtomicNames(logmalloclist, self._node) - cdef const char** atypes = uda.getNodeAtomicTypes(logmalloclist, self._node) - cdef int* apoint = uda.getNodeAtomicPointers(logmalloclist, self._node) - cdef int* arank = uda.getNodeAtomicRank(logmalloclist, self._node) - cdef int** ashape = uda.getNodeAtomicShape(logmalloclist, self._node) + cdef const char** anames = uda.udaGetNodeAtomicNames(logmalloclist, self._node) + cdef const char** atypes = uda.udaGetNodeAtomicTypes(logmalloclist, self._node) + cdef int* apoint = uda.udaGetNodeAtomicPointers(logmalloclist, self._node) + cdef int* arank = uda.udaGetNodeAtomicRank(logmalloclist, self._node) + cdef int** ashape = uda.udaGetNodeAtomicShape(logmalloclist, self._node) cdef const char* name = anames[idx] cdef const char* type = atypes[idx] @@ -58,14 +58,14 @@ cdef class TreeNode: cdef int rank = arank[idx] cdef int* shape = ashape[idx] - cdef void* data = uda.getNodeStructureComponentData(logmalloclist, self._node, name) + cdef void* data = uda.udaGetNodeStructureComponentData(logmalloclist, self._node, name) return to_python_c(type, rank, shape, point, data, self._handle) cdef _import_data(self): - cdef uda.LOGMALLOCLIST* logmalloclist = uda.getIdamLogMallocList(self._handle) - cdef const char** anames = uda.getNodeAtomicNames(logmalloclist, self._node) + cdef uda.LOGMALLOCLIST* logmalloclist = uda.udaGetLogMallocList(self._handle) + cdef const char** anames = uda.udaGetNodeAtomicNames(logmalloclist, self._node) - cdef int size = uda.getNodeAtomicCount(self._node) + cdef int size = uda.udaGetNodeAtomicCount(self._node) cdef int i cdef const char* name diff --git a/source/wrappers/python/pyuda/cpyuda/uda.pxd b/source/wrappers/python/pyuda/cpyuda/uda.pxd index 802467c8..7c30162d 100644 --- a/source/wrappers/python/pyuda/cpyuda/uda.pxd +++ b/source/wrappers/python/pyuda/cpyuda/uda.pxd @@ -1,19 +1,19 @@ from libcpp cimport bool as cbool cdef extern from "client.h": - const char* getIdamServerHost(); - int getIdamServerPort(); + const char* udaGetServerHost(); + int udaGetServerPort(); const char* udaGetBuildVersion(); const char* udaGetBuildDate(); void udaFree(int handle); CLIENT_FLAGS* udaClientFlags(); - void closeAllConnections(); + void udaCloseAllConnections(); ctypedef struct CLIENT_FLAGS cdef extern from "udaGetAPI.h": - int idamGetAPI(const char* data_object, const char* data_source); - int idamGetBatchAPI(const char** signals, const char** sources, int count, int* handles); + int udaGetAPI(const char* data_object, const char* data_source); + int udaGetBatchAPI(const char** signals, const char** sources, int count, int* handles); cdef extern from "genStructs.h": ctypedef struct NTREE: # N-ary Tree linking all related user defined data structures: definitions and data @@ -106,56 +106,56 @@ cdef extern from "udaStructs.h": PUTDATA_BLOCK* putDataBlock; # Array of data blocks cdef extern from "accAPI.h": - char* getIdamData(int handle); - char* getIdamError(int handle); - int getIdamDataNum(int handle); - int getIdamDataType(int handle); - int getIdamErrorType(int handle); - void putIdamServerHost(const char* host); - void putIdamServerPort(int port); - int getIdamProperty(const char* property, const CLIENT_FLAGS* client_flags) - void setIdamProperty(const char* property, CLIENT_FLAGS* client_flags); - void resetIdamProperty(const char* property, CLIENT_FLAGS* client_flags); - const char* getIdamDataLabel(int handle); - const char* getIdamDataUnits(int handle); - const char* getIdamDataDesc(int handle); - int getIdamRank(int handle); - int getIdamDimNum(int handle, int ndim); - int getIdamDimType(int handle, int ndim); - int getIdamDimErrorType(int handle, int ndim); - const char* getIdamDimLabel(int handle, int ndim); - const char* getIdamDimUnits(int handle, int ndim); - char* getIdamDimData(int handle, int ndim); - char* getIdamDimError(int handle, int ndim); - DATA_SOURCE* getIdamDataSource(int handle); - SIGNAL_DESC* getIdamSignalDesc(int handle); - int setIdamDataTree(int handle); - CLIENT_BLOCK* getIdamProperties(int handle); - const char* getIdamErrorMsg(int handle); - int getIdamErrorCode(int handle); - int getIdamOrder(int handle); - NTREE* getIdamDataTree(int handle); - LOGMALLOCLIST* getIdamLogMallocList(int handle); + char* udaGetData(int handle); + char* udaGetError(int handle); + int udaGetDataNum(int handle); + int udaGetDataType(int handle); + int udaGetErrorType(int handle); + void udaPutServerHost(const char* host); + void udaPutServerPort(int port); + int udaGetProperty(const char* property) + void udaSetProperty(const char* property); + void udaResetProperty(const char* property); + const char* udaGetDataLabel(int handle); + const char* udaGetDataUnits(int handle); + const char* udaGetDataDesc(int handle); + int udaGetRank(int handle); + int udaGetDimNum(int handle, int ndim); + int udaGetDimType(int handle, int ndim); + int udaGetDimErrorType(int handle, int ndim); + const char* udaGetDimLabel(int handle, int ndim); + const char* udaGetDimUnits(int handle, int ndim); + char* udaGetDimData(int handle, int ndim); + char* udaGetDimError(int handle, int ndim); + DATA_SOURCE* udaGetDataSource(int handle); + SIGNAL_DESC* udaGetSignalDesc(int handle); + int udaSetDataTree(int handle); + CLIENT_BLOCK* udaGetProperties(int handle); + const char* udaGetErrorMsg(int handle); + int udaGetErrorCode(int handle); + int udaGetOrder(int handle); + NTREE* udaGetDataTree(int handle); + LOGMALLOCLIST* udaGetLogMallocList(int handle); cdef extern from "initStructs.h": - void initIdamPutDataBlock(PUTDATA_BLOCK* str); - void initPutDataBlockList(PUTDATA_BLOCK_LIST* putDataBlockList); + void udaInitPutDataBlock(PUTDATA_BLOCK* str); + void udaInitPutDataBlockList(PUTDATA_BLOCK_LIST* putDataBlockList); cdef extern from "udaPutAPI.h": - int idamPutAPI(const char* putInstruction, PUTDATA_BLOCK* inPutData); + int udaPutAPI(const char* putInstruction, PUTDATA_BLOCK* inPutData); cdef extern from "struct.h": - int getNodeChildrenCount(NTREE* ntree); - NTREE* getNodeChild(NTREE* ntree, int child); - char* getNodeStructureName(NTREE* ntree); - int getNodeAtomicCount(NTREE* ntree); - char** getNodeAtomicNames(LOGMALLOCLIST* logmalloclist, NTREE* ntree); - char** getNodeStructureTypes(LOGMALLOCLIST* logmalloclist, NTREE* ntree); - char** getNodeAtomicTypes(LOGMALLOCLIST* logmalloclist, NTREE* ntree); - int* getNodeAtomicPointers(LOGMALLOCLIST* logmalloclist, NTREE* ntree); - int* getNodeAtomicRank(LOGMALLOCLIST* logmalloclist, NTREE* ntree); - int** getNodeAtomicShape(LOGMALLOCLIST* logmalloclist, NTREE* ntree); - void* getNodeStructureComponentData(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target); + int udaGetNodeChildrenCount(NTREE* ntree); + NTREE* udaGetNodeChild(NTREE* ntree, int child); + char* udaGetNodeStructureName(NTREE* ntree); + int udaGetNodeAtomicCount(NTREE* ntree); + char** udaGetNodeAtomicNames(LOGMALLOCLIST* logmalloclist, NTREE* ntree); + char** udaGetNodeStructureTypes(LOGMALLOCLIST* logmalloclist, NTREE* ntree); + char** udaGetNodeAtomicTypes(LOGMALLOCLIST* logmalloclist, NTREE* ntree); + int* udaGetNodeAtomicPointers(LOGMALLOCLIST* logmalloclist, NTREE* ntree); + int* udaGetNodeAtomicRank(LOGMALLOCLIST* logmalloclist, NTREE* ntree); + int** udaGetNodeAtomicShape(LOGMALLOCLIST* logmalloclist, NTREE* ntree); + void* udaGetNodeStructureComponentData(LOGMALLOCLIST* logmalloclist, NTREE* ntree, const char* target); IF CAPNP: cdef extern from "serialisation/capnp_serialisation.h":