From 02b88d8d028ec3c66be5d558c777caac4dfac2da Mon Sep 17 00:00:00 2001 From: Arnaud Blanchard <arnaud.blanchard@ensea.fr> Date: Fri, 15 Oct 2021 01:49:20 +0200 Subject: [PATCH] Simplify C interfce --- CMakeLists.txt | 2 +- include/blc_channel.h | 140 +++++++++-------- src/channel/channel_file.cpp | 295 ----------------------------------- src/channel/channel_file.h | 30 ---- 4 files changed, 77 insertions(+), 390 deletions(-) delete mode 100644 src/channel/channel_file.cpp delete mode 100644 src/channel/channel_file.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c30d31..c3e4268 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ find_package(JPEG) find_package(PNG) add_library(objlib OBJECT - src/channel/blc_channel.cpp src/channel/channel_file.cpp + src/channel/blc_channel.cpp src/channel/c_blc_channel.cpp src/core/blc_array.cpp src/core/c_blc_array.cpp src/core/blc_mem.cpp src/core/blc_realtime.cpp src/core/blc_text.cpp src/core/blc_tools.cpp src/image/blc_image.cpp src/image/jpeg_tools.cpp src/network/blc_array_tcp4_client.cpp src/network/blc_array_tcp4_server.cpp src/network/c_blc_array_tcp4_server.cpp diff --git a/include/blc_channel.h b/include/blc_channel.h index 8143f34..b836b06 100644 --- a/include/blc_channel.h +++ b/include/blc_channel.h @@ -72,7 +72,6 @@ typedef struct blc_channel ///Constructor creating or opening the channel if it exist. In this case it has to be compatible with its properties. blc_channel(char const *new_name, int mode, uint32_t type, uint32_t format, int dims_nb, blc_dim const dims[BLC_ARRAY_DIMS_MAX]); - //Warning copying channel with data, the new data is not mapped anymore blc_channel(blc_channel const &channel); blc_channel(blc_channel &&channel); @@ -165,75 +164,88 @@ typedef struct blc_channel - START_EXTERN_C - - /** Wait until new data is available - We use void * to make it ablle to be use in callback*/ - void blc_channel_wait_new_data(void *channel); - - /** Wait until sommeone has read and acknoledged the data. - We use void * to make it ablle to be use in callback*/ - void blc_channel_wait_ack_data(void *channel); - - /** Indicates that new data is available - We use void * to make it ablle to be use in callback*/ - void blc_channel_post_new_data(void *channel); - - /** Indicates the data has been read. - We use void * to make it ablle to be use in callback*/ - void blc_channel_post_ack_data(void *channel); +START_EXTERN_C - - /**Used by EXIT_ON_CHANNEL_ERROR*/ - void blc_channel_fatal_error(blc_channel *channel, const char *name_of_file, const char* name_of_function, int numero_of_line, const char *message, ...); - /**Create a blc_channel with the name, the mode is BLC_CHANNEL_READ or BLC_CHANNEL_WRITE, the type of data UIN8, INT8, UI16, IN16, FL32, FL64. ( default 0:UIN8), - The format are four chars user defined but usually describe the image format 'Y800' (for grey), 'RGB3', 'YUV2' ,...,. - Dims_nb is the number of dimenssions of the data ( 1 for a vector). - The following values are the the length of each dims. You must have the same number of length than dims_nb*/ - - - ///Alllocate and create blc_channel - blc_channel *blc_channel_new( const char *name, int mode, uint32_t type, uint32_t format, int dims_nb, int length0, ...); - - ///Destroys and free a blc_channel - void blc_channel_delete(blc_channel *channel); - - ///Return type as a text i.e. 'UIN8' - uint32_t blc_channel_get_type(blc_channel *channel); - - ///Return type as a text i.e. 'RGB3' - uint32_t blc_channel_get_format(blc_channel *channel); +/** Wait until new data is available + We use void * to make it ablle to be use in callback*/ +void blc_channel_wait_new_data(void *channel); +/** Wait until sommeone has read and acknoledged the data. + We use void * to make it ablle to be use in callback*/ +void blc_channel_wait_ack_data(void *channel); - ///Returns a pointer to data - void *blc_channel_get_data(blc_channel *channel); - - int blc_channel_get_dims_nb(blc_channel *channel); - - blc_dim *blc_channel_get_dims(blc_channel *channel); - - void blc_channel_create(blc_channel* channel, const char *name, int mode, uint32_t type, uint32_t format, int dims_nb, int length0, ...); - /**Open an exisiting channel 'name' */ - void blc_channel_open(blc_channel* channel, const char *name, int mode); - /**Open an exisiting channel 'name' or create it if it does not exist */ - void blc_channel_create_or_open(blc_channel *channel, const char *name, int mode, uint32_t type, uint32_t format, int dims_nb, int length0, ...); - /** Close the channel and unlink the shared memory. No new process can use it.*/ - int blc_channel_remove(blc_channel *channel); - /** Allocate (need to be free) and give the array of existing shared memory files on the system.*/ - int blc_channel_get_all_infos(blc_channel **channels_infos); - /** Allocate (need to be free) and give the array of existing shared memory files on the system.*/ - int blc_channel_get_all_infos_with_filter(blc_channel **channels_infos, char const *start_name_filter); - ///Retrieve the informations about a channel if it is known and return the id. Otherwise, return -1. You need to free .dims, which is allocated to contain the list of blc_dims. - int blc_channel_get_info_with_name(blc_channel *info, char const *name); +/** Indicates that new data is available + We use void * to make it ablle to be use in callback*/ +void blc_channel_post_new_data(void *channel); +/** Indicates the data has been read. + We use void * to make it ablle to be use in callback*/ +void blc_channel_post_ack_data(void *channel); - - ///Remove the blc_channel **name**. The other processes using it will still work but no new ones can use it. - void blc_remove_channel_with_name(char const *name); - void blc_channel_post_event(); - void blc_channel_check_for_event(void (*callback)(void*user_data), void *user_data); - END_EXTERN_C +/**Used by EXIT_ON_CHANNEL_ERROR*/ + void blc_channel_fatal_error(blc_channel *channel, const char *name_of_file, const char* name_of_function, int numero_of_line, const char *message, ...); +/**Create a blc_channel with the name, the mode is BLC_CHANNEL_READ or BLC_CHANNEL_WRITE, the type of data UIN8, INT8, UI16, IN16, FL32, FL64. ( default 0:UIN8), + The format are four chars user defined but usually describe the image format 'Y800' (for grey), 'RGB3', 'YUV2' ,...,. + Dims_nb is the number of dimenssions of the data ( 1 for a vector). + The following values are the the length of each dims. You must have the same number of length than dims_nb*/ + +///Alllocate and create blc_channel +blc_channel *blc_channel_new( const char *name, int mode, uint32_t type, uint32_t format, int dims_nb, int length0, ...); + +///Destroys and free a blc_channel +void blc_channel_delete(blc_channel *channel); + +void blc_channel_create(blc_channel* channel, const char *name, int mode, uint32_t type, uint32_t format, int dims_nb, int length0, ...); +/**Open an exisiting channel 'name' */ +void blc_channel_open(blc_channel* channel, const char *name, int mode); +/**Open an exisiting channel 'name' or create it if it does not exist */ +void blc_channel_create_or_open(blc_channel *channel, const char *name, int mode, uint32_t type, uint32_t format, int dims_nb, int length0, ...); +/** Close the channel and unlink the shared memory. No new process can use it.*/ +int blc_channel_remove(blc_channel *channel); +/** Allocate (need to be free) and give the array of existing shared memory files on the system.*/ +int blc_channel_get_all_infos(blc_channel **channels_infos); +/** Allocate (need to be free) and give the array of existing shared memory files on the system.*/ +int blc_channel_get_all_infos_with_filter(blc_channel **channels_infos, char const *start_name_filter); +///Retrieve the informations about a channel if it is known and return the id. Otherwise, return -1. You need to free .dims, which is allocated to contain the list of blc_dims. +int blc_channel_get_info_with_name(blc_channel *info, char const *name); + + +///Remove the blc_channel **name**. The other processes using it will still work but no new ones can use it. +void blc_remove_channel_with_name(char const *name); +void blc_channel_post_event(); +void blc_channel_check_for_event(void (*callback)(void*user_data), void *user_data); + +/**Used by EXIT_ON_CHANNEL_ERROR*/ +void blc_channel_fatal_error(blc_channel *channel, const char *name_of_file, const char* name_of_function, int numero_of_line, const char *message, ...); + +/**Create a blc_channel with the name, the mode is BLC_CHANNEL_READ or BLC_CHANNEL_WRITE, the type of data UIN8, INT8, UI16, IN16, FL32, FL64. ( default 0:UIN8), + The format are four chars user defined but usually describe the image format 'Y800' (for grey), 'RGB3', 'YUV2' ,...,. + Dims_nb is the number of dimenssions of the data ( 1 for a vector). + The following values are the the length of each dims. You must have the same number of length than dims_nb*/ +void blc_channel_create(blc_channel* channel, const char *name, int mode, uint32_t type, uint32_t format, int dims_nb, int length0, ...); + +/**Open an exisiting channel 'name' */ +void blc_channel_open(blc_channel* channel, const char *name, int mode); + +/**Open an exisiting channel 'name' or create it if it does not exist */ +void blc_channel_create_or_open(blc_channel *channel, const char *name, int mode, uint32_t type, uint32_t format, int dims_nb, int length0, ...); + +/** Close the channel and unlink the shared memory. No new process can use it.*/ +int blc_channel_remove(blc_channel *channel); + +/** Allocate (need to be free) and give the array of existing shared memory files on the system.*/ +int blc_channel_get_all_infos(blc_channel **channels_infos); + +/** Allocate (need to be free) and give the array of existing shared memory files on the system.*/ +int blc_channel_get_all_infos_with_filter(blc_channel **channels_infos, char const *start_name_filter); + +///Retrieve the informations about a channel if it is known and return the id. Otherwise, return -1. You need to free .dims, which is allocated to contain the list of blc_dims. +int blc_channel_get_info_with_name(blc_channel *info, char const *name); + +///Remove the blc_channel **name**. The other processes using it will still work but no new ones can use it. +void blc_remove_channel_with_name(char const *name); +END_EXTERN_C ///@} #endif diff --git a/src/channel/channel_file.cpp b/src/channel/channel_file.cpp deleted file mode 100644 index 8f374ae..0000000 --- a/src/channel/channel_file.cpp +++ /dev/null @@ -1,295 +0,0 @@ -/* - Basic Library for C/C++ (blclib) - Copyright ETIS — ENSEA, Université de Cergy-Pontoise, CNRS (2011 - 2015) - - Author: Arnaud Blanchard - - This software is governed by the CeCILL v2.1 license under French law and abiding by the rules of distribution of free software. - You can use, modify and/ or redistribute the software under the terms of the CeCILL v2.1 license as circulated by CEA, CNRS and INRIA at the following URL "http://www.cecill.info". - As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, - users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors have only limited liability. - In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge. - Users are therefore encouraged to load and test the software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured - and, more generally, to use and operate it in the same conditions as regards security. - The fact that you are presently reading this means that you have had knowledge of the CeCILL v2.1 license and that you accept its terms. * - - - Created on: Oct 9, 2014 - Author: Arnaud Blanchard - */ - -#include "blc_channel.h" - -#include <errno.h> -#include <string.h> -#include <unistd.h> -#include <limits.h> -#include <pthread.h> -#include <signal.h> -#include <sys/types.h> -#include <sys/mman.h> //mmap -#include <sys/stat.h> // mode S_ ... constants -#include <sys/time.h> //gettimeofday -#include <semaphore.h> -#include <stack> -#include <vector> -#include <tuple> - -#include "blc_realtime.h" -#include "blc_text.h" - -#define TMP_BUFFER_SIZE 4096 -#define BLC_CHANNELS_LIST_PATH "/tmp/blc_channels.txt" - -using namespace std; - -static int blc_channel_id_max = 0; -static sem_t *blc_channel_event[2]={NULL, NULL}; -static int blc_channel_event_id=0; -static void (*blc_channel_event_callback)(void*)=NULL; -static void *blc_channel_event_user_data=NULL; - -pthread_t pthread; - -START_EXTERN_C - -// This is especially for binding to external langage (e.g. python) -blc_channel *blc_channel_new(char const *name, int mode, uint32_t type, uint32_t format, int dims_nb, int length0, ...){ - blc_channel* channel; - vector<size_t> lengths(dims_nb, length0); - va_list arguments; - va_start(arguments, length0); - for (int i=1; i<dims_nb; i++) lengths.push_back(va_arg(arguments, size_t)); - va_end(arguments); - return new blc_channel(name, mode, type, format, lengths); -} - -blc_channel *blc_channel_new_open(char const *name, int mode){ - return new blc_channel(name, mode); -} - - - -// This is especially for binding to external langage (e.g. python) -// Delete the channel. This is different from destroy which deinits the channel but does not remove the memory. -void blc_channel_delete(blc_channel *channel){ - delete channel; -} - -void blc_remove_channel_with_name(char const *name){ - - FILE *list_file; - blc_channel info; - fpos_t write_position, read_position; - char *buffer[TMP_BUFFER_SIZE]; - size_t data_read; - off_t offset; - // char control_filename[NAME_MAX]; - char tmp_name[NAME_MAX]; - - SYSTEM_ERROR_CHECK(list_file=fopen(BLC_CHANNELS_LIST_PATH, "r+"), NULL, "impossible to open " BLC_CHANNELS_LIST_PATH); - - while(!feof(list_file)) - { - fgetpos(list_file, &write_position); - info.fscan_info(list_file, 1); - if (strcmp(info.name, name) == 0) - { - fgetpos(list_file, &read_position); //we remove the line by copying the end of the file here. - do - { - fsetpos(list_file, &read_position); - data_read = fread(buffer, 1, TMP_BUFFER_SIZE, list_file); - fgetpos(list_file, &read_position); - if (data_read==0) if (!feof(list_file)) EXIT_ON_ERROR("Reading file" BLC_CHANNELS_LIST_PATH); - fsetpos(list_file, &write_position); - SYSTEM_SUCCESS_CHECK(fwrite(buffer, 1, data_read, list_file), data_read, ""); - fgetpos(list_file, &write_position); - }while(data_read); - - SYSTEM_ERROR_CHECK(offset = ftell(list_file), -1, ""); - SYSTEM_ERROR_CHECK(ftruncate(fileno(list_file), offset), -1, ""); - SYSTEM_ERROR_CHECK(fclose(list_file), -1, ""); - break; - } - } - if (info.id==blc_channel_id_max) blc_channel_id_max--; - - SYSTEM_ERROR_CHECK(shm_unlink(name), -1, "unlinking blc_channel '%s'", name); - sprintf(tmp_name, "blc_channel%d_sem_new_data0", info.id); - SYSTEM_ERROR_CHECK(sem_unlink(tmp_name), -1, "Unlinking sem_new_data '%s' for blc_channel '%s'", tmp_name, name); - sprintf(tmp_name, "blc_channel%d_sem_ack_data0", info.id); - SYSTEM_ERROR_CHECK(sem_unlink(tmp_name), -1, "Unlinking sem_ack_data '%s' for blc_channel '%s'", tmp_name, name); - - blc_channel_post_event(); - -} - -// Envoie un message d'erreur avec name_of_file, name_of_function, number_of_line et affiche le message formate avec les parametres variables. Puis exit le programme avec le parametre EXIT_FAILURE. To be used with EXIT_ON_ERROR. -void blc_channel_fatal_error(blc_channel *channel, const char *name_of_file, const char* name_of_function, int numero_of_line, const char *message, ...){ - va_list arguments; - va_start(arguments, message); - color_eprintf(BLC_BRIGHT_RED, "\n%s: %s \t %s \t %i :\nError: ", blc_program_name, name_of_file, name_of_function, numero_of_line); - color_veprintf(BLC_BRIGHT_RED, message, arguments); - va_end(arguments); - channel->fprint_debug(stderr); - fprintf(stderr, "\n\n"); - fflush(stderr); - raise(SIGABRT); - exit(EXIT_FAILURE); -} - -void blc_channel_init(blc_channel *channel, const char *name, int mode, uint32_t type, uint32_t format, int dims_nb, int length0, ...) -{ - va_list arguments; - vector<size_t> lengths(dims_nb, length0); - - va_start(arguments, length0); - for(int i=1; i<dims_nb; i++) lengths.push_back(va_arg(arguments, size_t)); - va_end(arguments); - new (channel)blc_channel(name, mode, type, format, lengths); -} - -void blc_channel_open(blc_channel *channel, const char *name, int mode){ - channel->open(name, mode); -} - -void blc_channel_create_or_open(blc_channel *channel, const char *name, int mode, uint32_t type, uint32_t format, int dims_nb, int length0, ...){ - int created; - va_list arguments; - vector<size_t> lengths(dims_nb, length0); - va_start(arguments, length0); - for (int i=1; i<dims_nb; i++) lengths.push_back(va_arg(arguments, size_t)); - va_end(arguments); - new (channel)blc_channel(name, mode, type, format, lengths); -} - -//Search for channel name whatever is start by /,: ,^ or . -int blc_channel_get_info_with_name(blc_channel *info, char const *name){ - blc_channel tmp_info; - FILE *file; - int id=-1; - - file = fopen(BLC_CHANNELS_LIST_PATH, "r"); - if (file == NULL){ - if (errno==ENOENT) return -1; - else EXIT_ON_SYSTEM_ERROR("opening '" BLC_CHANNELS_LIST_PATH"'."); - } - - while(fscanf(file, "%*[ \t\n]")!=EOF){ - tmp_info.fscan_info(file, 1); - if ((tmp_info.id != -1) && (strcmp(tmp_info.name+1, name+1)==0)){ //We do not test first char '/' or '.' - id=tmp_info.id; - *info=tmp_info; - break; - } - } - fclose(file); - return id; -} - -int blc_channel_get_all_infos(struct blc_channel **channels_infos){ - return blc_channel_get_all_infos_with_filter(channels_infos, nullptr); -} - -int blc_channel_get_all_infos_with_filter(blc_channel **channels_infos, char const *filter){ - - vector<blc_channel> channels = blc_channel::get_all_infos(filter); - *channels_infos=MANY_ALLOCATIONS(channels.size(), blc_channel); - memcpy(channels_infos, channels.data(), sizeof(blc_channel)*channels.size()); //This copy is to incompatibility between c and c++ - return channels.size(); -} - -void blc_channel_close_all(blc_channel *channels, int channels_nb) -{ - blc_channel *channel; - FOR_EACH_INV(channel, channels, channels_nb) channel->~blc_channel(); -} - -int blc_channel_remove(blc_channel * channel) -{ - if(channel == NULL) EXIT_ON_ERROR("The channel is NULL"); - else channel->remove(); - return 1; -} - -static void init_blc_channel_sem_event(){ - SYSTEM_ERROR_CHECK(blc_channel_event[0]=sem_open("blc_channel_event0", O_CREAT, S_IRWXU, 0), SEM_FAILED, NULL); - SYSTEM_ERROR_CHECK(blc_channel_event[1]=sem_open("blc_channel_event1", O_CREAT, S_IRWXU, 0), SEM_FAILED, NULL); -} - -void blc_channel_post_event(){ - if (blc_channel_event[0]==NULL || blc_channel_event[1]==NULL) init_blc_channel_sem_event(); - - //If the event is already free it is not the good one. We free the other one to trigger the event - if (sem_trywait(blc_channel_event[blc_channel_event_id])==0){ - SYSTEM_ERROR_CHECK(sem_post(blc_channel_event[blc_channel_event_id]), -1, NULL); - SYSTEM_ERROR_CHECK(sem_post(blc_channel_event[1-blc_channel_event_id]), -1, NULL); - } - else { //If the event is not free, we free it to trigger the event - if (errno!=EAGAIN) EXIT_ON_SYSTEM_ERROR(NULL); - SYSTEM_ERROR_CHECK(sem_post(blc_channel_event[blc_channel_event_id]), -1, NULL); - } - blc_channel_event_id=1-blc_channel_event_id; -} - - -/**Block until event. It may produce false positive in connection */ -static void *blc_channel_thread_manager(void*){ - int i=0; - - //If the event is already free it is not the good one. We will wait for the other one - if (sem_trywait(blc_channel_event[i])==0){ - SYSTEM_ERROR_CHECK(sem_post(blc_channel_event[i]), -1, NULL); - i=1-i; - } - - while(1){ - //We wait for event - SYSTEM_ERROR_CHECK(sem_wait(blc_channel_event[i]), -1, NULL); - //We free event for the others - SYSTEM_ERROR_CHECK(sem_post(blc_channel_event[i]), -1, NULL); - i=1-i; - while(sem_trywait(blc_channel_event[i])==0); - if (errno!=EAGAIN) EXIT_ON_SYSTEM_ERROR(NULL); - blc_channel_event_callback(blc_channel_event_user_data); - } -} - -void blc_channel_check_for_event(void (*callback)(void*), void *user_data) { - if (blc_channel_event[0]==NULL || blc_channel_event[1]==NULL) init_blc_channel_sem_event(); - - blc_channel_event_callback=callback; - blc_channel_event_user_data=user_data; - BLC_PTHREAD_CHECK(pthread_create(&pthread, NULL, blc_channel_thread_manager, NULL), NULL); -} - -void blc_channel_destroy(blc_channel *channel){ - delete channel; -} - -void blc_channel_wait_new_data(void *channel_pt){ - blc_channel *channel=(blc_channel*)channel_pt; - SYSTEM_ERROR_CHECK(sem_wait(channel->sem_new_data), -1, "Waiting new data for channel '%s'", channel->name); -} - -void blc_channel_wait_ack_data(void *channel_pt){ - blc_channel *channel=(blc_channel*)channel_pt; - - SYSTEM_ERROR_CHECK(sem_wait(channel->sem_ack_data), -1, "Waiting ack data for channel '%s'", channel->name); -} - -void blc_channel_post_new_data(void *channel_pt){ - blc_channel *channel=(blc_channel*)channel_pt; - - SYSTEM_ERROR_CHECK(sem_post(channel->sem_new_data), -1, "Posting new data for channel '%s'", channel->name); -} - -void blc_channel_post_ack_data(void *channel_pt){ - blc_channel *channel=(blc_channel*)channel_pt; - - SYSTEM_ERROR_CHECK(sem_post(channel->sem_ack_data), -1, "Posting ack data for channel '%s'", channel->name); -} -END_EXTERN_C - diff --git a/src/channel/channel_file.h b/src/channel/channel_file.h deleted file mode 100644 index 3f08a35..0000000 --- a/src/channel/channel_file.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef CHANNEL_FILE_H -#define CHANNEL_FILE_H - -#include "blc_channel.h" - -START_EXTERN_C -/**Used by EXIT_ON_CHANNEL_ERROR*/ -void blc_channel_fatal_error(blc_channel *channel, const char *name_of_file, const char* name_of_function, int numero_of_line, const char *message, ...); -/**Create a blc_channel with the name, the mode is BLC_CHANNEL_READ or BLC_CHANNEL_WRITE, the type of data UIN8, INT8, UI16, IN16, FL32, FL64. ( default 0:UIN8), - The format are four chars user defined but usually describe the image format 'Y800' (for grey), 'RGB3', 'YUV2' ,...,. - Dims_nb is the number of dimenssions of the data ( 1 for a vector). - The following values are the the length of each dims. You must have the same number of length than dims_nb*/ -void blc_channel_create(blc_channel* channel, const char *name, int mode, uint32_t type, uint32_t format, int dims_nb, int length0, ...); -/**Open an exisiting channel 'name' */ -void blc_channel_open(blc_channel* channel, const char *name, int mode); -/**Open an exisiting channel 'name' or create it if it does not exist */ -int blc_channel_create_or_open(blc_channel *channel, const char *name, int mode, uint32_t type, uint32_t format, int dims_nb, int length0, ...); -/** Close the channel and unlink the shared memory. No new process can use it.*/ -int blc_channel_remove(blc_channel *channel); -/** Allocate (need to be free) and give the array of existing shared memory files on the system.*/ -int blc_channel_get_all_infos(blc_channel **channels_infos); -/** Allocate (need to be free) and give the array of existing shared memory files on the system.*/ -int blc_channel_get_all_infos_with_filter(blc_channel **channels_infos, char const *start_name_filter); -///Retrieve the informations about a channel if it is known and return the id. Otherwise, return -1. You need to free .dims, which is allocated to contain the list of blc_dims. -int blc_channel_get_info_with_name(blc_channel *info, char const *name); -///Remove the blc_channel **name**. The other processes using it will still work but no new ones can use it. -void blc_remove_channel_with_name(char const *name); -END_EXTERN_C - -#endif -- GitLab