From: Dominic Letourneau Date: Mon, 19 Mar 2018 20:27:32 +0000 (-0400) Subject: Cleaning up headers X-Git-Url: http://kyz.pub/gitweb/?a=commitdiff_plain;h=6bd00fba92ff27cca016f4e98aabdf681550d180;p=yn%2Fyn-odas.git Cleaning up headers --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a1806c..bc7b5aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,4 @@ +project(ODAS) cmake_minimum_required(VERSION 2.4.6) if(COMMAND cmake_policy) @@ -16,6 +17,11 @@ set(CMAKE_BUILD_TYPE "Release") set(EXECUTABLE_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/bin") set(LIBRARY_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/lib") +#Add base directory for includes (global) +include_directories(include/odas) + +add_subdirectory(include) + set(SRC src/general/format.c diff --git a/demo/debug.c b/demo/debug.c index 7ed41a0..cd121fb 100644 --- a/demo/debug.c +++ b/demo/debug.c @@ -4,7 +4,7 @@ #include #include - #include "../src/utils/inverse.h" + #include int main(int argc, char * argv[]) { @@ -42,4 +42,4 @@ } - } \ No newline at end of file + } diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt new file mode 100644 index 0000000..47c13fb --- /dev/null +++ b/include/CMakeLists.txt @@ -0,0 +1,8 @@ +#Scan for headers and add them for installation +file(GLOB_RECURSE ODAS_ALL_INCLUDES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) + +message(STATUS "HEADER FILES: ${ODAS_ALL_INCLUDES}") + +add_custom_target(odas_headers SOURCES ${ODAS_ALL_INCLUDES}) + +install(FILES ${ODAS_ALL_INCLUDES} DESTINATION include) diff --git a/include/odas/aconnector/acon_categories.h b/include/odas/aconnector/acon_categories.h new file mode 100644 index 0000000..7815c01 --- /dev/null +++ b/include/odas/aconnector/acon_categories.h @@ -0,0 +1,49 @@ +#ifndef __ODAS_ACONNECTOR_CATEGORIES +#define __ODAS_ACONNECTOR_CATEGORIES + + /** + * \file acon_categories.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../connector/con_categories.h" + #include "../amessage/amsg_categories.h" + #include "../message/msg_categories.h" + #include "../general/thread.h" + + #include + #include + + typedef struct acon_categories_obj { + + amsg_categories_obj * in; + amsg_categories_obj ** outs; + con_categories_obj * con_categories; + thread_obj * thread; + + } acon_categories_obj; + + acon_categories_obj * acon_categories_construct(const unsigned int nOuts, const unsigned int nMessages, const msg_categories_cfg * msg_categories_config); + + void acon_categories_destroy(acon_categories_obj * obj); + + void * acon_categories_thread(void * ptr); + +#endif \ No newline at end of file diff --git a/include/odas/aconnector/acon_hops.h b/include/odas/aconnector/acon_hops.h new file mode 100644 index 0000000..07fef53 --- /dev/null +++ b/include/odas/aconnector/acon_hops.h @@ -0,0 +1,49 @@ +#ifndef __ODAS_ACONNECTOR_HOPS +#define __ODAS_ACONNECTOR_HOPS + + /** + * \file acon_hops.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../connector/con_hops.h" + #include "../amessage/amsg_hops.h" + #include "../message/msg_hops.h" + #include "../general/thread.h" + + #include + #include + + typedef struct acon_hops_obj { + + amsg_hops_obj * in; + amsg_hops_obj ** outs; + con_hops_obj * con_hops; + thread_obj * thread; + + } acon_hops_obj; + + acon_hops_obj * acon_hops_construct(const unsigned int nOuts, const unsigned int nMessages, const msg_hops_cfg * msg_hops_config); + + void acon_hops_destroy(acon_hops_obj * obj); + + void * acon_hops_thread(void * ptr); + +#endif \ No newline at end of file diff --git a/include/odas/aconnector/acon_pots.h b/include/odas/aconnector/acon_pots.h new file mode 100644 index 0000000..28e2c96 --- /dev/null +++ b/include/odas/aconnector/acon_pots.h @@ -0,0 +1,49 @@ +#ifndef __ODAS_ACONNECTOR_POTS +#define __ODAS_ACONNECTOR_POTS + + /** + * \file acon_pots.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../connector/con_pots.h" + #include "../amessage/amsg_pots.h" + #include "../message/msg_pots.h" + #include "../general/thread.h" + + #include + #include + + typedef struct acon_pots_obj { + + amsg_pots_obj * in; + amsg_pots_obj ** outs; + con_pots_obj * con_pots; + thread_obj * thread; + + } acon_pots_obj; + + acon_pots_obj * acon_pots_construct(const unsigned int nOuts, const unsigned int nMessages, const msg_pots_cfg * msg_pots_config); + + void acon_pots_destroy(acon_pots_obj * obj); + + void * acon_pots_thread(void * ptr); + +#endif \ No newline at end of file diff --git a/include/odas/aconnector/acon_powers.h b/include/odas/aconnector/acon_powers.h new file mode 100644 index 0000000..5254bae --- /dev/null +++ b/include/odas/aconnector/acon_powers.h @@ -0,0 +1,49 @@ +#ifndef __ODAS_ACONNECTOR_POWERS +#define __ODAS_ACONNECTOR_POWERS + + /** + * \file acon_powers.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../connector/con_powers.h" + #include "../amessage/amsg_powers.h" + #include "../message/msg_powers.h" + #include "../general/thread.h" + + #include + #include + + typedef struct acon_powers_obj { + + amsg_powers_obj * in; + amsg_powers_obj ** outs; + con_powers_obj * con_powers; + thread_obj * thread; + + } acon_powers_obj; + + acon_powers_obj * acon_powers_construct(const unsigned int nOuts, const unsigned int nMessages, const msg_powers_cfg * msg_powers_config); + + void acon_powers_destroy(acon_powers_obj * obj); + + void * acon_powers_thread(void * ptr); + +#endif \ No newline at end of file diff --git a/include/odas/aconnector/acon_spectra.h b/include/odas/aconnector/acon_spectra.h new file mode 100644 index 0000000..0a423e3 --- /dev/null +++ b/include/odas/aconnector/acon_spectra.h @@ -0,0 +1,49 @@ +#ifndef __ODAS_ACONNECTOR_SPECTRA +#define __ODAS_ACONNECTOR_SPECTRA + + /** + * \file acon_spectra.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../connector/con_spectra.h" + #include "../amessage/amsg_spectra.h" + #include "../message/msg_spectra.h" + #include "../general/thread.h" + + #include + #include + + typedef struct acon_spectra_obj { + + amsg_spectra_obj * in; + amsg_spectra_obj ** outs; + con_spectra_obj * con_spectra; + thread_obj * thread; + + } acon_spectra_obj; + + acon_spectra_obj * acon_spectra_construct(const unsigned int nOuts, const unsigned int nMessages, const msg_spectra_cfg * msg_spectra_config); + + void acon_spectra_destroy(acon_spectra_obj * obj); + + void * acon_spectra_thread(void * ptr); + +#endif \ No newline at end of file diff --git a/include/odas/aconnector/acon_targets.h b/include/odas/aconnector/acon_targets.h new file mode 100644 index 0000000..bef3ef9 --- /dev/null +++ b/include/odas/aconnector/acon_targets.h @@ -0,0 +1,49 @@ +#ifndef __ODAS_ACONNECTOR_TARGETS +#define __ODAS_ACONNECTOR_TARGETS + + /** + * \file acon_targets.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../connector/con_targets.h" + #include "../amessage/amsg_targets.h" + #include "../message/msg_targets.h" + #include "../general/thread.h" + + #include + #include + + typedef struct acon_targets_obj { + + amsg_targets_obj * in; + amsg_targets_obj ** outs; + con_targets_obj * con_targets; + thread_obj * thread; + + } acon_targets_obj; + + acon_targets_obj * acon_targets_construct(const unsigned int nOuts, const unsigned int nMessages, const msg_targets_cfg * msg_targets_config); + + void acon_targets_destroy(acon_targets_obj * obj); + + void * acon_targets_thread(void * ptr); + +#endif \ No newline at end of file diff --git a/include/odas/aconnector/acon_tracks.h b/include/odas/aconnector/acon_tracks.h new file mode 100644 index 0000000..1427e02 --- /dev/null +++ b/include/odas/aconnector/acon_tracks.h @@ -0,0 +1,49 @@ +#ifndef __ODAS_ACONNECTOR_TRACKS +#define __ODAS_ACONNECTOR_TRACKS + + /** + * \file acon_tracks.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../connector/con_tracks.h" + #include "../amessage/amsg_tracks.h" + #include "../message/msg_tracks.h" + #include "../general/thread.h" + + #include + #include + + typedef struct acon_tracks_obj { + + amsg_tracks_obj * in; + amsg_tracks_obj ** outs; + con_tracks_obj * con_tracks; + thread_obj * thread; + + } acon_tracks_obj; + + acon_tracks_obj * acon_tracks_construct(const unsigned int nOuts, const unsigned int nMessages, const msg_tracks_cfg * msg_tracks_config); + + void acon_tracks_destroy(acon_tracks_obj * obj); + + void * acon_tracks_thread(void * ptr); + +#endif \ No newline at end of file diff --git a/include/odas/ainjector/ainj_targets.h b/include/odas/ainjector/ainj_targets.h new file mode 100644 index 0000000..e3a2862 --- /dev/null +++ b/include/odas/ainjector/ainj_targets.h @@ -0,0 +1,50 @@ +#ifndef __ODAS_AINJECTOR_TARGETS +#define __ODAS_AINJECTOR_TARGETS + + /** + * \file ainj_targets.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../injector/inj_targets.h" + #include "../amessage/amsg_hops.h" + #include "../amessage/amsg_targets.h" + #include "../general/thread.h" + + typedef struct ainj_targets_obj { + + inj_targets_obj * inj_targets; + amsg_hops_obj * in; + amsg_targets_obj * out; + thread_obj * thread; + + } ainj_targets_obj; + + ainj_targets_obj * ainj_targets_construct(const inj_targets_cfg * inj_targets_config, const msg_hops_cfg * msg_hops_config, const msg_targets_cfg * msg_targets_config); + + void ainj_targets_destroy(ainj_targets_obj * obj); + + void ainj_targets_connect(ainj_targets_obj * obj, amsg_hops_obj * in, amsg_targets_obj * out); + + void ainj_targets_disconnect(ainj_targets_obj * obj); + + void * ainj_targets_thread(void * ptr); + +#endif \ No newline at end of file diff --git a/include/odas/amessage/amsg_categories.h b/include/odas/amessage/amsg_categories.h new file mode 100644 index 0000000..ab52673 --- /dev/null +++ b/include/odas/amessage/amsg_categories.h @@ -0,0 +1,51 @@ +#ifndef __ODAS_AMESSAGE_CATEGORIES +#define __ODAS_AMESSAGE_CATEGORIES + + /** + * \file amsg_categories.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + + #include "../message/msg_categories.h" + #include "../utils/fifo.h" + + typedef struct amsg_categories_obj { + + unsigned int nMessages; + fifo_obj * filled; + fifo_obj * empty; + + } amsg_categories_obj; + + amsg_categories_obj * amsg_categories_construct(const unsigned int nMessages, const msg_categories_cfg * msg_categories_config); + + void amsg_categories_destroy(amsg_categories_obj * obj); + + msg_categories_obj * amsg_categories_filled_pop(amsg_categories_obj * obj); + + void amsg_categories_filled_push(amsg_categories_obj * obj, msg_categories_obj * msg_categories); + + msg_categories_obj * amsg_categories_empty_pop(amsg_categories_obj * obj); + + void amsg_categories_empty_push(amsg_categories_obj * obj, msg_categories_obj * msg_categories); + +#endif \ No newline at end of file diff --git a/include/odas/amessage/amsg_hops.h b/include/odas/amessage/amsg_hops.h new file mode 100644 index 0000000..fc69bc7 --- /dev/null +++ b/include/odas/amessage/amsg_hops.h @@ -0,0 +1,51 @@ +#ifndef __ODAS_AMESSAGE_HOPS +#define __ODAS_AMESSAGE_HOPS + + /** + * \file amsg_hops.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + + #include "../message/msg_hops.h" + #include "../utils/fifo.h" + + typedef struct amsg_hops_obj { + + unsigned int nMessages; + fifo_obj * filled; + fifo_obj * empty; + + } amsg_hops_obj; + + amsg_hops_obj * amsg_hops_construct(const unsigned int nMessages, const msg_hops_cfg * msg_hops_config); + + void amsg_hops_destroy(amsg_hops_obj * obj); + + msg_hops_obj * amsg_hops_filled_pop(amsg_hops_obj * obj); + + void amsg_hops_filled_push(amsg_hops_obj * obj, msg_hops_obj * msg_hops); + + msg_hops_obj * amsg_hops_empty_pop(amsg_hops_obj * obj); + + void amsg_hops_empty_push(amsg_hops_obj * obj, msg_hops_obj * msg_hops); + +#endif \ No newline at end of file diff --git a/include/odas/amessage/amsg_pots.h b/include/odas/amessage/amsg_pots.h new file mode 100644 index 0000000..54495c6 --- /dev/null +++ b/include/odas/amessage/amsg_pots.h @@ -0,0 +1,51 @@ +#ifndef __ODAS_AMESSAGE_POTS +#define __ODAS_AMESSAGE_POTS + + /** + * \file amsg_pots.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + + #include "../message/msg_pots.h" + #include "../utils/fifo.h" + + typedef struct amsg_pots_obj { + + unsigned int nMessages; + fifo_obj * filled; + fifo_obj * empty; + + } amsg_pots_obj; + + amsg_pots_obj * amsg_pots_construct(const unsigned int nMessages, const msg_pots_cfg * msg_pots_config); + + void amsg_pots_destroy(amsg_pots_obj * obj); + + msg_pots_obj * amsg_pots_filled_pop(amsg_pots_obj * obj); + + void amsg_pots_filled_push(amsg_pots_obj * obj, msg_pots_obj * msg_pots); + + msg_pots_obj * amsg_pots_empty_pop(amsg_pots_obj * obj); + + void amsg_pots_empty_push(amsg_pots_obj * obj, msg_pots_obj * msg_pots); + +#endif \ No newline at end of file diff --git a/include/odas/amessage/amsg_powers.h b/include/odas/amessage/amsg_powers.h new file mode 100644 index 0000000..b143193 --- /dev/null +++ b/include/odas/amessage/amsg_powers.h @@ -0,0 +1,51 @@ +#ifndef __ODAS_AMESSAGE_POWERS +#define __ODAS_AMESSAGE_POWERS + + /** + * \file amsg_powers.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + + #include "../message/msg_powers.h" + #include "../utils/fifo.h" + + typedef struct amsg_powers_obj { + + unsigned int nMessages; + fifo_obj * filled; + fifo_obj * empty; + + } amsg_powers_obj; + + amsg_powers_obj * amsg_powers_construct(const unsigned int nMessages, const msg_powers_cfg * msg_powers_config); + + void amsg_powers_destroy(amsg_powers_obj * obj); + + msg_powers_obj * amsg_powers_filled_pop(amsg_powers_obj * obj); + + void amsg_powers_filled_push(amsg_powers_obj * obj, msg_powers_obj * msg_powers); + + msg_powers_obj * amsg_powers_empty_pop(amsg_powers_obj * obj); + + void amsg_powers_empty_push(amsg_powers_obj * obj, msg_powers_obj * msg_powers); + +#endif \ No newline at end of file diff --git a/include/odas/amessage/amsg_spectra.h b/include/odas/amessage/amsg_spectra.h new file mode 100644 index 0000000..d7a0eec --- /dev/null +++ b/include/odas/amessage/amsg_spectra.h @@ -0,0 +1,51 @@ +#ifndef __ODAS_AMESSAGE_SPECTRA +#define __ODAS_AMESSAGE_SPECTRA + + /** + * \file amsg_spectra.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + + #include "../message/msg_spectra.h" + #include "../utils/fifo.h" + + typedef struct amsg_spectra_obj { + + unsigned int nMessages; + fifo_obj * filled; + fifo_obj * empty; + + } amsg_spectra_obj; + + amsg_spectra_obj * amsg_spectra_construct(const unsigned int nMessages, const msg_spectra_cfg * msg_spectra_config); + + void amsg_spectra_destroy(amsg_spectra_obj * obj); + + msg_spectra_obj * amsg_spectra_filled_pop(amsg_spectra_obj * obj); + + void amsg_spectra_filled_push(amsg_spectra_obj * obj, msg_spectra_obj * msg_spectra); + + msg_spectra_obj * amsg_spectra_empty_pop(amsg_spectra_obj * obj); + + void amsg_spectra_empty_push(amsg_spectra_obj * obj, msg_spectra_obj * msg_spectra); + +#endif \ No newline at end of file diff --git a/include/odas/amessage/amsg_targets.h b/include/odas/amessage/amsg_targets.h new file mode 100644 index 0000000..d12be3e --- /dev/null +++ b/include/odas/amessage/amsg_targets.h @@ -0,0 +1,51 @@ +#ifndef __ODAS_AMESSAGE_TARGETS +#define __ODAS_AMESSAGE_TARGETS + + /** + * \file amsg_targets.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + + #include "../message/msg_targets.h" + #include "../utils/fifo.h" + + typedef struct amsg_targets_obj { + + unsigned int nMessages; + fifo_obj * filled; + fifo_obj * empty; + + } amsg_targets_obj; + + amsg_targets_obj * amsg_targets_construct(const unsigned int nMessages, const msg_targets_cfg * msg_targets_config); + + void amsg_targets_destroy(amsg_targets_obj * obj); + + msg_targets_obj * amsg_targets_filled_pop(amsg_targets_obj * obj); + + void amsg_targets_filled_push(amsg_targets_obj * obj, msg_targets_obj * msg_targets); + + msg_targets_obj * amsg_targets_empty_pop(amsg_targets_obj * obj); + + void amsg_targets_empty_push(amsg_targets_obj * obj, msg_targets_obj * msg_targets); + +#endif \ No newline at end of file diff --git a/include/odas/amessage/amsg_tracks.h b/include/odas/amessage/amsg_tracks.h new file mode 100644 index 0000000..34f7529 --- /dev/null +++ b/include/odas/amessage/amsg_tracks.h @@ -0,0 +1,51 @@ +#ifndef __ODAS_AMESSAGE_TRACKS +#define __ODAS_AMESSAGE_TRACKS + + /** + * \file amsg_tracks.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + + #include "../message/msg_tracks.h" + #include "../utils/fifo.h" + + typedef struct amsg_tracks_obj { + + unsigned int nMessages; + fifo_obj * filled; + fifo_obj * empty; + + } amsg_tracks_obj; + + amsg_tracks_obj * amsg_tracks_construct(const unsigned int nMessages, const msg_tracks_cfg * msg_tracks_config); + + void amsg_tracks_destroy(amsg_tracks_obj * obj); + + msg_tracks_obj * amsg_tracks_filled_pop(amsg_tracks_obj * obj); + + void amsg_tracks_filled_push(amsg_tracks_obj * obj, msg_tracks_obj * msg_tracks); + + msg_tracks_obj * amsg_tracks_empty_pop(amsg_tracks_obj * obj); + + void amsg_tracks_empty_push(amsg_tracks_obj * obj, msg_tracks_obj * msg_tracks); + +#endif \ No newline at end of file diff --git a/include/odas/amodule/amod_classify.h b/include/odas/amodule/amod_classify.h new file mode 100644 index 0000000..3ff14c5 --- /dev/null +++ b/include/odas/amodule/amod_classify.h @@ -0,0 +1,52 @@ +#ifndef __ODAS_AMODULE_CLASSIFY +#define __ODAS_AMODULE_CLASSIFY + + /** + * \file amod_classify.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../module/mod_classify.h" + #include "../amessage/amsg_hops.h" + #include "../amessage/amsg_tracks.h" + #include "../amessage/amsg_categories.h" + #include "../general/thread.h" + + typedef struct amod_classify_obj { + + mod_classify_obj * mod_classify; + amsg_hops_obj * in1; + amsg_tracks_obj * in2; + amsg_categories_obj * out; + thread_obj * thread; + + } amod_classify_obj; + + amod_classify_obj * amod_classify_construct(const mod_classify_cfg * mod_classify_config, const msg_hops_cfg * msg_hops_config, const msg_tracks_cfg * msg_tracks_config, const msg_categories_cfg * msg_categories_config); + + void amod_classify_destroy(amod_classify_obj * obj); + + void amod_classify_connect(amod_classify_obj * obj, amsg_hops_obj * in1, amsg_tracks_obj * in2, amsg_categories_obj * out); + + void amod_classify_disconnect(amod_classify_obj * obj); + + void * amod_classify_thread(void * ptr); + +#endif \ No newline at end of file diff --git a/include/odas/amodule/amod_istft.h b/include/odas/amodule/amod_istft.h new file mode 100644 index 0000000..f2b7ccf --- /dev/null +++ b/include/odas/amodule/amod_istft.h @@ -0,0 +1,50 @@ +#ifndef __ODAS_AMODULE_ISTFT +#define __ODAS_AMODULE_ISTFT + + /** + * \file amod_istft.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../module/mod_istft.h" + #include "../amessage/amsg_spectra.h" + #include "../amessage/amsg_hops.h" + #include "../general/thread.h" + + typedef struct amod_istft_obj { + + mod_istft_obj * mod_istft; + amsg_spectra_obj * in; + amsg_hops_obj * out; + thread_obj * thread; + + } amod_istft_obj; + + amod_istft_obj * amod_istft_construct(const mod_istft_cfg * mod_istft_config, const msg_spectra_cfg * msg_spectra_config, const msg_hops_cfg * msg_hops_config); + + void amod_istft_destroy(amod_istft_obj * obj); + + void amod_istft_connect(amod_istft_obj * obj, amsg_spectra_obj * in, amsg_hops_obj * out); + + void amod_istft_disconnect(amod_istft_obj * obj); + + void * amod_istft_thread(void * ptr); + +#endif \ No newline at end of file diff --git a/include/odas/amodule/amod_mapping.h b/include/odas/amodule/amod_mapping.h new file mode 100644 index 0000000..014d589 --- /dev/null +++ b/include/odas/amodule/amod_mapping.h @@ -0,0 +1,49 @@ +#ifndef __ODAS_AMODULE_MAPPING +#define __ODAS_AMODULE_MAPPING + + /** + * \file amod_mapping.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../module/mod_mapping.h" + #include "../amessage/amsg_hops.h" + #include "../general/thread.h" + + typedef struct amod_mapping_obj { + + mod_mapping_obj * mod_mapping; + amsg_hops_obj * in; + amsg_hops_obj * out; + thread_obj * thread; + + } amod_mapping_obj; + + amod_mapping_obj * amod_mapping_construct(const mod_mapping_cfg * mod_mapping_config, const msg_hops_cfg * msg_hops_config); + + void amod_mapping_destroy(amod_mapping_obj * obj); + + void amod_mapping_connect(amod_mapping_obj * obj, amsg_hops_obj * in, amsg_hops_obj * out); + + void amod_mapping_disconnect(amod_mapping_obj * obj); + + void * amod_mapping_thread(void * ptr); + +#endif \ No newline at end of file diff --git a/include/odas/amodule/amod_noise.h b/include/odas/amodule/amod_noise.h new file mode 100644 index 0000000..873d7f6 --- /dev/null +++ b/include/odas/amodule/amod_noise.h @@ -0,0 +1,50 @@ +#ifndef __ODAS_AMODULE_NOISE +#define __ODAS_AMODULE_NOISE + + /** + * \file amod_noise.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../module/mod_noise.h" + #include "../amessage/amsg_spectra.h" + #include "../amessage/amsg_powers.h" + #include "../general/thread.h" + + typedef struct amod_noise_obj { + + mod_noise_obj * mod_noise; + amsg_spectra_obj * in; + amsg_powers_obj * out; + thread_obj * thread; + + } amod_noise_obj; + + amod_noise_obj * amod_noise_construct(const mod_noise_cfg * mod_noise_config, const msg_spectra_cfg * msg_spectra_config, const msg_powers_cfg * msg_powers_config); + + void amod_noise_destroy(amod_noise_obj * obj); + + void amod_noise_connect(amod_noise_obj * obj, amsg_spectra_obj * in, amsg_powers_obj * out); + + void amod_noise_disconnect(amod_noise_obj * obj); + + void * amod_noise_thread(void * ptr); + +#endif \ No newline at end of file diff --git a/include/odas/amodule/amod_resample.h b/include/odas/amodule/amod_resample.h new file mode 100644 index 0000000..996bf50 --- /dev/null +++ b/include/odas/amodule/amod_resample.h @@ -0,0 +1,49 @@ +#ifndef __ODAS_AMODULE_RESAMPLE +#define __ODAS_AMODULE_RESAMPLE + + /** + * \file amod_resample.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../module/mod_resample.h" + #include "../amessage/amsg_hops.h" + #include "../general/thread.h" + + typedef struct amod_resample_obj { + + mod_resample_obj * mod_resample; + amsg_hops_obj * in; + amsg_hops_obj * out; + thread_obj * thread; + + } amod_resample_obj; + + amod_resample_obj * amod_resample_construct(const mod_resample_cfg * mod_resample_config, const msg_hops_cfg * msg_hops_in_config, const msg_hops_cfg * msg_hops_out_config); + + void amod_resample_destroy(amod_resample_obj * obj); + + void amod_resample_connect(amod_resample_obj * obj, amsg_hops_obj * in, amsg_hops_obj * out); + + void amod_resample_disconnect(amod_resample_obj * obj); + + void * amod_resample_thread(void * ptr); + +#endif \ No newline at end of file diff --git a/include/odas/amodule/amod_ssl.h b/include/odas/amodule/amod_ssl.h new file mode 100644 index 0000000..f2d1208 --- /dev/null +++ b/include/odas/amodule/amod_ssl.h @@ -0,0 +1,51 @@ +#ifndef __ODAS_AMODULE_SSL +#define __ODAS_AMODULE_SSL + + /** + * \file amod_ssl.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../module/mod_ssl.h" + #include "../amessage/amsg_spectra.h" + #include "../amessage/amsg_powers.h" + #include "../amessage/amsg_pots.h" + #include "../general/thread.h" + + typedef struct amod_ssl_obj { + + mod_ssl_obj * mod_ssl; + amsg_spectra_obj * in; + amsg_pots_obj * out; + thread_obj * thread; + + } amod_ssl_obj; + + amod_ssl_obj * amod_ssl_construct(const mod_ssl_cfg * mod_ssl_config, const msg_spectra_cfg * msg_spectra_config, const msg_pots_cfg * msg_pots_config); + + void amod_ssl_destroy(amod_ssl_obj * obj); + + void amod_ssl_connect(amod_ssl_obj * obj, amsg_spectra_obj * in, amsg_pots_obj * out); + + void amod_ssl_disconnect(amod_ssl_obj * obj); + + void * amod_ssl_thread(void * ptr); + +#endif \ No newline at end of file diff --git a/include/odas/amodule/amod_sss.h b/include/odas/amodule/amod_sss.h new file mode 100644 index 0000000..f4e9b90 --- /dev/null +++ b/include/odas/amodule/amod_sss.h @@ -0,0 +1,54 @@ +#ifndef __ODAS_AMODULE_SSS +#define __ODAS_AMODULE_SSS + + /** + * \file amod_sss.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../module/mod_sss.h" + #include "../amessage/amsg_powers.h" + #include "../amessage/amsg_tracks.h" + #include "../amessage/amsg_spectra.h" + #include "../general/thread.h" + + typedef struct amod_sss_obj { + + mod_sss_obj * mod_sss; + amsg_spectra_obj * in1; + amsg_powers_obj * in2; + amsg_tracks_obj * in3; + amsg_spectra_obj * out1; + amsg_spectra_obj * out2; + thread_obj * thread; + + } amod_sss_obj; + + amod_sss_obj * amod_sss_construct(const mod_sss_cfg * mod_sss_config, const msg_tracks_cfg * msg_tracks_config, const msg_spectra_cfg * msg_spectra_config); + + void amod_sss_destroy(amod_sss_obj * obj); + + void amod_sss_connect(amod_sss_obj * obj, amsg_spectra_obj * in1, amsg_powers_obj * in2, amsg_tracks_obj * in3, amsg_spectra_obj * out1, amsg_spectra_obj * out2); + + void amod_sss_disconnect(amod_sss_obj * obj); + + void * amod_sss_thread(void * ptr); + +#endif \ No newline at end of file diff --git a/include/odas/amodule/amod_sst.h b/include/odas/amodule/amod_sst.h new file mode 100644 index 0000000..329fb17 --- /dev/null +++ b/include/odas/amodule/amod_sst.h @@ -0,0 +1,53 @@ +#ifndef __ODAS_AMODULE_SST +#define __ODAS_AMODULE_SST + + /** + * \file amod_sst.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../module/mod_ssl.h" + #include "../module/mod_sst.h" + #include "../amessage/amsg_pots.h" + #include "../amessage/amsg_targets.h" + #include "../amessage/amsg_tracks.h" + #include "../general/thread.h" + + typedef struct amod_sst_obj { + + mod_sst_obj * mod_sst; + amsg_pots_obj * in1; + amsg_targets_obj * in2; + amsg_tracks_obj * out; + thread_obj * thread; + + } amod_sst_obj; + + amod_sst_obj * amod_sst_construct(const mod_sst_cfg * mod_sst_config, const mod_ssl_cfg * mod_ssl_config, const msg_pots_cfg * msg_pots_config, const msg_targets_cfg * msg_targets_config, const msg_tracks_cfg * msg_tracks_config); + + void amod_sst_destroy(amod_sst_obj * obj); + + void amod_sst_connect(amod_sst_obj * obj, amsg_pots_obj * in1, amsg_targets_obj * in2, amsg_tracks_obj * out); + + void amod_sst_disconnect(amod_sst_obj * obj); + + void * amod_sst_thread(void * ptr); + +#endif \ No newline at end of file diff --git a/include/odas/amodule/amod_stft.h b/include/odas/amodule/amod_stft.h new file mode 100644 index 0000000..29dc1c8 --- /dev/null +++ b/include/odas/amodule/amod_stft.h @@ -0,0 +1,50 @@ +#ifndef __ODAS_AMODULE_STFT +#define __ODAS_AMODULE_STFT + + /** + * \file amod_stft.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../module/mod_stft.h" + #include "../amessage/amsg_hops.h" + #include "../amessage/amsg_spectra.h" + #include "../general/thread.h" + + typedef struct amod_stft_obj { + + mod_stft_obj * mod_stft; + amsg_hops_obj * in; + amsg_spectra_obj * out; + thread_obj * thread; + + } amod_stft_obj; + + amod_stft_obj * amod_stft_construct(const mod_stft_cfg * mod_stft_config, const msg_hops_cfg * msg_hops_config, const msg_spectra_cfg * msg_spectra_config); + + void amod_stft_destroy(amod_stft_obj * obj); + + void amod_stft_connect(amod_stft_obj * obj, amsg_hops_obj * in, amsg_spectra_obj * out); + + void amod_stft_disconnect(amod_stft_obj * obj); + + void * amod_stft_thread(void * ptr); + +#endif \ No newline at end of file diff --git a/include/odas/amodule/amod_volume.h b/include/odas/amodule/amod_volume.h new file mode 100644 index 0000000..a774757 --- /dev/null +++ b/include/odas/amodule/amod_volume.h @@ -0,0 +1,49 @@ +#ifndef __ODAS_AMODULE_VOLUME +#define __ODAS_AMODULE_VOLUME + + /** + * \file amod_volume.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../module/mod_volume.h" + #include "../amessage/amsg_hops.h" + #include "../general/thread.h" + + typedef struct amod_volume_obj { + + mod_volume_obj * mod_volume; + amsg_hops_obj * in; + amsg_hops_obj * out; + thread_obj * thread; + + } amod_volume_obj; + + amod_volume_obj * amod_volume_construct(const mod_volume_cfg * mod_volume_config, const msg_hops_cfg * msg_hops_config); + + void amod_volume_destroy(amod_volume_obj * obj); + + void amod_volume_connect(amod_volume_obj * obj, amsg_hops_obj * in, amsg_hops_obj * out); + + void amod_volume_disconnect(amod_volume_obj * obj); + + void * amod_volume_thread(void * ptr); + +#endif \ No newline at end of file diff --git a/include/odas/asink/asnk_categories.h b/include/odas/asink/asnk_categories.h new file mode 100644 index 0000000..6c22c2e --- /dev/null +++ b/include/odas/asink/asnk_categories.h @@ -0,0 +1,50 @@ +#ifndef __ODAS_ASINK_CATEGORIES +#define __ODAS_ASINK_CATEGORIES + + /** + * \file asink_categories.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../amessage/amsg_categories.h" + #include "../sink/snk_categories.h" + #include "../general/thread.h" + + #include + + typedef struct asnk_categories_obj { + + snk_categories_obj * snk_categories; + amsg_categories_obj * in; + thread_obj * thread; + + } asnk_categories_obj; + + asnk_categories_obj * asnk_categories_construct(const snk_categories_cfg * snk_categories_config, const msg_categories_cfg * msg_categories_config); + + void asnk_categories_destroy(asnk_categories_obj * obj); + + void asnk_categories_connect(asnk_categories_obj * obj, amsg_categories_obj * in); + + void asnk_categories_disconnect(asnk_categories_obj * obj); + + void * asnk_categories_thread(void * ptr); + +#endif \ No newline at end of file diff --git a/include/odas/asink/asnk_hops.h b/include/odas/asink/asnk_hops.h new file mode 100644 index 0000000..f4413d7 --- /dev/null +++ b/include/odas/asink/asnk_hops.h @@ -0,0 +1,50 @@ +#ifndef __ODAS_ASINK_HOPS +#define __ODAS_ASINK_HOPS + + /** + * \file asink_hops.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../amessage/amsg_hops.h" + #include "../sink/snk_hops.h" + #include "../general/thread.h" + + #include + + typedef struct asnk_hops_obj { + + snk_hops_obj * snk_hops; + amsg_hops_obj * in; + thread_obj * thread; + + } asnk_hops_obj; + + asnk_hops_obj * asnk_hops_construct(const snk_hops_cfg * snk_hops_config, const msg_hops_cfg * msg_hops_config); + + void asnk_hops_destroy(asnk_hops_obj * obj); + + void asnk_hops_connect(asnk_hops_obj * obj, amsg_hops_obj * in); + + void asnk_hops_disconnect(asnk_hops_obj * obj); + + void * asnk_hops_thread(void * ptr); + +#endif \ No newline at end of file diff --git a/include/odas/asink/asnk_pots.h b/include/odas/asink/asnk_pots.h new file mode 100644 index 0000000..bf03af1 --- /dev/null +++ b/include/odas/asink/asnk_pots.h @@ -0,0 +1,50 @@ +#ifndef __ODAS_ASINK_POTS +#define __ODAS_ASINK_POTS + + /** + * \file asink_pots.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../amessage/amsg_pots.h" + #include "../sink/snk_pots.h" + #include "../general/thread.h" + + #include + + typedef struct asnk_pots_obj { + + snk_pots_obj * snk_pots; + amsg_pots_obj * in; + thread_obj * thread; + + } asnk_pots_obj; + + asnk_pots_obj * asnk_pots_construct(const snk_pots_cfg * snk_pots_config, const msg_pots_cfg * msg_pots_config); + + void asnk_pots_destroy(asnk_pots_obj * obj); + + void asnk_pots_connect(asnk_pots_obj * obj, amsg_pots_obj * in); + + void asnk_pots_disconnect(asnk_pots_obj * obj); + + void * asnk_pots_thread(void * ptr); + +#endif \ No newline at end of file diff --git a/include/odas/asink/asnk_powers.h b/include/odas/asink/asnk_powers.h new file mode 100644 index 0000000..104faf4 --- /dev/null +++ b/include/odas/asink/asnk_powers.h @@ -0,0 +1,50 @@ +#ifndef __ODAS_ASINK_POWERS +#define __ODAS_ASINK_POWERS + + /** + * \file asink_powers.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../amessage/amsg_powers.h" + #include "../sink/snk_powers.h" + #include "../general/thread.h" + + #include + + typedef struct asnk_powers_obj { + + snk_powers_obj * snk_powers; + amsg_powers_obj * in; + thread_obj * thread; + + } asnk_powers_obj; + + asnk_powers_obj * asnk_powers_construct(const snk_powers_cfg * snk_powers_config, const msg_powers_cfg * msg_powers_config); + + void asnk_powers_destroy(asnk_powers_obj * obj); + + void asnk_powers_connect(asnk_powers_obj * obj, amsg_powers_obj * in); + + void asnk_powers_disconnect(asnk_powers_obj * obj); + + void * asnk_powers_thread(void * ptr); + +#endif \ No newline at end of file diff --git a/include/odas/asink/asnk_spectra.h b/include/odas/asink/asnk_spectra.h new file mode 100644 index 0000000..38a7265 --- /dev/null +++ b/include/odas/asink/asnk_spectra.h @@ -0,0 +1,50 @@ +#ifndef __ODAS_ASINK_SPECTRA +#define __ODAS_ASINK_SPECTRA + + /** + * \file asink_spectra.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../amessage/amsg_spectra.h" + #include "../sink/snk_spectra.h" + #include "../general/thread.h" + + #include + + typedef struct asnk_spectra_obj { + + snk_spectra_obj * snk_spectra; + amsg_spectra_obj * in; + thread_obj * thread; + + } asnk_spectra_obj; + + asnk_spectra_obj * asnk_spectra_construct(const snk_spectra_cfg * snk_spectra_config, const msg_spectra_cfg * msg_spectra_config); + + void asnk_spectra_destroy(asnk_spectra_obj * obj); + + void asnk_spectra_connect(asnk_spectra_obj * obj, amsg_spectra_obj * in); + + void asnk_spectra_disconnect(asnk_spectra_obj * obj); + + void * asnk_spectra_thread(void * ptr); + +#endif \ No newline at end of file diff --git a/include/odas/asink/asnk_tracks.h b/include/odas/asink/asnk_tracks.h new file mode 100644 index 0000000..6ec5c05 --- /dev/null +++ b/include/odas/asink/asnk_tracks.h @@ -0,0 +1,50 @@ +#ifndef __ODAS_ASINK_TRACKS +#define __ODAS_ASINK_TRACKS + + /** + * \file asink_tracks.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../amessage/amsg_tracks.h" + #include "../sink/snk_tracks.h" + #include "../general/thread.h" + + #include + + typedef struct asnk_tracks_obj { + + snk_tracks_obj * snk_tracks; + amsg_tracks_obj * in; + thread_obj * thread; + + } asnk_tracks_obj; + + asnk_tracks_obj * asnk_tracks_construct(const snk_tracks_cfg * snk_tracks_config, const msg_tracks_cfg * msg_tracks_config); + + void asnk_tracks_destroy(asnk_tracks_obj * obj); + + void asnk_tracks_connect(asnk_tracks_obj * obj, amsg_tracks_obj * in); + + void asnk_tracks_disconnect(asnk_tracks_obj * obj); + + void * asnk_tracks_thread(void * ptr); + +#endif \ No newline at end of file diff --git a/include/odas/asource/asrc_hops.h b/include/odas/asource/asrc_hops.h new file mode 100644 index 0000000..b25b715 --- /dev/null +++ b/include/odas/asource/asrc_hops.h @@ -0,0 +1,50 @@ +#ifndef __ODAS_ASOURCE_HOPS +#define __ODAS_ASOURCE_HOPS + + /** + * \file asource_hops.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../amessage/amsg_hops.h" + #include "../source/src_hops.h" + #include "../general/thread.h" + + #include + + typedef struct asrc_hops_obj { + + src_hops_obj * src_hops; + amsg_hops_obj * out; + thread_obj * thread; + + } asrc_hops_obj; + + asrc_hops_obj * asrc_hops_construct(const src_hops_cfg * src_hops_config, const msg_hops_cfg * msg_hops_config); + + void asrc_hops_destroy(asrc_hops_obj * obj); + + void asrc_hops_connect(asrc_hops_obj * obj, amsg_hops_obj * out); + + void asrc_hops_disconnect(asrc_hops_obj * obj); + + void * asrc_hops_thread(void * ptr); + +#endif \ No newline at end of file diff --git a/include/odas/connector/con_categories.h b/include/odas/connector/con_categories.h new file mode 100644 index 0000000..09d8d55 --- /dev/null +++ b/include/odas/connector/con_categories.h @@ -0,0 +1,46 @@ +#ifndef __ODAS_CONNECTOR_CATEGORIES +#define __ODAS_CONNECTOR_CATEGORIES + + /** + * \file con_categories.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../message/msg_categories.h" + + #include + #include + + typedef struct con_categories_obj { + + msg_categories_obj * in; + msg_categories_obj ** outs; + + unsigned int nOuts; + + } con_categories_obj; + + con_categories_obj * con_categories_construct(const unsigned int nOuts, const msg_categories_cfg * msg_categories_config); + + void con_categories_destroy(con_categories_obj * obj); + + int con_categories_process(con_categories_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/connector/con_hops.h b/include/odas/connector/con_hops.h new file mode 100644 index 0000000..9b41173 --- /dev/null +++ b/include/odas/connector/con_hops.h @@ -0,0 +1,46 @@ + /** + * \file con_hops.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#ifndef __ODAS_CONNECTOR_HOPS +#define __ODAS_CONNECTOR_HOPS + + #include "../message/msg_hops.h" + + #include + #include + + typedef struct con_hops_obj { + + msg_hops_obj * in; + msg_hops_obj ** outs; + + unsigned int nOuts; + + } con_hops_obj; + + con_hops_obj * con_hops_construct(const unsigned int nOuts, const msg_hops_cfg * msg_hops_config); + + void con_hops_destroy(con_hops_obj * obj); + + int con_hops_process(con_hops_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/connector/con_pots.h b/include/odas/connector/con_pots.h new file mode 100644 index 0000000..ceac877 --- /dev/null +++ b/include/odas/connector/con_pots.h @@ -0,0 +1,46 @@ +#ifndef __ODAS_CONNECTOR_POTS +#define __ODAS_CONNECTOR_POTS + + /** + * \file con_pots.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../message/msg_pots.h" + + #include + #include + + typedef struct con_pots_obj { + + msg_pots_obj * in; + msg_pots_obj ** outs; + + unsigned int nOuts; + + } con_pots_obj; + + con_pots_obj * con_pots_construct(const unsigned int nOuts, const msg_pots_cfg * msg_pots_config); + + void con_pots_destroy(con_pots_obj * obj); + + int con_pots_process(con_pots_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/connector/con_powers.h b/include/odas/connector/con_powers.h new file mode 100644 index 0000000..f038c65 --- /dev/null +++ b/include/odas/connector/con_powers.h @@ -0,0 +1,46 @@ +#ifndef __ODAS_CONNECTOR_POWERS +#define __ODAS_CONNECTOR_POWERS + + /** + * \file con_powers.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../message/msg_powers.h" + + #include + #include + + typedef struct con_powers_obj { + + msg_powers_obj * in; + msg_powers_obj ** outs; + + unsigned int nOuts; + + } con_powers_obj; + + con_powers_obj * con_powers_construct(const unsigned int nOuts, const msg_powers_cfg * msg_powers_config); + + void con_powers_destroy(con_powers_obj * obj); + + int con_powers_process(con_powers_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/connector/con_spectra.h b/include/odas/connector/con_spectra.h new file mode 100644 index 0000000..a1a21e7 --- /dev/null +++ b/include/odas/connector/con_spectra.h @@ -0,0 +1,46 @@ +#ifndef __ODAS_CONNECTOR_SPECTRA +#define __ODAS_CONNECTOR_SPECTRA + + /** + * \file con_spectra.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../message/msg_spectra.h" + + #include + #include + + typedef struct con_spectra_obj { + + msg_spectra_obj * in; + msg_spectra_obj ** outs; + + unsigned int nOuts; + + } con_spectra_obj; + + con_spectra_obj * con_spectra_construct(const unsigned int nOuts, const msg_spectra_cfg * msg_spectra_config); + + void con_spectra_destroy(con_spectra_obj * obj); + + int con_spectra_process(con_spectra_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/connector/con_targets.h b/include/odas/connector/con_targets.h new file mode 100644 index 0000000..7ef4ffd --- /dev/null +++ b/include/odas/connector/con_targets.h @@ -0,0 +1,46 @@ +#ifndef __ODAS_CONNECTOR_TARGETS +#define __ODAS_CONNECTOR_TARGETS + + /** + * \file con_targets.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../message/msg_targets.h" + + #include + #include + + typedef struct con_targets_obj { + + msg_targets_obj * in; + msg_targets_obj ** outs; + + unsigned int nOuts; + + } con_targets_obj; + + con_targets_obj * con_targets_construct(const unsigned int nOuts, const msg_targets_cfg * msg_targets_config); + + void con_targets_destroy(con_targets_obj * obj); + + int con_targets_process(con_targets_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/connector/con_tracks.h b/include/odas/connector/con_tracks.h new file mode 100644 index 0000000..d4191d3 --- /dev/null +++ b/include/odas/connector/con_tracks.h @@ -0,0 +1,46 @@ +#ifndef __ODAS_CONNECTOR_TRACKS +#define __ODAS_CONNECTOR_TRACKS + + /** + * \file con_tracks.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../message/msg_tracks.h" + + #include + #include + + typedef struct con_tracks_obj { + + msg_tracks_obj * in; + msg_tracks_obj ** outs; + + unsigned int nOuts; + + } con_tracks_obj; + + con_tracks_obj * con_tracks_construct(const unsigned int nOuts, const msg_tracks_cfg * msg_tracks_config); + + void con_tracks_destroy(con_tracks_obj * obj); + + int con_tracks_process(con_tracks_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/general/format.h b/include/odas/general/format.h new file mode 100644 index 0000000..e584bcd --- /dev/null +++ b/include/odas/general/format.h @@ -0,0 +1,63 @@ +#ifndef __ODAS_GENERAL_FORMAT +#define __ODAS_GENERAL_FORMAT + + /** + * \file format.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + + typedef enum format_type { + + format_undefined = 0, + format_binary_int08 = 8, + format_binary_int16 = 16, + format_binary_int24 = 24, + format_binary_int32 = 32, + format_binary_float = 1, + format_text_json = 2, + + } format_type; + + typedef struct format_obj { + + format_type type; + + } format_obj; + + format_obj * format_construct(); + + format_obj * format_construct_undefined(); + + format_obj * format_construct_binary_int(const unsigned int nBits); + + format_obj * format_construct_binary_float(); + + format_obj * format_construct_text_json(); + + format_obj * format_clone(const format_obj * obj); + + void format_destroy(format_obj * obj); + + void format_printf(const format_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/general/interface.h b/include/odas/general/interface.h new file mode 100644 index 0000000..552f620 --- /dev/null +++ b/include/odas/general/interface.h @@ -0,0 +1,73 @@ +#ifndef __ODAS_GENERAL_INTERFACE +#define __ODAS_GENERAL_INTERFACE + + /** + * \file interface.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef enum interface_type { + + interface_undefined = 0, + interface_blackhole = 1, + interface_file = 2, + interface_socket = 3, + interface_soundcard = 4, + interface_terminal = 5, + + } interface_type; + + typedef struct interface_obj { + + interface_type type; + + char * fileName; + + char * ip; + unsigned int port; + + unsigned int card; + unsigned int device; + + } interface_obj; + + interface_obj * interface_construct(); + + interface_obj * interface_construct_blackhole(); + + interface_obj * interface_construct_file(const char * fileName); + + interface_obj * interface_construct_socket(const char * ip, const unsigned int port); + + interface_obj * interface_construct_soundcard(const unsigned int card, const unsigned int device); + + interface_obj * interface_construct_terminal(void); + + interface_obj * interface_clone(const interface_obj * obj); + + void interface_destroy(interface_obj * obj); + + void interface_printf(const interface_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/general/link.h b/include/odas/general/link.h new file mode 100644 index 0000000..49d968a --- /dev/null +++ b/include/odas/general/link.h @@ -0,0 +1,45 @@ +#ifndef __ODAS_GENERAL_LINK +#define __ODAS_GENERAL_LINK + + /** + * \file link.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct links_obj { + + unsigned int * array; + unsigned int nLinks; + + } links_obj; + + links_obj * links_construct_zero(const unsigned int nLinks); + + links_obj * links_clone(const links_obj * obj); + + void links_destroy(links_obj * obj); + + void links_printf(const links_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/general/mic.h b/include/odas/general/mic.h new file mode 100644 index 0000000..565f680 --- /dev/null +++ b/include/odas/general/mic.h @@ -0,0 +1,50 @@ +#ifndef __ODAS_GENERAL_MIC +#define __ODAS_GENERAL_MIC + + /** + * \file mic.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct mics_obj { + + unsigned int nChannels; + unsigned int nPairs; + float * mu; + float * sigma2; + float * direction; + float * thetaAllPass; + float * thetaNoPass; + + } mics_obj; + + mics_obj * mics_construct_zero(const unsigned int nChannels); + + mics_obj * mics_clone(const mics_obj * obj); + + void mics_destroy(mics_obj * obj); + + void mics_printf(const mics_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/general/samplerate.h b/include/odas/general/samplerate.h new file mode 100644 index 0000000..b92e64e --- /dev/null +++ b/include/odas/general/samplerate.h @@ -0,0 +1,44 @@ +#ifndef __ODAS_GENERAL_SAMPLERATE +#define __ODAS_GENERAL_SAMPLERATE + + /** + * \file samplerate.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + + typedef struct samplerate_obj { + + unsigned int mu; + float sigma2; + + } samplerate_obj; + + samplerate_obj * samplerate_construct_zero(void); + + samplerate_obj * samplerate_clone(const samplerate_obj * obj); + + void samplerate_destroy(samplerate_obj * obj); + + void samplerate_printf(const samplerate_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/general/soundspeed.h b/include/odas/general/soundspeed.h new file mode 100644 index 0000000..3a9224e --- /dev/null +++ b/include/odas/general/soundspeed.h @@ -0,0 +1,44 @@ +#ifndef __ODAS_GENERAL_SOUNDSPEED +#define __ODAS_GENERAL_SOUNDSPEED + + /** + * \file soundspeed.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + + typedef struct soundspeed_obj { + + float mu; + float sigma2; + + } soundspeed_obj; + + soundspeed_obj * soundspeed_construct_zero(void); + + soundspeed_obj * soundspeed_clone(const soundspeed_obj * obj); + + void soundspeed_destroy(soundspeed_obj * obj); + + void soundspeed_printf(const soundspeed_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/general/spatialfilter.h b/include/odas/general/spatialfilter.h new file mode 100644 index 0000000..6d4910c --- /dev/null +++ b/include/odas/general/spatialfilter.h @@ -0,0 +1,46 @@ +#ifndef __ODAS_SIGNAL_SPATIALFILTER +#define __ODAS_SIGNAL_SPATIALFILTER + + /** + * \file spatialfilter.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct spatialfilter_obj { + + float * direction; + float thetaAllPass; + float thetaNoPass; + + } spatialfilter_obj; + + spatialfilter_obj * spatialfilter_construct_zero(void); + + spatialfilter_obj * spatialfilter_clone(const spatialfilter_obj * obj); + + void spatialfilter_destroy(spatialfilter_obj * obj); + + void spatialfilter_printf(const spatialfilter_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/general/thread.h b/include/odas/general/thread.h new file mode 100644 index 0000000..656c549 --- /dev/null +++ b/include/odas/general/thread.h @@ -0,0 +1,52 @@ +#ifndef __ODAS_GENERAL_THREAD +#define __ODAS_GENERAL_THREAD + + /** + * \file thread.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct thread_obj { + + pthread_mutex_t use; + char stop; + pthread_t thread; + void * (* start_routine) (void *); + void * arg; + + } thread_obj; + + thread_obj * thread_construct(void * (* start_routine) (void *), void * arg); + + void thread_destroy(thread_obj * obj); + + void thread_start(thread_obj * obj); + + void thread_stop(thread_obj * obj); + + char thread_askedToStop(thread_obj * obj); + + void thread_join(thread_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/init/combining.h b/include/odas/init/combining.h new file mode 100644 index 0000000..b438ee4 --- /dev/null +++ b/include/odas/init/combining.h @@ -0,0 +1,31 @@ +#ifndef __ODAS_INIT_COMBINING +#define __ODAS_INIT_COMBINING + + /** + * \file combining.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + + assignations_obj * combining_generate(const unsigned int nPots, const unsigned int nTracks); + +#endif diff --git a/include/odas/init/delay.h b/include/odas/init/delay.h new file mode 100644 index 0000000..536b7ca --- /dev/null +++ b/include/odas/init/delay.h @@ -0,0 +1,46 @@ +#ifndef __ODAS_INIT_DELAY +#define __ODAS_INIT_DELAY + + /** + * \file delay.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + + #include + #include + + #include + #include + #include + #include + + tdoas_obj * delay_tdoas(const points_obj * points, const mics_obj * mics, const soundspeed_obj * soundspeed, const unsigned int fS, const unsigned int frameSize, const unsigned int interpRate); + + //tdoas_obj * delay_tdoas_minmax(const tdoas_obj * tdoas, const deltas_obj * deltas); + + //void delay_tdoas_allminmax(tdoas_obj * tdoas, const tdoas_obj * minmax); + + taus_obj * delay_taus(const points_obj * points, const mics_obj * mics, const soundspeed_obj * soundspeed, const unsigned int fS, const unsigned int frameSize, const unsigned int interpRate); + +#endif + + diff --git a/include/odas/init/directivity.h b/include/odas/init/directivity.h new file mode 100644 index 0000000..e1f04d9 --- /dev/null +++ b/include/odas/init/directivity.h @@ -0,0 +1,53 @@ +#ifndef __ODAS_INIT_DIRECTIVITY +#define __ODAS_INIT_DIRECTIVITY + + /** + * \file directivity.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + + #include + #include + + #include + #include + #include + #include + #include + #include + + beampatterns_obj * directivity_beampattern_mics(const mics_obj * mics, const unsigned int nThetas); + + beampatterns_obj * directivity_beampattern_spatialfilter(const spatialfilter_obj * spatialfilter, const unsigned int nThetas); + + spatialgains_obj * directivity_spatialgains(const mics_obj * mics, const beampatterns_obj * beampatterns_mics, const spatialfilter_obj * spatialfilter, const beampatterns_obj * beampatterns_spatialfilter, const points_obj * points); + + spatialmasks_obj * directivity_spatialmasks(const spatialgains_obj * spatialgains, const float minGain); + + spatialindexes_obj * directivity_spatialindexes(const spatialmasks_obj * spatialmasks); + + pairs_obj * directivity_pairs(const spatialmasks_obj * spatialmasks); + + void directivity_pairsadd(pairs_obj * destPairs, const pairs_obj * srcPairs); + +#endif diff --git a/include/odas/init/hit.h b/include/odas/init/hit.h new file mode 100644 index 0000000..91dc3f5 --- /dev/null +++ b/include/odas/init/hit.h @@ -0,0 +1,48 @@ +#ifndef __ODAS_INIT_HIT +#define __ODAS_INIT_HIT + + /** + * \file hit.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + + #include + #include + #include + #include + #include + + areas_obj * hit_areas_zero(const taus_obj * taus, const tdoas_obj * tdoas, const deltas_obj * deltas); + + void hit_areas_pair(areas_obj * areas, const taus_obj * taus, const tdoas_obj * tdoas, const deltas_obj * deltas, const spatialmasks_obj * spatialmasks, const unsigned int iPair); + + float hit_areas_min(const areas_obj * areas, const spatialmasks_obj * spatialmasks); + + area_obj * hit_area_zero(const taus_obj * taus, const tdoas_obj * tdoas, const deltas_obj * deltas); + + void hit_area_pair(area_obj * area, const areas_obj * areas, const taus_obj * taus, const tdoas_obj * tdoas, const deltas_obj * deltas, const spatialmasks_obj * spatialmasks, const unsigned int iPair); + + deltas_obj * hit_train(const taus_obj * taus, const tdoas_obj * tdoas, const spatialmasks_obj * spatialmasks, const float probMin); + + deltas_obj * hit_constant(const tdoas_obj * tdoas, const unsigned int delta); + +#endif diff --git a/include/odas/init/linking.h b/include/odas/init/linking.h new file mode 100644 index 0000000..a6c7b9c --- /dev/null +++ b/include/odas/init/linking.h @@ -0,0 +1,42 @@ +#ifndef __ODAS_INIT_LINKING +#define __ODAS_INIT_LINKING + + /** + * \file linking.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + #include + #include + #include + #include + #include + + maps_obj * linking_maps(const tdoas_obj * tdoasCoarse, const tdoas_obj * tdoasFine, const deltas_obj * deltasCoarse, const deltas_obj * deltasFine, const spatialmasks_obj * spatialmasksCoarse, const spatialmasks_obj * spatialmasksFine, const unsigned int nMatches); + + indexes_obj * linking_indexes(const maps_obj * maps); + + float linking_overlap(const float lambdaCoarseLeft, const float lambdaCoarseRight, const float lambdaFineLeft, const float lambdaFineRight); + +#endif diff --git a/include/odas/init/scanning.h b/include/odas/init/scanning.h new file mode 100644 index 0000000..4df39b9 --- /dev/null +++ b/include/odas/init/scanning.h @@ -0,0 +1,47 @@ +#ifndef __ODAS_INIT_SCANNING +#define __ODAS_INIT_SCANNING + + /** + * \file scanning.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + #include + #include + #include + #include + #include + #include + #include + #include + + #include + #include + #include + #include + #include + + scans_obj * scanning_init_scans(const mics_obj * mics, const spatialfilter_obj * spatialfilter, const unsigned int nLevels, const unsigned int * levels, const unsigned int fS, const soundspeed_obj * soundspeed, const unsigned int nMatches, const unsigned int frameSize, const signed int * deltas, const float probMin, const unsigned int nRefineLevels, const unsigned int nThetas, const float gainMin, const unsigned int interpRate); + +#endif diff --git a/include/odas/init/space.h b/include/odas/init/space.h new file mode 100644 index 0000000..27b1d6c --- /dev/null +++ b/include/odas/init/space.h @@ -0,0 +1,52 @@ +#ifndef __ODAS_INIT_SPACE +#define __ODAS_INIT_SPACE + + /** + * \file space.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + #include "../signal/triangle.h" + #include "../signal/point.h" + + triangles_obj * space_triangles_level_zero(void); + + triangles_obj * space_triangles_level_next(const triangles_obj * triangles); + + triangles_obj * space_triangles_level_level(const unsigned int level); + + triangles_obj * space_triangles_points(const points_obj * points, const unsigned int index); + + points_obj * space_points_triangles(const triangles_obj * triangles); + + points_obj * space_points_fine(const points_obj * points, const unsigned int level); + + points_obj * space_sphere(const unsigned int level); + + points_obj * space_halfsphere(const unsigned int level); + + float space_distances_shortest_triangles(const triangles_obj * triangles); + + float space_distances_shortest_points(const points_obj * points); + +#endif \ No newline at end of file diff --git a/include/odas/init/windowing.h b/include/odas/init/windowing.h new file mode 100644 index 0000000..db25ee8 --- /dev/null +++ b/include/odas/init/windowing.h @@ -0,0 +1,36 @@ +#ifndef __ODAS_INIT_WINDOWING +#define __ODAS_INIT_WINDOWING + + /** + * \file windowing.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + + #include "../signal/window.h" + + window_obj * windowing_hann(const unsigned int frameSize); + + window_obj * windowing_roothann(const unsigned int frameSize); + +#endif + + \ No newline at end of file diff --git a/include/odas/injector/inj_targets.h b/include/odas/injector/inj_targets.h new file mode 100644 index 0000000..6dacfd7 --- /dev/null +++ b/include/odas/injector/inj_targets.h @@ -0,0 +1,73 @@ +#ifndef __ODAS_INJECTOR_TARGETS +#define __ODAS_INJECTOR_TARGETS + + /** + * \file inj_targets.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../message/msg_hops.h" + #include "../message/msg_targets.h" + + #include "../general/format.h" + #include "../general/interface.h" + + #include + #include + #include + + typedef struct inj_targets_obj { + + unsigned long long timeStamp; + + unsigned int nTargets; + unsigned int fS; + + msg_hops_obj * in; + msg_targets_obj * out; + + targets_obj * targets; + + } inj_targets_obj; + + typedef struct inj_targets_cfg { + + unsigned int nTargets; + targets_obj * targets; + + } inj_targets_cfg; + + inj_targets_obj * inj_targets_construct(const inj_targets_cfg * inj_targets_config, const msg_hops_cfg * msg_hops_config, const msg_targets_cfg * msg_targets_config); + + void inj_targets_destroy(inj_targets_obj * obj); + + void inj_targets_connect(inj_targets_obj * obj, msg_hops_obj * in, msg_targets_obj * out); + + void inj_targets_disconnect(inj_targets_obj * obj); + + int inj_targets_process(inj_targets_obj * obj); + + inj_targets_cfg * inj_targets_cfg_construct(void); + + void inj_targets_cfg_destroy(inj_targets_cfg * cfg); + + void inj_targets_cfg_printf(const inj_targets_cfg * cfg); + +#endif \ No newline at end of file diff --git a/include/odas/message/msg_categories.h b/include/odas/message/msg_categories.h new file mode 100644 index 0000000..94cdec4 --- /dev/null +++ b/include/odas/message/msg_categories.h @@ -0,0 +1,60 @@ +#ifndef __ODAS_MESSAGE_CATEGORIES +#define __ODAS_MESSAGE_CATEGORIES + + /** + * \file msg_categories.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + + typedef struct msg_categories_obj { + + unsigned long long timeStamp; + unsigned int fS; + categories_obj * categories; + + } msg_categories_obj; + + typedef struct msg_categories_cfg { + + unsigned int nChannels; + unsigned int fS; + + } msg_categories_cfg; + + msg_categories_obj * msg_categories_construct(const msg_categories_cfg * msg_categories_config); + + void msg_categories_destroy(msg_categories_obj * obj); + + void msg_categories_copy(msg_categories_obj * dest, const msg_categories_obj * src); + + void msg_categories_zero(msg_categories_obj * obj); + + unsigned int msg_categories_isZero(const msg_categories_obj * obj); + + msg_categories_cfg * msg_categories_cfg_construct(void); + + void msg_categories_cfg_destroy(msg_categories_cfg * msg_categories_config); + + void msg_categories_cfg_printf(const msg_categories_cfg * msg_categories_config); + +#endif diff --git a/include/odas/message/msg_hops.h b/include/odas/message/msg_hops.h new file mode 100644 index 0000000..8deff09 --- /dev/null +++ b/include/odas/message/msg_hops.h @@ -0,0 +1,62 @@ +#ifndef __ODAS_MESSAGE_HOPS +#define __ODAS_MESSAGE_HOPS + + /** + * \file msg_hops.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include "../signal/hop.h" + #include "../utils/fifo.h" + + typedef struct msg_hops_obj { + + unsigned long long timeStamp; + unsigned int fS; + hops_obj * hops; + + } msg_hops_obj; + + typedef struct msg_hops_cfg { + + unsigned int hopSize; + unsigned int nChannels; + unsigned int fS; + + } msg_hops_cfg; + + msg_hops_obj * msg_hops_construct(const msg_hops_cfg * msg_hops_config); + + void msg_hops_destroy(msg_hops_obj * obj); + + void msg_hops_copy(msg_hops_obj * dest, const msg_hops_obj * src); + + void msg_hops_zero(msg_hops_obj * obj); + + unsigned int msg_hops_isZero(const msg_hops_obj * obj); + + msg_hops_cfg * msg_hops_cfg_construct(void); + + void msg_hops_cfg_destroy(msg_hops_cfg * msg_hops_config); + + void msg_hops_cfg_printf(const msg_hops_cfg * msg_hops_config); + +#endif \ No newline at end of file diff --git a/include/odas/message/msg_pots.h b/include/odas/message/msg_pots.h new file mode 100644 index 0000000..a4e6d14 --- /dev/null +++ b/include/odas/message/msg_pots.h @@ -0,0 +1,60 @@ +#ifndef __ODAS_MESSAGE_POTS +#define __ODAS_MESSAGE_POTS + + /** + * \file msg_pots.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include "../signal/pot.h" + + typedef struct msg_pots_obj { + + unsigned long long timeStamp; + unsigned int fS; + pots_obj * pots; + + } msg_pots_obj; + + typedef struct msg_pots_cfg { + + unsigned int nPots; + unsigned int fS; + + } msg_pots_cfg; + + msg_pots_obj * msg_pots_construct(const msg_pots_cfg * cfg); + + void msg_pots_destroy(msg_pots_obj * obj); + + void msg_pots_copy(msg_pots_obj * dest, const msg_pots_obj * src); + + void msg_pots_zero(msg_pots_obj * obj); + + unsigned int msg_pots_isZero(const msg_pots_obj * obj); + + msg_pots_cfg * msg_pots_cfg_construct(void); + + void msg_pots_cfg_destroy(msg_pots_cfg * cfg); + + void msg_pots_cfg_printf(const msg_pots_cfg * msg_pots_config); + +#endif \ No newline at end of file diff --git a/include/odas/message/msg_powers.h b/include/odas/message/msg_powers.h new file mode 100644 index 0000000..a8a1a54 --- /dev/null +++ b/include/odas/message/msg_powers.h @@ -0,0 +1,62 @@ +#ifndef __ODAS_MESSAGE_POWERS +#define __ODAS_MESSAGE_POWERS + + /** + * \file msg_powers.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + + #include "../signal/env.h" + + typedef struct msg_powers_obj { + + unsigned long long timeStamp; + unsigned int fS; + envs_obj * envs; + + } msg_powers_obj; + + typedef struct msg_powers_cfg { + + unsigned int halfFrameSize; + unsigned int nChannels; + unsigned int fS; + + } msg_powers_cfg; + + msg_powers_obj * msg_powers_construct(const msg_powers_cfg * msg_powers_config); + + void msg_powers_destroy(msg_powers_obj * obj); + + void msg_powers_copy(msg_powers_obj * dest, const msg_powers_obj * src); + + void msg_powers_zero(msg_powers_obj * obj); + + unsigned int msg_powers_isZero(const msg_powers_obj * obj); + + msg_powers_cfg * msg_powers_cfg_construct(void); + + void msg_powers_cfg_destroy(msg_powers_cfg * msg_powers_config); + + void msg_powers_cfg_printf(const msg_powers_cfg * msg_powers_config); + +#endif \ No newline at end of file diff --git a/include/odas/message/msg_spectra.h b/include/odas/message/msg_spectra.h new file mode 100644 index 0000000..1615786 --- /dev/null +++ b/include/odas/message/msg_spectra.h @@ -0,0 +1,62 @@ +#ifndef __ODAS_MESSAGE_SPECTRA +#define __ODAS_MESSAGE_SPECTRA + + /** + * \file msg_spectra.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + + #include "../signal/freq.h" + + typedef struct msg_spectra_obj { + + unsigned long long timeStamp; + unsigned int fS; + freqs_obj * freqs; + + } msg_spectra_obj; + + typedef struct msg_spectra_cfg { + + unsigned int halfFrameSize; + unsigned int nChannels; + unsigned int fS; + + } msg_spectra_cfg; + + msg_spectra_obj * msg_spectra_construct(const msg_spectra_cfg * msg_spectra_config); + + void msg_spectra_destroy(msg_spectra_obj * obj); + + void msg_spectra_copy(msg_spectra_obj * dest, const msg_spectra_obj * src); + + void msg_spectra_zero(msg_spectra_obj * obj); + + unsigned int msg_spectra_isZero(const msg_spectra_obj * obj); + + msg_spectra_cfg * msg_spectra_cfg_construct(void); + + void msg_spectra_cfg_destroy(msg_spectra_cfg * msg_spectra_config); + + void msg_spectra_cfg_printf(const msg_spectra_cfg * msg_spectra_config); + +#endif \ No newline at end of file diff --git a/include/odas/message/msg_targets.h b/include/odas/message/msg_targets.h new file mode 100644 index 0000000..d614d81 --- /dev/null +++ b/include/odas/message/msg_targets.h @@ -0,0 +1,60 @@ +#ifndef __ODAS_MESSAGE_TARGETS +#define __ODAS_MESSAGE_TARGETS + + /** + * \file msg_targets.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include "../signal/target.h" + + typedef struct msg_targets_obj { + + unsigned long long timeStamp; + unsigned int fS; + targets_obj * targets; + + } msg_targets_obj; + + typedef struct msg_targets_cfg { + + unsigned int nTargets; + unsigned int fS; + + } msg_targets_cfg; + + msg_targets_obj * msg_targets_construct(const msg_targets_cfg * cfg); + + void msg_targets_destroy(msg_targets_obj * obj); + + void msg_targets_copy(msg_targets_obj * dest, const msg_targets_obj * src); + + void msg_targets_zero(msg_targets_obj * obj); + + unsigned int msg_targets_isZero(const msg_targets_obj * obj); + + msg_targets_cfg * msg_targets_cfg_construct(void); + + void msg_targets_cfg_destroy(msg_targets_cfg * cfg); + + void msg_targets_cfg_printf(const msg_targets_cfg * msg_targets_config); + +#endif \ No newline at end of file diff --git a/include/odas/message/msg_tracks.h b/include/odas/message/msg_tracks.h new file mode 100644 index 0000000..fc54fe7 --- /dev/null +++ b/include/odas/message/msg_tracks.h @@ -0,0 +1,60 @@ +#ifndef __ODAS_MESSAGE_TRACKS +#define __ODAS_MESSAGE_TRACKS + + /** + * \file msg_tracks.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include "../signal/track.h" + + typedef struct msg_tracks_obj { + + unsigned long long timeStamp; + unsigned int fS; + tracks_obj * tracks; + + } msg_tracks_obj; + + typedef struct msg_tracks_cfg { + + unsigned int nTracks; + unsigned int fS; + + } msg_tracks_cfg; + + msg_tracks_obj * msg_tracks_construct(const msg_tracks_cfg * cfg); + + void msg_tracks_destroy(msg_tracks_obj * obj); + + void msg_tracks_copy(msg_tracks_obj * dest, const msg_tracks_obj * src); + + void msg_tracks_zero(msg_tracks_obj * obj); + + unsigned int msg_tracks_isZero(const msg_tracks_obj * obj); + + msg_tracks_cfg * msg_tracks_cfg_construct(void); + + void msg_tracks_cfg_destroy(msg_tracks_cfg * cfg); + + void msg_tracks_cfg_printf(const msg_tracks_cfg * msg_tracks_config); + +#endif \ No newline at end of file diff --git a/include/odas/module/mod_classify.h b/include/odas/module/mod_classify.h new file mode 100644 index 0000000..2280f26 --- /dev/null +++ b/include/odas/module/mod_classify.h @@ -0,0 +1,96 @@ +#ifndef __ODAS_MODULE_CLASSIFY +#define __ODAS_MODULE_CLASSIFY + + /** + * \file mod_classify.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + + #include + #include + #include + + #include + #include + #include + #include + #include + #include + + #include + #include + #include + #include + #include + + typedef struct mod_classify_obj { + + frames_obj * frames; + freqs_obj * freqs; + acorrs_obj * acorrs; + pitches_obj * pitches; + + hop2frame_obj * hop2frame; + frame2freq_obj * frame2freq; + freq2acorr_obj * freq2acorr; + acorr2pitch_obj * acorr2pitch; + pitch2category_obj * pitch2category; + + msg_hops_obj * in1; + msg_tracks_obj * in2; + msg_categories_obj * out; + + } mod_classify_obj; + + typedef struct mod_classify_cfg { + + unsigned int frameSize; + unsigned int winSize; + + float tauMin; + float tauMax; + float deltaTauMax; + float alpha; + float gamma; + float phiMin; + float r0; + + } mod_classify_cfg; + + mod_classify_obj * mod_classify_construct(const mod_classify_cfg * mod_classify_config, const msg_hops_cfg * msg_hops_config, const msg_tracks_cfg * msg_tracks_config, const msg_categories_cfg * msg_categories_config); + + void mod_classify_destroy(mod_classify_obj * obj); + + int mod_classify_process(mod_classify_obj * obj); + + void mod_classify_connect(mod_classify_obj * obj, msg_hops_obj * in1, msg_tracks_obj * in2, msg_categories_obj * out); + + void mod_classify_disconnect(mod_classify_obj * obj); + + mod_classify_cfg * mod_classify_cfg_construct(void); + + void mod_classify_cfg_destroy(mod_classify_cfg * cfg); + + void mod_classify_cfg_printf(const mod_classify_cfg * cfg); + +#endif diff --git a/include/odas/module/mod_istft.h b/include/odas/module/mod_istft.h new file mode 100644 index 0000000..0d5e09b --- /dev/null +++ b/include/odas/module/mod_istft.h @@ -0,0 +1,64 @@ +#ifndef __ODAS_MODULE_ISTFT +#define __ODAS_MODULE_ISTFT + + /** + * \file mod_istft.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../system/freq2frame.h" + #include "../signal/frame.h" + #include "../system/frame2hop.h" + + #include "../message/msg_hops.h" + #include "../message/msg_spectra.h" + + typedef struct mod_istft_obj { + + freq2frame_obj * freq2frame; + frames_obj * frames; + frame2hop_obj * frame2hop; + + msg_spectra_obj * in; + msg_hops_obj * out; + + } mod_istft_obj; + + typedef struct mod_istft_cfg { + + } mod_istft_cfg; + + mod_istft_obj * mod_istft_construct(const mod_istft_cfg * mod_istft_config, const msg_spectra_cfg * msg_spectra_config, const msg_hops_cfg * msg_hops_config); + + void mod_istft_destroy(mod_istft_obj * obj); + + int mod_istft_process(mod_istft_obj * obj); + + void mod_istft_connect(mod_istft_obj * obj, msg_spectra_obj * in, msg_hops_obj * out); + + void mod_istft_disconnect(mod_istft_obj * obj); + + mod_istft_cfg * mod_istft_cfg_construct(void); + + void mod_istft_cfg_destroy(mod_istft_cfg * cfg); + + void mod_istft_cfg_printf(const mod_istft_cfg * cfg); + +#endif \ No newline at end of file diff --git a/include/odas/module/mod_mapping.h b/include/odas/module/mod_mapping.h new file mode 100644 index 0000000..318e217 --- /dev/null +++ b/include/odas/module/mod_mapping.h @@ -0,0 +1,64 @@ +#ifndef __ODAS_MODULE_MAPPING +#define __ODAS_MODULE_MAPPING + + /** + * \file mod_mapping.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../message/msg_hops.h" + #include "../message/msg_spectra.h" + + #include "../general/link.h" + #include "../system/hop2hop.h" + + typedef struct mod_mapping_obj { + + hop2hop_multiplex_obj * hop2hop_multiplex; + links_obj * links; + + msg_hops_obj * in; + msg_hops_obj * out; + + } mod_mapping_obj; + + typedef struct mod_mapping_cfg { + + links_obj * links; + + } mod_mapping_cfg; + + mod_mapping_obj * mod_mapping_construct(const mod_mapping_cfg * mod_mapping_config, const msg_hops_cfg * msg_hops_config); + + void mod_mapping_destroy(mod_mapping_obj * obj); + + int mod_mapping_process(mod_mapping_obj * obj); + + void mod_mapping_connect(mod_mapping_obj * obj, msg_hops_obj * in, msg_hops_obj * out); + + void mod_mapping_disconnect(mod_mapping_obj * obj); + + mod_mapping_cfg * mod_mapping_cfg_construct(void); + + void mod_mapping_cfg_destroy(mod_mapping_cfg * cfg); + + void mod_mapping_cfg_printf(const mod_mapping_cfg * cfg); + +#endif \ No newline at end of file diff --git a/include/odas/module/mod_noise.h b/include/odas/module/mod_noise.h new file mode 100644 index 0000000..7a4dcfe --- /dev/null +++ b/include/odas/module/mod_noise.h @@ -0,0 +1,68 @@ +#ifndef __ODAS_MODULE_NOISE +#define __ODAS_MODULE_NOISE + + /** + * \file mod_noise.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../system/freq2env.h" + #include "../system/env2env.h" + #include "../message/msg_spectra.h" + #include "../message/msg_powers.h" + + typedef struct mod_noise_obj { + + freq2env_obj * freq2env; + envs_obj * envs; + env2env_mcra_obj * env2env_mcra; + + msg_spectra_obj * in; + msg_powers_obj * out; + + } mod_noise_obj; + + typedef struct mod_noise_cfg { + + unsigned int bSize; + float alphaS; + unsigned int L; + float delta; + float alphaD; + + } mod_noise_cfg; + + mod_noise_obj * mod_noise_construct(const mod_noise_cfg * mod_noise_config, const msg_spectra_cfg * msg_spectra_config, const msg_powers_cfg * msg_powers_config); + + void mod_noise_destroy(mod_noise_obj * obj); + + int mod_noise_process(mod_noise_obj * obj); + + void mod_noise_connect(mod_noise_obj * obj, msg_spectra_obj * in, msg_powers_obj * out); + + void mod_noise_disconnect(mod_noise_obj * obj); + + mod_noise_cfg * mod_noise_cfg_construct(void); + + void mod_noise_cfg_destroy(mod_noise_cfg * cfg); + + void mod_noise_cfg_printf(const mod_noise_cfg * cfg); + +#endif \ No newline at end of file diff --git a/include/odas/module/mod_resample.h b/include/odas/module/mod_resample.h new file mode 100644 index 0000000..da22629 --- /dev/null +++ b/include/odas/module/mod_resample.h @@ -0,0 +1,117 @@ +#ifndef __ODAS_MODULE_RS +#define __ODAS_MODULE_RS + + /** + * \file mod_rs.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + + #include "../message/msg_hops.h" + + #include "../signal/hop.h" + #include "../signal/frame.h" + #include "../signal/freq.h" + + #include "../system/hop2frame.h" + #include "../system/hop2hop.h" + #include "../system/frame2freq.h" + #include "../system/freq2freq.h" + #include "../system/freq2frame.h" + #include "../system/frame2hop.h" + + #include + #include + #include + + typedef struct mod_resample_obj { + + unsigned long long timeStamp; + char noMorePush; + + char type; + + unsigned int nChannels; + unsigned int fSin; + unsigned int fSout; + unsigned int hopSizeIn; + unsigned int hopSizeOut; + float ratio; + + unsigned int frameSize; + unsigned int halfFrameSize; + unsigned int lowPassCut; + + hop2hop_buffer_obj * hop2hop; + + hop2frame_obj * hop2frame; + frames_obj * framesAnalysis; + frame2freq_obj * frame2freq; + freqs_obj * freqsAnalysis; + freq2freq_lowpass_obj * freq2freq_lowpass; + freqs_obj * freqsSynthesis; + freq2frame_obj * freq2frame; + frames_obj * framesSynthesis; + frame2hop_obj * frame2hop; + hops_obj * hops; + + msg_hops_obj * in; + msg_hops_obj * out; + + } mod_resample_obj; + + typedef struct mod_resample_cfg { + + unsigned int fSin; + unsigned int fSout; + + } mod_resample_cfg; + + mod_resample_obj * mod_resample_construct(const mod_resample_cfg * mod_resample_config, const msg_hops_cfg * msg_hops_in_config, const msg_hops_cfg * msg_hops_out_config); + + void mod_resample_destroy(mod_resample_obj * obj); + + int mod_resample_process_push(mod_resample_obj * obj); + + int mod_resample_process_pop(mod_resample_obj * obj); + + int mod_resample_process_push_down(mod_resample_obj * obj); + + int mod_resample_process_push_up(mod_resample_obj * obj); + + int mod_resample_process_push_same(mod_resample_obj * obj); + + int mod_resample_process_pop_down(mod_resample_obj * obj); + + int mod_resample_process_pop_up(mod_resample_obj * obj); + + int mod_resample_process_pop_same(mod_resample_obj * obj); + + void mod_resample_connect(mod_resample_obj * obj, msg_hops_obj * in, msg_hops_obj * out); + + void mod_resample_disconnect(mod_resample_obj * obj); + + mod_resample_cfg * mod_resample_cfg_construct(void); + + void mod_resample_cfg_destroy(mod_resample_cfg * cfg); + + void mod_resample_cfg_printf(const mod_resample_cfg * cfg); + +#endif \ No newline at end of file diff --git a/include/odas/module/mod_ssl.h b/include/odas/module/mod_ssl.h new file mode 100644 index 0000000..d27fdce --- /dev/null +++ b/include/odas/module/mod_ssl.h @@ -0,0 +1,126 @@ +#ifndef __ODAS_MODULE_SSL +#define __ODAS_MODULE_SSL + + /** + * \file mod_ssl.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + + #include "../general/mic.h" + #include "../general/samplerate.h" + #include "../general/soundspeed.h" + #include "../general/spatialfilter.h" + + #include "../signal/aimg.h" + #include "../signal/env.h" + #include "../signal/freq.h" + #include "../signal/xcorr.h" + + #include "../system/env2env.h" + #include "../system/freq2env.h" + #include "../system/freq2freq.h" + #include "../system/freq2xcorr.h" + #include "../system/xcorr2aimg.h" + #include "../system/xcorr2xcorr.h" + + #include "../init/scanning.h" + + #include "../message/msg_spectra.h" + #include "../message/msg_powers.h" + #include "../message/msg_pots.h" + + + typedef struct mod_ssl_obj { + + unsigned int nChannels; + unsigned int nPairs; + unsigned int nPots; + unsigned int nLevels; + unsigned int frameSize; + unsigned int halfFrameSize; + unsigned int frameSizeInterp; + unsigned int halfFrameSizeInterp; + unsigned int interpRate; + + scans_obj * scans; + + freqs_obj * phasors; + freqs_obj * products; + freqs_obj * productsInterp; + xcorrs_obj * xcorrs; + xcorrs_obj * xcorrsMax; + + freq2env_obj * freq2env; + freq2freq_phasor_obj * freq2freq_phasor; + freq2freq_product_obj * freq2freq_product; + freq2freq_interpolate_obj * freq2freq_interpolate; + freq2xcorr_obj * freq2xcorr; + xcorr2xcorr_obj * xcorr2xcorr; + + aimg_obj ** aimgs; + xcorr2aimg_obj ** xcorr2aimg; + + pots_obj * pots; + + msg_spectra_obj * in; + msg_pots_obj * out; + + } mod_ssl_obj; + + typedef struct mod_ssl_cfg { + + mics_obj * mics; + samplerate_obj * samplerate; + soundspeed_obj * soundspeed; + spatialfilter_obj * spatialfilter; + + unsigned int interpRate; + float epsilon; + unsigned int nLevels; + unsigned int * levels; + signed int * deltas; + unsigned int nMatches; + float probMin; + unsigned int nRefinedLevels; + unsigned int nThetas; + float gainMin; + + } mod_ssl_cfg; + + mod_ssl_obj * mod_ssl_construct(const mod_ssl_cfg * mod_ssl_config, const msg_spectra_cfg * msg_spectra_config, const msg_pots_cfg * msg_pots_config); + + void mod_ssl_destroy(mod_ssl_obj * obj); + + int mod_ssl_process(mod_ssl_obj * obj); + + void mod_ssl_connect(mod_ssl_obj * obj, msg_spectra_obj * in, msg_pots_obj * out); + + void mod_ssl_disconnect(mod_ssl_obj * obj); + + mod_ssl_cfg * mod_ssl_cfg_construct(void); + + void mod_ssl_cfg_destroy(mod_ssl_cfg * cfg); + + void mod_ssl_cfg_printf(const mod_ssl_cfg * cfg); + +#endif \ No newline at end of file diff --git a/include/odas/module/mod_sss.h b/include/odas/module/mod_sss.h new file mode 100644 index 0000000..4b3d5d0 --- /dev/null +++ b/include/odas/module/mod_sss.h @@ -0,0 +1,201 @@ +#ifndef __ODAS_MODULE_SSS +#define __ODAS_MODULE_SSS + + /** + * \file mod_sss.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../general/mic.h" + #include "../general/samplerate.h" + #include "../general/soundspeed.h" + #include "../general/spatialfilter.h" + + #include "../init/directivity.h" + + #include "../message/msg_powers.h" + #include "../message/msg_spectra.h" + #include "../message/msg_tracks.h" + + #include "../signal/beampattern.h" + #include "../signal/steer.h" + #include "../signal/gain.h" + #include "../signal/demixing.h" + #include "../signal/env.h" + + #include "../system/demixing2env.h" + #include "../system/demixing2freq.h" + #include "../system/env2env.h" + #include "../system/freq2env.h" + #include "../system/freq2freq.h" + #include "../system/gain2mask.h" + #include "../system/track2steer.h" + #include "../system/track2gain.h" + #include "../system/steer2demixing.h" + + #include + #include + + typedef struct mod_sss_obj { + + unsigned int nSeps; + unsigned int nChannels; + unsigned int halfFrameSize; + + char mode_sep; + char mode_pf; + + beampatterns_obj * sep_ds_beampatterns_mics; + beampatterns_obj * sep_ds_beampatterns_spatialfilter; + steers_obj * sep_ds_steers; + gains_obj * sep_ds_gains; + masks_obj * sep_ds_masks; + tracks_obj * sep_ds_tracksPrev; + tracks_obj * sep_ds_tracksNow; + track2gain_obj * sep_ds_track2gain; + gain2mask_obj * sep_ds_gain2mask; + track2steer_obj * sep_ds_track2steer; + steer2demixing_ds_obj * sep_ds_steer2demixing; + demixings_obj * sep_ds_demixingsPrev; + demixings_obj * sep_ds_demixingsNow; + demixing2freq_obj * sep_ds_demixing2freq; + + beampatterns_obj * sep_gss_beampatterns_mics; + beampatterns_obj * sep_gss_beampatterns_spatialfilter; + steers_obj * sep_gss_steers; + gains_obj * sep_gss_gains; + masks_obj * sep_gss_masks; + tracks_obj * sep_gss_tracksPrev; + tracks_obj * sep_gss_tracksNow; + track2gain_obj * sep_gss_track2gain; + gain2mask_obj * sep_gss_gain2mask; + track2steer_obj * sep_gss_track2steer; + steer2demixing_gss_obj * sep_gss_steer2demixing; + demixings_obj * sep_gss_demixingsPrev; + demixings_obj * sep_gss_demixingsNow; + demixing2freq_obj * sep_gss_demixing2freq; + + masks_obj * sep_masks; + demixings_obj * sep_demixings; + + freq2env_obj * pf_ms_freq2env; + envs_obj * pf_ms_noisys; + demixing2env_obj * pf_ms_demixing2env; + envs_obj * pf_ms_noisesEst; + env2env_mcra_obj * pf_ms_env2env_mcra; + envs_obj * pf_ms_noisesSep; + env2env_interf_obj * pf_ms_env2env_interf; + envs_obj * pf_ms_interfs; + env2env_gainspeech_obj * pf_ms_env2env_gainspeech; + envs_obj * pf_ms_gainspeeches; + envs_obj * pf_ms_snrs; + envs_obj * pf_ms_vs; + env2env_probspeech_obj * pf_ms_env2env_probspeech; + envs_obj * pf_ms_probspeeches; + env2env_gainall_obj * pf_ms_env2env_gainall; + envs_obj * pf_ms_gainalls; + freq2freq_gain_obj * pf_ms_freq2freq_gain; + + freq2env_obj * pf_ss_freq2env_channels; + envs_obj * pf_ss_env_channels; + demixing2env_obj * pf_ss_demixing2env; + envs_obj * pf_ss_env_channelseps; + freq2env_obj * pf_ss_freq2env_seps; + envs_obj * pf_ss_env_seps; + env2env_gainratio_obj * pf_ss_env2env_gainratio; + envs_obj * pf_ss_gainratio; + freq2freq_gain_obj * pf_ss_freq2freq_gain; + + msg_spectra_obj * in1; + msg_powers_obj * in2; + msg_tracks_obj * in3; + msg_spectra_obj * out1; + msg_spectra_obj * out2; + + FILE * tmpFp; + + } mod_sss_obj; + + typedef struct mod_sss_cfg { + + char mode_sep; + char mode_pf; + + unsigned int nThetas; + float gainMin; + + float epsilon; + + mics_obj * mics; + samplerate_obj * samplerate; + soundspeed_obj * soundspeed; + spatialfilter_obj * spatialfilter; + + float sep_gss_lambda; + float sep_gss_mu; + + unsigned int pf_ms_bSize; + float pf_ms_alphaS; + unsigned int pf_ms_L; + float pf_ms_delta; + float pf_ms_alphaD; + + float pf_ms_eta; + float pf_ms_alphaZ; + float pf_ms_alphaPmin; + float pf_ms_thetaWin; + float pf_ms_alphaWin; + float pf_ms_maxAbsenceProb; + float pf_ms_Gmin; + unsigned int pf_ms_winSizeLocal; + unsigned int pf_ms_winSizeGlobal; + unsigned int pf_ms_winSizeFrame; + + float pf_ss_Gmin; + float pf_ss_Gmid; + float pf_ss_Gslope; + + } mod_sss_cfg; + + mod_sss_obj * mod_sss_construct(const mod_sss_cfg * mod_sss_config, const msg_tracks_cfg * msg_tracks_config, const msg_spectra_cfg * msg_spectra_config); + + void mod_sss_destroy(mod_sss_obj * obj); + + int mod_sss_process(mod_sss_obj * obj); + + int mod_sss_process_dds(mod_sss_obj * obj); + + int mod_sss_process_dgss(mod_sss_obj * obj); + + int mod_sss_process_sspf(mod_sss_obj * obj); + + int mod_sss_process_mspf(mod_sss_obj * obj); + + void mod_sss_connect(mod_sss_obj * obj, msg_spectra_obj * in1, msg_powers_obj * in2, msg_tracks_obj * in3, msg_spectra_obj * out1, msg_spectra_obj * out2); + + void mod_sss_disconnect(mod_sss_obj * obj); + + mod_sss_cfg * mod_sss_cfg_construct(void); + + void mod_sss_cfg_destroy(mod_sss_cfg * cfg); + + void mod_sss_cfg_printf(const mod_sss_cfg * cfg); + +#endif \ No newline at end of file diff --git a/include/odas/module/mod_sst.h b/include/odas/module/mod_sst.h new file mode 100644 index 0000000..3ba4a0b --- /dev/null +++ b/include/odas/module/mod_sst.h @@ -0,0 +1,164 @@ +#ifndef __ODAS_MODULE_SST +#define __ODAS_MODULE_SST + + /** + * \file mod_sst.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + #include + + #include "../general/mic.h" + + #include "../signal/coherence.h" + #include "../signal/kalman.h" + #include "../signal/mixture.h" + #include "../signal/particle.h" + + #include "../system/kalman2kalman.h" + #include "../system/particle2particle.h" + #include "../system/kalman2coherence.h" + #include "../system/particle2coherence.h" + #include "../system/mixture2mixture.h" + + #include "../message/msg_pots.h" + #include "../message/msg_targets.h" + #include "../message/msg_tracks.h" + #include "../module/mod_ssl.h" + + typedef struct mod_sst_obj { + + unsigned int nPots; + unsigned int nTracksMax; + unsigned int nTracks; + unsigned int nTargetsMax; + + char mode; + char add; + + mixture_obj ** mixtures; + coherences_obj ** coherences; + postprobs_obj ** postprobs; + + unsigned long long * ids; + unsigned long long * idsAdded; + unsigned long long * idsRemoved; + char ** tags; + + char * type; + + kalman_obj ** kalmans; + kalman2kalman_obj * kalman2kalman_prob; + kalman2kalman_obj * kalman2kalman_active; + kalman2kalman_obj * kalman2kalman_target; + kalman2coherence_obj * kalman2coherence_prob; + kalman2coherence_obj * kalman2coherence_active; + kalman2coherence_obj * kalman2coherence_target; + + particles_obj ** particles; + particle2particle_obj * particle2particle_prob; + particle2particle_obj * particle2particle_active; + particle2particle_obj * particle2particle_target; + particle2coherence_obj * particle2coherence_prob; + particle2coherence_obj * particle2coherence_active; + particle2coherence_obj * particle2coherence_target; + + mixture2mixture_obj * mixture2mixture; + + float * sourceActivities; + + float theta_new; + unsigned int N_prob; + float theta_prob; + unsigned int * N_inactive; + float theta_inactive; + + unsigned int * n_prob; + float * mean_prob; + unsigned int * n_inactive; + + unsigned long long id; + + msg_pots_obj * in1; + msg_targets_obj * in2; + msg_tracks_obj * out; + + } mod_sst_obj; + + typedef struct mod_sst_cfg { + + char mode; + char add; + + unsigned int nTracksMax; + unsigned int hopSize; + + float sigmaQ; + + unsigned int nParticles; + float st_alpha; + float st_beta; + float st_ratio; + float ve_alpha; + float ve_beta; + float ve_ratio; + float ac_alpha; + float ac_beta; + float ac_ratio; + float Nmin; + + float epsilon; + float sigmaR_active; + float sigmaR_prob; + float sigmaR_target; + gaussians_1d_obj * active_gmm; + gaussians_1d_obj * inactive_gmm; + float Pfalse; + float Pnew; + float Ptrack; + + float theta_new; + unsigned int N_prob; + float theta_prob; + unsigned int * N_inactive; + float theta_inactive; + + } mod_sst_cfg; + + mod_sst_obj * mod_sst_construct(const mod_sst_cfg * mod_sst_config, const mod_ssl_cfg * mod_ssl_config, const msg_pots_cfg * msg_pots_config, const msg_targets_cfg * msg_targets_config, const msg_tracks_cfg * msg_tracks_config); + + void mod_sst_destroy(mod_sst_obj * obj); + + int mod_sst_process(mod_sst_obj * obj); + + void mod_sst_connect(mod_sst_obj * obj, msg_pots_obj * in1, msg_targets_obj * in2, msg_tracks_obj * out); + + void mod_sst_disconnect(mod_sst_obj * obj); + + mod_sst_cfg * mod_sst_cfg_construct(void); + + void mod_sst_cfg_destroy(mod_sst_cfg * cfg); + + void mod_sst_cfg_printf(const mod_sst_cfg * cfg); + +#endif \ No newline at end of file diff --git a/include/odas/module/mod_stft.h b/include/odas/module/mod_stft.h new file mode 100644 index 0000000..8543987 --- /dev/null +++ b/include/odas/module/mod_stft.h @@ -0,0 +1,63 @@ +#ifndef __ODAS_MODULE_STFT +#define __ODAS_MODULE_STFT + + /** + * \file mod_stft.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../system/hop2frame.h" + #include "../signal/frame.h" + #include "../system/frame2freq.h" + #include "../message/msg_hops.h" + #include "../message/msg_spectra.h" + + typedef struct mod_stft_obj { + + hop2frame_obj * hop2frame; + frames_obj * frames; + frame2freq_obj * frame2freq; + + msg_hops_obj * in; + msg_spectra_obj * out; + + } mod_stft_obj; + + typedef struct mod_stft_cfg { + + } mod_stft_cfg; + + mod_stft_obj * mod_stft_construct(const mod_stft_cfg * mod_stft_config, const msg_hops_cfg * msg_hops_config, const msg_spectra_cfg * msg_spectra_config); + + void mod_stft_destroy(mod_stft_obj * obj); + + int mod_stft_process(mod_stft_obj * obj); + + void mod_stft_connect(mod_stft_obj * obj, msg_hops_obj * in, msg_spectra_obj * out); + + void mod_stft_disconnect(mod_stft_obj * obj); + + mod_stft_cfg * mod_stft_cfg_construct(void); + + void mod_stft_cfg_destroy(mod_stft_cfg * cfg); + + void mod_stft_cfg_printf(const mod_stft_cfg * cfg); + +#endif \ No newline at end of file diff --git a/include/odas/module/mod_volume.h b/include/odas/module/mod_volume.h new file mode 100644 index 0000000..106baeb --- /dev/null +++ b/include/odas/module/mod_volume.h @@ -0,0 +1,60 @@ +#ifndef __ODAS_MODULE_VOLUME +#define __ODAS_MODULE_VOLUME + + /** + * \file mod_volume.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "../system/hop2hop.h" + #include "../message/msg_hops.h" + + typedef struct mod_volume_obj { + + hop2hop_gain_obj * hop2hop_gain; + + msg_hops_obj * in; + msg_hops_obj * out; + + } mod_volume_obj; + + typedef struct mod_volume_cfg { + + float gain; + + } mod_volume_cfg; + + mod_volume_obj * mod_volume_construct(const mod_volume_cfg * mod_volume_config, const msg_hops_cfg * msg_hops_config); + + void mod_volume_destroy(mod_volume_obj * obj); + + int mod_volume_process(mod_volume_obj * obj); + + void mod_volume_connect(mod_volume_obj * obj, msg_hops_obj * in, msg_hops_obj * out); + + void mod_volume_disconnect(mod_volume_obj * obj); + + mod_volume_cfg * mod_volume_cfg_construct(void); + + void mod_volume_cfg_destroy(mod_volume_cfg * cfg); + + void mod_volume_cfg_printf(const mod_volume_cfg * cfg); + +#endif \ No newline at end of file diff --git a/include/odas/odas.h b/include/odas/odas.h index 2c8c2b9..7f34852 100644 --- a/include/odas/odas.h +++ b/include/odas/odas.h @@ -1,66 +1,75 @@ - #include "../../src/connector/con_categories.h" - #include "../../src/connector/con_hops.h" - #include "../../src/connector/con_pots.h" - #include "../../src/connector/con_powers.h" - #include "../../src/connector/con_spectra.h" - #include "../../src/connector/con_targets.h" - #include "../../src/connector/con_tracks.h" - #include "../../src/injector/inj_targets.h" - #include "../../src/message/msg_categories.h" - #include "../../src/message/msg_hops.h" - #include "../../src/message/msg_pots.h" - #include "../../src/message/msg_powers.h" - #include "../../src/message/msg_spectra.h" - #include "../../src/message/msg_targets.h" - #include "../../src/message/msg_tracks.h" - #include "../../src/module/mod_classify.h" - #include "../../src/module/mod_istft.h" - #include "../../src/module/mod_mapping.h" - #include "../../src/module/mod_noise.h" - #include "../../src/module/mod_resample.h" - #include "../../src/module/mod_ssl.h" - #include "../../src/module/mod_sst.h" - #include "../../src/module/mod_sss.h" - #include "../../src/module/mod_stft.h" - #include "../../src/module/mod_volume.h" - #include "../../src/sink/snk_categories.h" - #include "../../src/sink/snk_hops.h" - #include "../../src/sink/snk_pots.h" - #include "../../src/sink/snk_powers.h" - #include "../../src/sink/snk_spectra.h" - #include "../../src/sink/snk_tracks.h" - #include "../../src/source/src_hops.h" - #include "../../src/aconnector/acon_categories.h" - #include "../../src/aconnector/acon_hops.h" - #include "../../src/aconnector/acon_pots.h" - #include "../../src/aconnector/acon_powers.h" - #include "../../src/aconnector/acon_spectra.h" - #include "../../src/aconnector/acon_targets.h" - #include "../../src/aconnector/acon_tracks.h" - #include "../../src/ainjector/ainj_targets.h" - #include "../../src/amessage/amsg_categories.h" - #include "../../src/amessage/amsg_hops.h" - #include "../../src/amessage/amsg_pots.h" - #include "../../src/amessage/amsg_powers.h" - #include "../../src/amessage/amsg_spectra.h" - #include "../../src/amessage/amsg_targets.h" - #include "../../src/amessage/amsg_tracks.h" - #include "../../src/amodule/amod_classify.h" - #include "../../src/amodule/amod_istft.h" - #include "../../src/amodule/amod_mapping.h" - #include "../../src/amodule/amod_noise.h" - #include "../../src/amodule/amod_resample.h" - #include "../../src/amodule/amod_ssl.h" - #include "../../src/amodule/amod_sst.h" - #include "../../src/amodule/amod_sss.h" - #include "../../src/amodule/amod_stft.h" - #include "../../src/amodule/amod_volume.h" - #include "../../src/asink/asnk_categories.h" - #include "../../src/asink/asnk_hops.h" - #include "../../src/asink/asnk_pots.h" - #include "../../src/asink/asnk_powers.h" - #include "../../src/asink/asnk_spectra.h" - #include "../../src/asink/asnk_tracks.h" - #include "../../src/asource/asrc_hops.h" +#ifdef __cplusplus +extern "C" { +#endif + + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + +#ifdef __cplusplus +} //extern "C" +#endif + diff --git a/include/odas/signal/acorr.h b/include/odas/signal/acorr.h new file mode 100644 index 0000000..614fe95 --- /dev/null +++ b/include/odas/signal/acorr.h @@ -0,0 +1,48 @@ +#ifndef __ODAS_SIGNAL_ACORR +#define __ODAS_SIGNAL_ACORR + + /** + * \file acorr.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct acorrs_obj { + + unsigned int nSignals; + unsigned int halfFrameSize; + float ** array; + + } acorrs_obj; + + acorrs_obj * acorrs_construct_zero(const unsigned int nSignals, const unsigned int halfFrameSize); + + void acorrs_destroy(acorrs_obj * obj); + + void acorrs_copy(acorrs_obj * dest, const acorrs_obj * src); + + void acorrs_zero(acorrs_obj * obj); + + void acorrs_printf(const acorrs_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/aimg.h b/include/odas/signal/aimg.h new file mode 100644 index 0000000..1274cf2 --- /dev/null +++ b/include/odas/signal/aimg.h @@ -0,0 +1,43 @@ +#ifndef __ODAS_SIGNAL_AIMG +#define __ODAS_SIGNAL_AIMG + + /** + * \file aimg.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct aimg_obj { + + unsigned int aimgSize; + float * array; + + } aimg_obj; + + aimg_obj * aimg_construct_zero(const unsigned int aimgSize); + + void aimg_destroy(aimg_obj * obj); + + void aimg_printf(const aimg_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/area.h b/include/odas/signal/area.h new file mode 100644 index 0000000..3a3fbb8 --- /dev/null +++ b/include/odas/signal/area.h @@ -0,0 +1,60 @@ +#ifndef __ODAS_SIGNAL_AREA +#define __ODAS_SIGNAL_AREA + + /** + * \file area.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct areas_obj { + + unsigned int nPointsDiscrete; + unsigned int nResolutionsPerDiscrete; + unsigned int nPairs; + + float * array; + + } areas_obj; + + typedef struct area_obj { + + unsigned int nPairs; + + float * array; + + } area_obj; + + areas_obj * areas_construct_zero(const unsigned int nPointsDiscrete, const unsigned int nResolutionsPerDiscrete, const unsigned int nPairs); + + void areas_destroy(areas_obj * obj); + + void areas_printf(const areas_obj * obj); + + area_obj * area_construct_zero(const unsigned int nPairs); + + void area_destroy(area_obj * obj); + + void area_printf(const area_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/assignation.h b/include/odas/signal/assignation.h new file mode 100644 index 0000000..142102c --- /dev/null +++ b/include/odas/signal/assignation.h @@ -0,0 +1,44 @@ +#ifndef __ODAS_SIGNAL_ASSIGNATION +#define __ODAS_SIGNAL_ASSIGNATION + + /** + * \file assignation.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct assignations_obj { + + unsigned int nAssignations; + unsigned int nPots; + signed int * array; + + } assignations_obj; + + assignations_obj * assignations_construct_zero(const unsigned int nAssignations, const unsigned int nPots); + + void assignations_destroy(assignations_obj * obj); + + void assignations_printf(const assignations_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/beampattern.h b/include/odas/signal/beampattern.h new file mode 100644 index 0000000..aa346c5 --- /dev/null +++ b/include/odas/signal/beampattern.h @@ -0,0 +1,49 @@ +#ifndef __ODAS_SIGNAL_BEAMPATTERN +#define __ODAS_SIGNAL_BEAMPATTERN + + /** + * \file beampattern.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct beampatterns_obj { + + unsigned int nChannels; + unsigned int nThetas; + + float * minThetas; + float * maxThetas; + float * deltaThetas; + + float * gains; + + } beampatterns_obj; + + beampatterns_obj * beampatterns_construct_zero(const unsigned int nChannels, const unsigned int nThetas); + + void beampatterns_destroy(beampatterns_obj * obj); + + void beampatterns_printf(const beampatterns_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/category.h b/include/odas/signal/category.h new file mode 100644 index 0000000..23dd9a5 --- /dev/null +++ b/include/odas/signal/category.h @@ -0,0 +1,47 @@ +#ifndef __ODAS_SIGNAL_CATEGORY +#define __ODAS_SIGNAL_CATEGORY + + /** + * \file category.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct categories_obj { + + unsigned int nSignals; + char * array; + + } categories_obj; + + categories_obj * categories_construct_zero(const unsigned int nSignals); + + void categories_destroy(categories_obj * obj); + + void categories_copy(categories_obj * dest, const categories_obj * src); + + void categories_zero(categories_obj * obj); + + void categories_printf(const categories_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/coherence.h b/include/odas/signal/coherence.h new file mode 100644 index 0000000..d008c9b --- /dev/null +++ b/include/odas/signal/coherence.h @@ -0,0 +1,44 @@ +#ifndef __ODAS_SIGNAL_COHERENCE +#define __ODAS_SIGNAL_COHERENCE + + /** + * \file coherence.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct coherences_obj { + + unsigned int nTracks; + unsigned int nPots; + float * array; + + } coherences_obj; + + coherences_obj * coherences_construct_zero(const unsigned int nTracks, const unsigned int nPots); + + void coherences_destroy(coherences_obj * obj); + + void coherences_printf(coherences_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/delta.h b/include/odas/signal/delta.h new file mode 100644 index 0000000..803db3b --- /dev/null +++ b/include/odas/signal/delta.h @@ -0,0 +1,45 @@ +#ifndef __ODAS_SIGNAL_DELTA +#define __ODAS_SIGNAL_DELTA + + /** + * \file delta.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct deltas_obj { + + unsigned int nPairs; + unsigned int * array; + + } deltas_obj; + + deltas_obj * deltas_construct_zero(const unsigned int nPairs); + + deltas_obj * deltas_clone(const deltas_obj * obj); + + void deltas_destroy(deltas_obj * obj); + + void deltas_printf(const deltas_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/demixing.h b/include/odas/signal/demixing.h new file mode 100644 index 0000000..dc09641 --- /dev/null +++ b/include/odas/signal/demixing.h @@ -0,0 +1,50 @@ +#ifndef __ODAS_SIGNAL_DEMIXING +#define __ODAS_SIGNAL_DEMIXING + + /** + * \file demixing.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct demixings_obj { + + unsigned int nSeps; + unsigned int nChannels; + unsigned int halfFrameSize; + + float ** array; + + } demixings_obj; + + demixings_obj * demixings_construct_zero(const unsigned int halfFrameSize, const unsigned int nSeps, const unsigned int nChannels); + + void demixings_destroy(demixings_obj * obj); + + void demixings_copy(demixings_obj * dest, const demixings_obj * src); + + void demixings_zero(demixings_obj * obj); + + void demixings_printf(const demixings_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/env.h b/include/odas/signal/env.h new file mode 100644 index 0000000..ae0d22f --- /dev/null +++ b/include/odas/signal/env.h @@ -0,0 +1,50 @@ +#ifndef __ODAS_SIGNAL_ENV +#define __ODAS_SIGNAL_ENV + + /** + * \file env.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct envs_obj { + + unsigned int nSignals; + unsigned int halfFrameSize; + float ** array; + + } envs_obj; + + envs_obj * envs_construct_zero(const unsigned int nSignals, const unsigned int halfFrameSize); + + envs_obj * envs_clone(const envs_obj * obj); + + void envs_copy(envs_obj * dest, const envs_obj * src); + + void envs_zero(envs_obj * obj); + + void envs_destroy(envs_obj * obj); + + void envs_printf(const envs_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/frame.h b/include/odas/signal/frame.h new file mode 100644 index 0000000..7551c94 --- /dev/null +++ b/include/odas/signal/frame.h @@ -0,0 +1,46 @@ +#ifndef __ODAS_SIGNAL_FRAME +#define __ODAS_SIGNAL_FRAME + + /** + * \file frame.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct frames_obj { + + unsigned int nSignals; + unsigned int frameSize; + float ** array; + + } frames_obj; + + frames_obj * frames_construct_zero(const unsigned int nSignals, const unsigned int frameSize); + + frames_obj * frames_clone(const frames_obj * obj); + + void frames_destroy(frames_obj * obj); + + void frames_printf(const frames_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/freq.h b/include/odas/signal/freq.h new file mode 100644 index 0000000..08f8242 --- /dev/null +++ b/include/odas/signal/freq.h @@ -0,0 +1,50 @@ +#ifndef __ODAS_SIGNAL_FREQ +#define __ODAS_SIGNAL_FREQ + + /** + * \file freq.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct freqs_obj { + + unsigned int nSignals; + unsigned int halfFrameSize; + float ** array; + + } freqs_obj; + + freqs_obj * freqs_construct_zero(const unsigned int nSignals, const unsigned int halfFrameSize); + + freqs_obj * freqs_clone(const freqs_obj * obj); + + void freqs_copy(freqs_obj * dest, const freqs_obj * src); + + void freqs_zero(freqs_obj * obj); + + void freqs_destroy(freqs_obj * obj); + + void freqs_printf(const freqs_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/gain.h b/include/odas/signal/gain.h new file mode 100644 index 0000000..33e929e --- /dev/null +++ b/include/odas/signal/gain.h @@ -0,0 +1,44 @@ +#ifndef __ODAS_SIGNAL_GAIN +#define __ODAS_SIGNAL_GAIN + + /** + * \file gain.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct gains_obj { + + unsigned int nSeps; + unsigned int nChannels; + float * array; + + } gains_obj; + + gains_obj * gains_construct_zero(const unsigned int nSeps, const unsigned int nChannels); + + void gains_destroy(gains_obj * obj); + + void gains_printf(const gains_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/hop.h b/include/odas/signal/hop.h new file mode 100644 index 0000000..5ec9e0d --- /dev/null +++ b/include/odas/signal/hop.h @@ -0,0 +1,50 @@ +#ifndef __ODAS_SIGNAL_HOP +#define __ODAS_SIGNAL_HOP + + /** + * \file hop.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct hops_obj { + + unsigned int nSignals; + unsigned int hopSize; + float ** array; + + } hops_obj; + + hops_obj * hops_construct_zero(const unsigned int nSignals, const unsigned int hopSize); + + hops_obj * hops_clone(const hops_obj * obj); + + void hops_copy(hops_obj * dest, const hops_obj * src); + + void hops_zero(hops_obj * obj); + + void hops_destroy(hops_obj * obj); + + void hops_printf(const hops_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/impulse.h b/include/odas/signal/impulse.h new file mode 100644 index 0000000..babdbf0 --- /dev/null +++ b/include/odas/signal/impulse.h @@ -0,0 +1,40 @@ +#ifndef __ODAS_SIGNAL_IMPULSE +#define __ODAS_SIGNAL_IMPULSE + + /** + * \file impulse.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + + typedef struct impulse_obj { + + float * array; + unsigned int nCoefficients; + + } impulse_obj; + + impulse_obj * impulse_construct(const unsigned int nCoefficients); + + void impulse_destroy(impulse_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/index.h b/include/odas/signal/index.h new file mode 100644 index 0000000..1cf6b37 --- /dev/null +++ b/include/odas/signal/index.h @@ -0,0 +1,45 @@ +#ifndef __ODAS_SIGNAL_INDEX +#define __ODAS_SIGNAL_INDEX + + /** + * \file index.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct indexes_obj { + + unsigned int nCoarses; + unsigned int nFines; + unsigned int * array; + unsigned int * count; + + } indexes_obj; + + indexes_obj * indexes_construct_zero(const unsigned int nCoarses, const unsigned int nFines); + + void indexes_destroy(indexes_obj * obj); + + void indexes_printf(const indexes_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/kalman.h b/include/odas/signal/kalman.h new file mode 100644 index 0000000..d8b2060 --- /dev/null +++ b/include/odas/signal/kalman.h @@ -0,0 +1,44 @@ +#ifndef __ODAS_SIGNAL_KALMAN +#define __ODAS_SIGNAL_KALMAN + + /** + * \file kalman.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + + #include "../utils/matrix.h" + + typedef struct kalman_obj { + + matrix_obj * x_lm1lm1; + matrix_obj * x_llm1; + matrix_obj * P_lm1lm1; + matrix_obj * P_llm1; + + } kalman_obj; + + kalman_obj * kalman_construct_zero(void); + + void kalman_destroy(kalman_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/map.h b/include/odas/signal/map.h new file mode 100644 index 0000000..e6fbe24 --- /dev/null +++ b/include/odas/signal/map.h @@ -0,0 +1,44 @@ +#ifndef __ODAS_SIGNAL_MAP +#define __ODAS_SIGNAL_MAP + + /** + * \file map.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct maps_obj { + + unsigned int nCoarses; + unsigned int nFines; + char * array; + + } maps_obj; + + maps_obj * maps_construct_zero(const unsigned int nCoarses, const unsigned int nFines); + + void maps_destroy(maps_obj * obj); + + void maps_printf(const maps_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/mask.h b/include/odas/signal/mask.h new file mode 100644 index 0000000..92e01bc --- /dev/null +++ b/include/odas/signal/mask.h @@ -0,0 +1,46 @@ +#ifndef __ODAS_SIGNAL_MASK +#define __ODAS_SIGNAL_MASK + + /** + * \file mask.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct masks_obj { + + unsigned int nSeps; + unsigned int nChannels; + char * array; + + } masks_obj; + + masks_obj * masks_construct_zero(const unsigned int nSeps, const unsigned int nChannels); + + void masks_destroy(masks_obj * obj); + + void masks_copy(masks_obj * dest, const masks_obj * src); + + void masks_printf(const masks_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/mixture.h b/include/odas/signal/mixture.h new file mode 100644 index 0000000..60efd53 --- /dev/null +++ b/include/odas/signal/mixture.h @@ -0,0 +1,57 @@ +#ifndef __ODAS_SIGNAL_MIXTURE +#define __ODAS_SIGNAL_MIXTURE + + /** + * \file mixture.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + #include "../signal/assignation.h" + #include "../init/combining.h" + + typedef struct mixture_obj { + + unsigned int nPots; + unsigned int nTracks; + unsigned int nTracksNewFalse; + unsigned int nCombinations; + + assignations_obj * assignations; + + float * p_Ez_AICD; + float * p_Eszs_phics; + float * p_phics; + float * p_Ez_phic; + float * p_phic; + float * p_phic_Ez; + + } mixture_obj; + + mixture_obj * mixture_construct_zero(const unsigned int nPots, const unsigned int nTracks); + + void mixture_destroy(mixture_obj * obj); + + void mixture_printf(const mixture_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/pair.h b/include/odas/signal/pair.h new file mode 100644 index 0000000..3112837 --- /dev/null +++ b/include/odas/signal/pair.h @@ -0,0 +1,45 @@ +#ifndef __ODAS_SIGNAL_PAIR +#define __ODAS_SIGNAL_PAIR + + /** + * \file pair.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct pairs_obj { + + unsigned int nPairs; + char * array; + + } pairs_obj; + + pairs_obj * pairs_construct_zero(const unsigned int nPairs); + + pairs_obj * pairs_clone(const pairs_obj * obj); + + void pairs_destroy(pairs_obj * obj); + + void pairs_printf(const pairs_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/particle.h b/include/odas/signal/particle.h new file mode 100644 index 0000000..68b10c9 --- /dev/null +++ b/include/odas/signal/particle.h @@ -0,0 +1,44 @@ +#ifndef __ODAS_SIGNAL_PARTICLE +#define __ODAS_SIGNAL_PARTICLE + + /** + * \file particle.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct particles_obj { + + unsigned int nParticles; + float * array; + unsigned char * state; + + } particles_obj; + + particles_obj * particles_construct_zero(const unsigned int nParticles); + + void particles_destroy(particles_obj * obj); + + void particles_printf(const particles_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/pitch.h b/include/odas/signal/pitch.h new file mode 100644 index 0000000..a6da009 --- /dev/null +++ b/include/odas/signal/pitch.h @@ -0,0 +1,47 @@ +#ifndef __ODAS_SIGNAL_PITCH +#define __ODAS_SIGNAL_PITCH + + /** + * \file pitch.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct pitches_obj { + + unsigned int nSignals; + float * array; + + } pitches_obj; + + pitches_obj * pitches_construct_zero(const unsigned int nSignals); + + void pitches_destroy(pitches_obj * obj); + + void pitches_copy(pitches_obj * dest, const pitches_obj * src); + + void pitches_zero(pitches_obj * obj); + + void pitches_printf(const pitches_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/point.h b/include/odas/signal/point.h new file mode 100644 index 0000000..eefeea1 --- /dev/null +++ b/include/odas/signal/point.h @@ -0,0 +1,45 @@ +#ifndef __ODAS_SIGNAL_POINT +#define __ODAS_SIGNAL_POINT + + /** + * \file point.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct points_obj { + + unsigned int nPoints; + float * array; + + } points_obj; + + points_obj * points_construct_zero(const unsigned int nPoints); + + points_obj * points_clone(const points_obj * obj); + + void points_destroy(points_obj * obj); + + void points_printf(const points_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/postprob.h b/include/odas/signal/postprob.h new file mode 100644 index 0000000..ac21d7f --- /dev/null +++ b/include/odas/signal/postprob.h @@ -0,0 +1,47 @@ +#ifndef __ODAS_SIGNAL_POSTPROB +#define __ODAS_SIGNAL_POSTPROB + + /** + * \file postprob.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct postprobs_obj { + + unsigned int nTracks; + unsigned int nPots; + + float * arrayNew; + float * arrayTrack; + float * arrayTrackTotal; + + } postprobs_obj; + + postprobs_obj * postprobs_construct_zero(const unsigned int nPots, const unsigned int nTracks); + + void postprobs_destroy(postprobs_obj * obj); + + void postprobs_printf(const postprobs_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/pot.h b/include/odas/signal/pot.h new file mode 100644 index 0000000..c2fc576 --- /dev/null +++ b/include/odas/signal/pot.h @@ -0,0 +1,49 @@ +#ifndef __ODAS_SIGNAL_POT +#define __ODAS_SIGNAL_POT + + /** + * \file pot.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct pots_obj { + + unsigned int nPots; + float * array; + + } pots_obj; + + pots_obj * pots_construct_zero(const unsigned int nPots); + + pots_obj * pots_clone(const pots_obj * obj); + + void pots_copy(pots_obj * dest, const pots_obj * src); + + void pots_zero(pots_obj * obj); + + void pots_destroy(pots_obj * obj); + + void pots_printf(const pots_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/scan.h b/include/odas/signal/scan.h new file mode 100644 index 0000000..da73e74 --- /dev/null +++ b/include/odas/signal/scan.h @@ -0,0 +1,55 @@ +#ifndef __ODAS_SIGNAL_SCAN +#define __ODAS_SIGNAL_SCAN + + /** + * \file scan.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + + #include "pair.h" + #include "point.h" + #include "tdoa.h" + #include "delta.h" + #include "index.h" + #include "spatialindex.h" + + //! Scan setup + typedef struct scans_obj { + + unsigned int nLevels; + + points_obj ** points; + tdoas_obj ** tdoas; + deltas_obj ** deltas; + spatialindexes_obj ** spatialindexes; + pairs_obj * pairs; + + indexes_obj ** indexes; + + } scans_obj; + + scans_obj * scans_construct_null(const unsigned int nLevels); + + void scans_destroy(scans_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/spatialgain.h b/include/odas/signal/spatialgain.h new file mode 100644 index 0000000..3bcf7f9 --- /dev/null +++ b/include/odas/signal/spatialgain.h @@ -0,0 +1,47 @@ +#ifndef __ODAS_SIGNAL_SPATIALGAIN +#define __ODAS_SIGNAL_SPATIALGAIN + + /** + * \file spatialgain.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct spatialgains_obj { + + unsigned int nChannels; + unsigned int nPoints; + + float * array; + + } spatialgains_obj; + + spatialgains_obj * spatialgains_construct_zero(const unsigned int nChannels, const unsigned int nPoints); + + spatialgains_obj * spatialgains_clone(const spatialgains_obj * obj); + + void spatialgains_destroy(spatialgains_obj * obj); + + void spatialgains_printf(const spatialgains_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/spatialindex.h b/include/odas/signal/spatialindex.h new file mode 100644 index 0000000..0b72a84 --- /dev/null +++ b/include/odas/signal/spatialindex.h @@ -0,0 +1,48 @@ +#ifndef __ODAS_SIGNAL_SPATIALINDEX +#define __ODAS_SIGNAL_SPATIALINDEX + + /** + * \file spatialindex.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct spatialindexes_obj { + + unsigned int nPoints; + unsigned int nPairs; + + unsigned int * array; + unsigned int * count; + + } spatialindexes_obj; + + spatialindexes_obj * spatialindexes_construct_zero(const unsigned int nPoints, const unsigned int nPairs); + + spatialindexes_obj * spatialindexes_clone(const spatialindexes_obj * obj); + + void spatialindexes_destroy(spatialindexes_obj * obj); + + void spatialindexes_printf(const spatialindexes_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/spatialmask.h b/include/odas/signal/spatialmask.h new file mode 100644 index 0000000..478051e --- /dev/null +++ b/include/odas/signal/spatialmask.h @@ -0,0 +1,47 @@ +#ifndef __ODAS_SIGNAL_SPATIALMASK +#define __ODAS_SIGNAL_SPATIALMASK + + /** + * \file spatialmask.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct spatialmasks_obj { + + unsigned int nPoints; + unsigned int nPairs; + + char * array; + + } spatialmasks_obj; + + spatialmasks_obj * spatialmasks_construct_zero(const unsigned int nPoints, const unsigned int nPairs); + + spatialmasks_obj * spatialmasks_clone(const spatialmasks_obj * obj); + + void spatialmasks_destroy(spatialmasks_obj * obj); + + void spatialmasks_printf(const spatialmasks_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/steer.h b/include/odas/signal/steer.h new file mode 100644 index 0000000..f3b2c6e --- /dev/null +++ b/include/odas/signal/steer.h @@ -0,0 +1,48 @@ +#ifndef __ODAS_SIGNAL_STEER +#define __ODAS_SIGNAL_STEER + + /** + * \file steer.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct steers_obj { + + unsigned int nSeps; + unsigned int nChannels; + unsigned int halfFrameSize; + + float ** array; + + } steers_obj; + + steers_obj * steers_construct_zero(const unsigned int halfFrameSize, const unsigned int nSeps, const unsigned int nChannels); + + void steers_destroy(steers_obj * obj); + + void steers_copy(steers_obj * dest, const steers_obj * src); + + void steers_printf(const steers_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/target.h b/include/odas/signal/target.h new file mode 100644 index 0000000..f003ed2 --- /dev/null +++ b/include/odas/signal/target.h @@ -0,0 +1,50 @@ +#ifndef __ODAS_SIGNAL_TARGET +#define __ODAS_SIGNAL_TARGET + + /** + * \file target.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct targets_obj { + + unsigned int nTargets; + char ** tags; + float * array; + + } targets_obj; + + targets_obj * targets_construct_zero(const unsigned int nTargets); + + void targets_destroy(targets_obj * obj); + + targets_obj * targets_clone(const targets_obj * obj); + + void targets_copy(targets_obj * dest, const targets_obj * src); + + void targets_zero(targets_obj * obj); + + void targets_printf(const targets_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/tau.h b/include/odas/signal/tau.h new file mode 100644 index 0000000..3dc6067 --- /dev/null +++ b/include/odas/signal/tau.h @@ -0,0 +1,45 @@ +#ifndef __ODAS_SIGNAL_TAU +#define __ODAS_SIGNAL_TAU + + /** + * \file tau.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct taus_obj { + + unsigned int nPoints; + unsigned int nPairs; + float * mu; + float * sigma2; + + } taus_obj; + + taus_obj * taus_construct_zero(const unsigned int nPoints, const unsigned int nPairs); + + void taus_destroy(taus_obj * obj); + + void taus_printf(const taus_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/tdoa.h b/include/odas/signal/tdoa.h new file mode 100644 index 0000000..62a8b21 --- /dev/null +++ b/include/odas/signal/tdoa.h @@ -0,0 +1,46 @@ +#ifndef __ODAS_SIGNAL_TDOA +#define __ODAS_SIGNAL_TDOA + + /** + * \file tdoa.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct tdoas_obj { + + unsigned int nPoints; + unsigned int nPairs; + unsigned int * array; + unsigned int * min; + unsigned int * max; + + } tdoas_obj; + + tdoas_obj * tdoas_construct_zero(const unsigned int nPoints, const unsigned int nPairs); + + void tdoas_destroy(tdoas_obj * obj); + + void tdoas_printf(const tdoas_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/track.h b/include/odas/signal/track.h new file mode 100644 index 0000000..82437bf --- /dev/null +++ b/include/odas/signal/track.h @@ -0,0 +1,52 @@ +#ifndef __ODAS_SIGNAL_TRACK +#define __ODAS_SIGNAL_TRACK + + /** + * \file track.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct tracks_obj { + + unsigned int nTracks; + unsigned long long * ids; + char ** tags; + float * array; + float * activity; + + } tracks_obj; + + tracks_obj * tracks_construct_zero(const unsigned int nTracks); + + void tracks_destroy(tracks_obj * obj); + + tracks_obj * tracks_clone(const tracks_obj * obj); + + void tracks_copy(tracks_obj * dest, const tracks_obj * src); + + void tracks_zero(tracks_obj * obj); + + void tracks_printf(const tracks_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/triangle.h b/include/odas/signal/triangle.h new file mode 100644 index 0000000..a3b2d2e --- /dev/null +++ b/include/odas/signal/triangle.h @@ -0,0 +1,43 @@ +#ifndef __ODAS_SIGNAL_TRIANGLE +#define __ODAS_SIGNAL_TRIANGLE + + /** + * \file triangle.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct triangles_obj { + + unsigned nTriangles; + float * array; + + } triangles_obj; + + triangles_obj * triangles_construct_zero(const unsigned int nTriangles); + + void triangles_destroy(triangles_obj * obj); + + void triangles_printf(const triangles_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/window.h b/include/odas/signal/window.h new file mode 100644 index 0000000..12bfce4 --- /dev/null +++ b/include/odas/signal/window.h @@ -0,0 +1,40 @@ +#ifndef __ODAS_SIGNAL_WINDOW +#define __ODAS_SIGNAL_WINDOW + + /** + * \file window.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + + typedef struct window_obj { + + unsigned int frameSize; + float * array; + + } window_obj; + + window_obj * window_construct_zero(const unsigned int frameSize); + + void window_destroy(window_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/signal/xcorr.h b/include/odas/signal/xcorr.h new file mode 100644 index 0000000..55fa534 --- /dev/null +++ b/include/odas/signal/xcorr.h @@ -0,0 +1,50 @@ +#ifndef __ODAS_SIGNAL_XCORR +#define __ODAS_SIGNAL_XCORR + + /** + * \file xcorr.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct xcorrs_obj { + + unsigned int nSignals; + unsigned int frameSize; + float ** array; + + } xcorrs_obj; + + xcorrs_obj * xcorrs_construct_zero(const unsigned int nSignals, const unsigned int frameSize); + + void xcorrs_destroy(xcorrs_obj * obj); + + void xcorrs_copy(xcorrs_obj * dest, const xcorrs_obj * src); + + void xcorrs_zero(xcorrs_obj * obj); + + void xcorrs_printf(const xcorrs_obj * obj); + + void xcorrs_printf_signal(const xcorrs_obj * obj, const unsigned int iSignal); + +#endif \ No newline at end of file diff --git a/include/odas/sink/snk_categories.h b/include/odas/sink/snk_categories.h new file mode 100644 index 0000000..38dd9ae --- /dev/null +++ b/include/odas/sink/snk_categories.h @@ -0,0 +1,115 @@ +#ifndef __ODAS_SINK_CATEGORIES +#define __ODAS_SINK_CATEGORIES + + /** + * \file snk_categories.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + #include + #include + #include + #include + + #include "../general/format.h" + #include "../general/interface.h" + #include "../message/msg_categories.h" + #include "../utils/pcm.h" + + typedef struct snk_categories_obj { + + unsigned long long timeStamp; + + unsigned int nChannels; + unsigned int fS; + + format_obj * format; + interface_obj * interface; + + char * buffer; + unsigned int bufferSize; + + FILE * fp; + + struct sockaddr_in sserver; + int sid; + + msg_categories_obj * in; + + } snk_categories_obj; + + typedef struct snk_categories_cfg { + + unsigned int fS; + format_obj * format; + interface_obj * interface; + + } snk_categories_cfg; + + snk_categories_obj * snk_categories_construct(const snk_categories_cfg * snk_categories_config, const msg_categories_cfg * msg_categories_config); + + void snk_categories_destroy(snk_categories_obj * obj); + + void snk_categories_connect(snk_categories_obj * obj, msg_categories_obj * in); + + void snk_categories_disconnect(snk_categories_obj * obj); + + void snk_categories_open(snk_categories_obj * obj); + + void snk_categories_open_interface_blackhole(snk_categories_obj * obj); + + void snk_categories_open_interface_file(snk_categories_obj * obj); + + void snk_categories_open_interface_socket(snk_categories_obj * obj); + + void snk_categories_open_interface_terminal(snk_categories_obj * obj); + + void snk_categories_close(snk_categories_obj * obj); + + void snk_categories_close_interface_blackhole(snk_categories_obj * obj); + + void snk_categories_close_interface_file(snk_categories_obj * obj); + + void snk_categories_close_interface_socket(snk_categories_obj * obj); + + void snk_categories_close_interface_terminal(snk_categories_obj * obj); + + int snk_categories_process(snk_categories_obj * obj); + + void snk_categories_process_interface_blackhole(snk_categories_obj * obj); + + void snk_categories_process_interface_file(snk_categories_obj * obj); + + void snk_categories_process_interface_socket(snk_categories_obj * obj); + + void snk_categories_process_interface_terminal(snk_categories_obj * obj); + + void snk_categories_process_format_text_json(snk_categories_obj * obj); + + void snk_categories_process_format_undefined(snk_categories_obj * obj); + + snk_categories_cfg * snk_categories_cfg_construct(void); + + void snk_categories_cfg_destroy(snk_categories_cfg * snk_categories_config); + +#endif \ No newline at end of file diff --git a/include/odas/sink/snk_hops.h b/include/odas/sink/snk_hops.h new file mode 100644 index 0000000..677f225 --- /dev/null +++ b/include/odas/sink/snk_hops.h @@ -0,0 +1,118 @@ +#ifndef __ODAS_SINK_HOPS +#define __ODAS_SINK_HOPS + + /** + * \file snk_hops.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + #include + #include + #include + #include + + #include "../general/format.h" + #include "../general/interface.h" + #include "../message/msg_hops.h" + #include "../utils/pcm.h" + + typedef struct snk_hops_obj { + + unsigned long long timeStamp; + + unsigned int hopSize; + unsigned int nChannels; + unsigned int fS; + + format_obj * format; + interface_obj * interface; + + char * buffer; + unsigned int bufferSize; + + FILE * fp; + + struct sockaddr_in sserver; + int sid; + + char bytes[4]; + + msg_hops_obj * in; + + } snk_hops_obj; + + typedef struct snk_hops_cfg { + + unsigned int fS; + format_obj * format; + interface_obj * interface; + + } snk_hops_cfg; + + snk_hops_obj * snk_hops_construct(const snk_hops_cfg * snk_hops_config, const msg_hops_cfg * msg_hops_config); + + void snk_hops_destroy(snk_hops_obj * obj); + + void snk_hops_connect(snk_hops_obj * obj, msg_hops_obj * in); + + void snk_hops_disconnect(snk_hops_obj * obj); + + void snk_hops_open(snk_hops_obj * obj); + + void snk_hops_open_interface_blackhole(snk_hops_obj * obj); + + void snk_hops_open_interface_file(snk_hops_obj * obj); + + void snk_hops_open_interface_socket(snk_hops_obj * obj); + + void snk_hops_close(snk_hops_obj * obj); + + void snk_hops_close_interface_blackhole(snk_hops_obj * obj); + + void snk_hops_close_interface_file(snk_hops_obj * obj); + + void snk_hops_close_interface_socket(snk_hops_obj * obj); + + int snk_hops_process(snk_hops_obj * obj); + + void snk_hops_process_interface_blackhole(snk_hops_obj * obj); + + void snk_hops_process_interface_file(snk_hops_obj * obj); + + void snk_hops_process_interface_socket(snk_hops_obj * obj); + + void snk_hops_process_format_binary_int08(snk_hops_obj * obj); + + void snk_hops_process_format_binary_int16(snk_hops_obj * obj); + + void snk_hops_process_format_binary_int24(snk_hops_obj * obj); + + void snk_hops_process_format_binary_int32(snk_hops_obj * obj); + + void snk_hops_process_format_undefined(snk_hops_obj * obj); + + snk_hops_cfg * snk_hops_cfg_construct(void); + + void snk_hops_cfg_destroy(snk_hops_cfg * snk_hops_config); + +#endif \ No newline at end of file diff --git a/include/odas/sink/snk_pots.h b/include/odas/sink/snk_pots.h new file mode 100644 index 0000000..bc9bc9b --- /dev/null +++ b/include/odas/sink/snk_pots.h @@ -0,0 +1,116 @@ +#ifndef __ODAS_SINK_POTS +#define __ODAS_SINK_POTS + + /** + * \file snk_pots.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + #include + #include + #include + #include + + #include "../general/format.h" + #include "../general/interface.h" + #include "../message/msg_pots.h" + + typedef struct snk_pots_obj { + + unsigned long long timeStamp; + + unsigned int nPots; + unsigned int fS; + + format_obj * format; + interface_obj * interface; + + char * buffer; + unsigned int bufferSize; + + FILE * fp; + + struct sockaddr_in sserver; + int sid; + + msg_pots_obj * in; + + } snk_pots_obj; + + typedef struct snk_pots_cfg { + + unsigned int fS; + format_obj * format; + interface_obj * interface; + + } snk_pots_cfg; + + snk_pots_obj * snk_pots_construct(const snk_pots_cfg * snk_pots_config, const msg_pots_cfg * msg_pots_config); + + void snk_pots_destroy(snk_pots_obj * obj); + + void snk_pots_connect(snk_pots_obj * obj, msg_pots_obj * in); + + void snk_pots_disconnect(snk_pots_obj * obj); + + void snk_pots_open(snk_pots_obj * obj); + + void snk_pots_open_interface_blackhole(snk_pots_obj * obj); + + void snk_pots_open_interface_file(snk_pots_obj * obj); + + void snk_pots_open_interface_socket(snk_pots_obj * obj); + + void snk_pots_open_interface_terminal(snk_pots_obj * obj); + + void snk_pots_close(snk_pots_obj * obj); + + void snk_pots_close_interface_blackhole(snk_pots_obj * obj); + + void snk_pots_close_interface_file(snk_pots_obj * obj); + + void snk_pots_close_interface_socket(snk_pots_obj * obj); + + void snk_pots_close_interface_terminal(snk_pots_obj * obj); + + int snk_pots_process(snk_pots_obj * obj); + + void snk_pots_process_interface_blackhole(snk_pots_obj * obj); + + void snk_pots_process_interface_file(snk_pots_obj * obj); + + void snk_pots_process_interface_socket(snk_pots_obj * obj); + + void snk_pots_process_interface_terminal(snk_pots_obj * obj); + + void snk_pots_process_format_binary_float(snk_pots_obj * obj); + + void snk_pots_process_format_text_json(snk_pots_obj * obj); + + void snk_pots_process_format_undefined(snk_pots_obj * obj); + + snk_pots_cfg * snk_pots_cfg_construct(void); + + void snk_pots_cfg_destroy(snk_pots_cfg * snk_pots_config); + +#endif \ No newline at end of file diff --git a/include/odas/sink/snk_powers.h b/include/odas/sink/snk_powers.h new file mode 100644 index 0000000..423d0ba --- /dev/null +++ b/include/odas/sink/snk_powers.h @@ -0,0 +1,88 @@ +#ifndef __ODAS_SINK_POWERS +#define __ODAS_SINK_POWERS + + /** + * \file snk_powers.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + #include "../general/format.h" + #include "../general/interface.h" + #include "../message/msg_powers.h" + + typedef struct snk_powers_obj { + + unsigned long long timeStamp; + + unsigned int halfFrameSize; + unsigned int nChannels; + unsigned int fS; + + format_obj * format; + interface_obj * interface; + + char * buffer; + unsigned int bufferSize; + + FILE * fp; + + msg_powers_obj * in; + + } snk_powers_obj; + + typedef struct snk_powers_cfg { + + unsigned int fS; + format_obj * format; + interface_obj * interface; + + } snk_powers_cfg; + + snk_powers_obj * snk_powers_construct(const snk_powers_cfg * snk_powers_config, const msg_powers_cfg * msg_powers_config); + + void snk_powers_destroy(snk_powers_obj * obj); + + void snk_powers_connect(snk_powers_obj * obj, msg_powers_obj * in); + + void snk_powers_disconnect(snk_powers_obj * obj); + + void snk_powers_open(snk_powers_obj * obj); + + void snk_powers_open_interface_blackhole(snk_powers_obj * obj); + + void snk_powers_close(snk_powers_obj * obj); + + void snk_powers_close_interface_blackhole(snk_powers_obj * obj); + + int snk_powers_process(snk_powers_obj * obj); + + void snk_powers_process_interface_blackhole(snk_powers_obj * obj); + + void snk_powers_process_format_undefined(snk_powers_obj * obj); + + snk_powers_cfg * snk_powers_cfg_construct(void); + + void snk_powers_cfg_destroy(snk_powers_cfg * snk_powers_config); + +#endif \ No newline at end of file diff --git a/include/odas/sink/snk_spectra.h b/include/odas/sink/snk_spectra.h new file mode 100644 index 0000000..302ea19 --- /dev/null +++ b/include/odas/sink/snk_spectra.h @@ -0,0 +1,85 @@ +#ifndef __ODAS_SINK_SPECTRA +#define __ODAS_SINK_SPECTRA + + /** + * \file snk_spectra.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + #include "../general/format.h" + #include "../general/interface.h" + #include "../message/msg_spectra.h" + + typedef struct snk_spectra_obj { + + unsigned long long timeStamp; + + unsigned int halfFrameSize; + unsigned int nChannels; + unsigned int fS; + + format_obj * format; + interface_obj * interface; + + FILE * fp; + + msg_spectra_obj * in; + + } snk_spectra_obj; + + typedef struct snk_spectra_cfg { + + unsigned int fS; + format_obj * format; + interface_obj * interface; + + } snk_spectra_cfg; + + snk_spectra_obj * snk_spectra_construct(const snk_spectra_cfg * snk_spectra_config, const msg_spectra_cfg * msg_spectra_config); + + void snk_spectra_destroy(snk_spectra_obj * obj); + + void snk_spectra_connect(snk_spectra_obj * obj, msg_spectra_obj * in); + + void snk_spectra_disconnect(snk_spectra_obj * obj); + + void snk_spectra_open(snk_spectra_obj * obj); + + void snk_spectra_open_interface_blackhole(snk_spectra_obj * obj); + + void snk_spectra_close(snk_spectra_obj * obj); + + void snk_spectra_close_interface_blackhole(snk_spectra_obj * obj); + + int snk_spectra_process(snk_spectra_obj * obj); + + void snk_spectra_process_interface_blackhole(snk_spectra_obj * obj); + + void snk_spectra_process_format_undefined(snk_spectra_obj * obj); + + snk_spectra_cfg * snk_spectra_cfg_construct(void); + + void snk_spectra_cfg_destroy(snk_spectra_cfg * snk_spectra_config); + +#endif \ No newline at end of file diff --git a/include/odas/sink/snk_tracks.h b/include/odas/sink/snk_tracks.h new file mode 100644 index 0000000..98049cf --- /dev/null +++ b/include/odas/sink/snk_tracks.h @@ -0,0 +1,114 @@ +#ifndef __ODAS_SINK_TRACKS +#define __ODAS_SINK_TRACKS + + /** + * \file snk_tracks.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + #include + #include + #include + #include + + #include "../general/format.h" + #include "../general/interface.h" + #include "../message/msg_tracks.h" + + typedef struct snk_tracks_obj { + + unsigned long long timeStamp; + + unsigned int nTracks; + unsigned int fS; + + format_obj * format; + interface_obj * interface; + + char * buffer; + unsigned int bufferSize; + + FILE * fp; + + struct sockaddr_in sserver; + int sid; + + msg_tracks_obj * in; + + } snk_tracks_obj; + + typedef struct snk_tracks_cfg { + + unsigned int fS; + format_obj * format; + interface_obj * interface; + + } snk_tracks_cfg; + + snk_tracks_obj * snk_tracks_construct(const snk_tracks_cfg * snk_tracks_config, const msg_tracks_cfg * msg_tracks_config); + + void snk_tracks_destroy(snk_tracks_obj * obj); + + void snk_tracks_connect(snk_tracks_obj * obj, msg_tracks_obj * in); + + void snk_tracks_disconnect(snk_tracks_obj * obj); + + void snk_tracks_open(snk_tracks_obj * obj); + + void snk_tracks_open_interface_blackhole(snk_tracks_obj * obj); + + void snk_tracks_open_interface_file(snk_tracks_obj * obj); + + void snk_tracks_open_interface_socket(snk_tracks_obj * obj); + + void snk_tracks_open_interface_terminal(snk_tracks_obj * obj); + + void snk_tracks_close(snk_tracks_obj * obj); + + void snk_tracks_close_interface_blackhole(snk_tracks_obj * obj); + + void snk_tracks_close_interface_file(snk_tracks_obj * obj); + + void snk_tracks_close_interface_socket(snk_tracks_obj * obj); + + void snk_tracks_close_interface_terminal(snk_tracks_obj * obj); + + int snk_tracks_process(snk_tracks_obj * obj); + + void snk_tracks_process_interface_blackhole(snk_tracks_obj * obj); + + void snk_tracks_process_interface_file(snk_tracks_obj * obj); + + void snk_tracks_process_interface_socket(snk_tracks_obj * obj); + + void snk_tracks_process_interface_terminal(snk_tracks_obj * obj); + + void snk_tracks_process_format_text_json(snk_tracks_obj * obj); + + void snk_tracks_process_format_undefined(snk_tracks_obj * obj); + + snk_tracks_cfg * snk_tracks_cfg_construct(void); + + void snk_tracks_cfg_destroy(snk_tracks_cfg * snk_tracks_config); + +#endif \ No newline at end of file diff --git a/include/odas/source/src_hops.h b/include/odas/source/src_hops.h new file mode 100644 index 0000000..b0a32b9 --- /dev/null +++ b/include/odas/source/src_hops.h @@ -0,0 +1,105 @@ +#ifndef __ODAS_SOURCE_HOPS +#define __ODAS_SOURCE_HOPS + + /** + * \file src_hops.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + #include + + #include "../general/format.h" + #include "../general/interface.h" + #include "../message/msg_hops.h" + #include "../signal/hop.h" + #include "../utils/pcm.h" + + typedef struct src_hops_obj { + + unsigned long long timeStamp; + + unsigned int hopSize; + unsigned int nChannels; + unsigned int fS; + + format_obj * format; + interface_obj * interface; + + FILE * fp; + snd_pcm_t * ch; + + char * buffer; + unsigned int bufferSize; + + char bytes[4]; + + msg_hops_obj * out; + + } src_hops_obj; + + typedef struct src_hops_cfg { + + format_obj * format; + interface_obj * interface; + + } src_hops_cfg; + + src_hops_obj * src_hops_construct(const src_hops_cfg * src_hops_config, const msg_hops_cfg * msg_hops_config); + + void src_hops_destroy(src_hops_obj * obj); + + void src_hops_connect(src_hops_obj * obj, msg_hops_obj * out); + + void src_hops_disconnect(src_hops_obj * obj); + + void src_hops_open(src_hops_obj * obj); + + void src_hops_open_interface_file(src_hops_obj * obj); + + void src_hops_open_interface_soundcard(src_hops_obj * obj); + + void src_hops_close(src_hops_obj * obj); + + void src_hops_close_interface_file(src_hops_obj * obj); + + void src_hops_close_interface_soundcard(src_hops_obj * obj); + + int src_hops_process(src_hops_obj * obj); + + int src_hops_process_interface_file(src_hops_obj * obj); + + int src_hops_process_interface_soundcard(src_hops_obj * obj); + + void src_hops_process_format_binary_int08(src_hops_obj * obj); + + void src_hops_process_format_binary_int16(src_hops_obj * obj); + + void src_hops_process_format_binary_int24(src_hops_obj * obj); + + void src_hops_process_format_binary_int32(src_hops_obj * obj); + + src_hops_cfg * src_hops_cfg_construct(void); + + void src_hops_cfg_destroy(src_hops_cfg * src_hops_config); + +#endif \ No newline at end of file diff --git a/include/odas/system/acorr2pitch.h b/include/odas/system/acorr2pitch.h new file mode 100644 index 0000000..b5b7863 --- /dev/null +++ b/include/odas/system/acorr2pitch.h @@ -0,0 +1,46 @@ +#ifndef __ODAS_SYSTEM_ACORR2PITCH +#define __ODAS_SYSTEM_ACORR2PITCH + + /** + * \file acorr2pitch.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + + #include + + typedef struct acorr2pitch_obj { + + unsigned int nSignals; + unsigned int halfFrameSize; + unsigned int frameSize; + unsigned int winSize; + + } acorr2pitch_obj; + + acorr2pitch_obj * acorr2pitch_construct_zero(const unsigned int nSignals, const unsigned int halfFrameSize, const unsigned int winSize); + + void acorr2pitch_destroy(acorr2pitch_obj * obj); + + void acorr2pitch_process(acorr2pitch_obj * obj, const acorrs_obj * acorrs, pitches_obj * pitches); + +#endif diff --git a/include/odas/system/demixing2env.h b/include/odas/system/demixing2env.h new file mode 100644 index 0000000..e1dc1ee --- /dev/null +++ b/include/odas/system/demixing2env.h @@ -0,0 +1,50 @@ +#ifndef __ODAS_SYSTEM_DEMIXING2ENV +#define __ODAS_SYSTEM_DEMIXING2ENV + + /** + * \file demixing2env.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + #include + + #include + #include + #include + #include + + typedef struct demixing2env_obj { + + unsigned int nSeps; + unsigned int nChannels; + unsigned int halfFrameSize; + + } demixing2env_obj; + + demixing2env_obj * demixing2env_construct_zero(const unsigned int nSeps, const unsigned int nChannels, const unsigned int halfFrameSize); + + void demixing2env_destroy(demixing2env_obj * obj); + + void demixing2env_process(demixing2env_obj * obj, const tracks_obj * tracks, const demixings_obj * demixings, const masks_obj * masks, const envs_obj * envsChannel, envs_obj * envsSeparated); + +#endif diff --git a/include/odas/system/demixing2freq.h b/include/odas/system/demixing2freq.h new file mode 100644 index 0000000..a9f5112 --- /dev/null +++ b/include/odas/system/demixing2freq.h @@ -0,0 +1,50 @@ +#ifndef __ODAS_SYSTEM_DEMIXING2FREQ +#define __ODAS_SYSTEM_DEMIXING2FREQ + + /** + * \file demixing2freq.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + #include + + #include + #include + #include + #include + + typedef struct demixing2freq_obj { + + unsigned int nSeps; + unsigned int nChannels; + unsigned int halfFrameSize; + + } demixing2freq_obj; + + demixing2freq_obj * demixing2freq_construct_zero(const unsigned int nSeps, const unsigned int nChannels, const unsigned int halfFrameSize); + + void demixing2freq_destroy(demixing2freq_obj * obj); + + void demixing2freq_process(demixing2freq_obj * obj, const tracks_obj * tracks, const demixings_obj * demixings, const masks_obj * masks, const freqs_obj * freqsChannel, freqs_obj * freqsSeparated); + +#endif diff --git a/include/odas/system/env2env.h b/include/odas/system/env2env.h new file mode 100644 index 0000000..fdbf6ff --- /dev/null +++ b/include/odas/system/env2env.h @@ -0,0 +1,230 @@ +#ifndef __ODAS_SYSTEM_ENV2ENV +#define __ODAS_SYSTEM_ENV2ENV + + /** + * \file env2env.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + #include + #include + #include + #include + + typedef struct env2env_mcra_obj { + + unsigned int nChannels; + unsigned int halfFrameSize; + + unsigned int bSize; + float alphaS; + unsigned int L; + float delta; + float alphaD; + + unsigned long long * idsPrev; + unsigned int * l; + + float * b; + float ** S; + float ** Smin; + float ** SminPrev; + float ** SPrev; + float ** Stmp; + float ** StmpPrev; + float ** Sf; + float ** lambdaD; + float ** lambdaDnext; + + } env2env_mcra_obj; + + typedef struct env2env_weight_obj { + + unsigned int nChannels; + unsigned int halfFrameSize; + + float alphaD; + float epsilon; + + float ** XPrev; + float ** xi; + float ** zetaPrev; + + } env2env_weight_obj; + + typedef struct env2env_interf_obj { + + unsigned int nChannels; + unsigned int halfFrameSize; + + float eta; + float alphaZ; + + float ** Zs; + float ** ZsPrev; + + } env2env_interf_obj; + + typedef struct env2env_gainspeech_obj { + + unsigned int nChannels; + unsigned int halfFrameSize; + + float alphaPmin; + float epsilon; + + float ** gamma; + float ** alphaP; + float ** xi; + float ** GH1; + float ** v; + + transcendental_obj * transcendental; + + } env2env_gainspeech_obj; + + typedef struct env2env_probspeech_obj { + + unsigned int nChannels; + unsigned int halfFrameSize; + unsigned int frameSize; + + float theta; + float alpha; + float maxAbsenceProb; + float Gmin; + + unsigned int winSizeLocal; + unsigned int winSizeGlobal; + unsigned int winSizeFrame; + + fft_obj * fft; + + float * winLocal; + float * winGlobal; + float * winFrame; + + float * winLocalShifted; + float * winGlobalShifted; + float * winFrameShifted; + + float * winLocalShiftedFreq; + float * winGlobalShiftedFreq; + float * winFrameShiftedFreq; + + float ** xiTime; + float ** xiFreq; + + float ** xiSmoothedLocalFreq; + float ** xiSmoothedGlobalFreq; + float ** xiSmoothedFrameFreq; + float ** xiSmoothedLocalTime; + float ** xiSmoothedGlobalTime; + float ** xiSmoothedFrameTime; + float ** xiSmoothedLocal; + float ** xiSmoothedGlobal; + float ** xiSmoothedFrame; + + float ** zetaLocal; + float ** zetaLocalPrev; + float ** zetaGlobal; + float ** zetaGlobalPrev; + float ** zetaFrame; + float ** zetaFramePrev; + + float ** PLocal; + float ** PGlobal; + float ** PFrame; + + float ** q; + float ** p; + + } env2env_probspeech_obj; + + typedef struct env2env_gainall_obj { + + unsigned int nChannels; + unsigned int halfFrameSize; + + float Gmin; + + } env2env_gainall_obj; + + typedef struct env2env_gainratio_obj { + + unsigned int nInitChannels; + unsigned int nChannels; + unsigned int halfFrameSize; + + float Gmin; + float Gmid; + float Gslope; + + float epsilon; + + } env2env_gainratio_obj; + + env2env_mcra_obj * env2env_mcra_construct_zero(const unsigned int nChannels, const unsigned int halfFrameSize, const unsigned int bSize, const float alphaS, const unsigned int L, const float delta, const float alphaD); + + void env2env_mcra_destroy(env2env_mcra_obj * obj); + + void env2env_mcra_process(env2env_mcra_obj * obj, const tracks_obj * tracks, const envs_obj * noisys, const envs_obj * estNoises, envs_obj * noises); + + env2env_weight_obj * env2env_weight_construct_zero(const unsigned int nChannels, const unsigned int halfFrameSize, const float alphaD, const float epsilon); + + void env2env_weight_destroy(env2env_weight_obj * obj); + + void env2env_weight_process(env2env_weight_obj * obj, const tracks_obj * tracks, const envs_obj * noisys, const envs_obj * noises, envs_obj * weights); + + env2env_interf_obj * env2env_interf_construct_zero(const unsigned int nChannels, const unsigned int halfFrameSize, const float eta, const float alphaZ); + + void env2env_interf_destroy(env2env_interf_obj * obj); + + void env2env_interf_process(env2env_interf_obj * obj, const tracks_obj * tracks, const envs_obj * seps, const envs_obj * noises, envs_obj * interfs); + + env2env_gainspeech_obj * env2env_gainspeech_construct_zero(const unsigned int nChannels, const unsigned int halfFrameSize, const float alphaPmin, const float epsilon); + + void env2env_gainspeech_destroy(env2env_gainspeech_obj * obj); + + void env2env_gainspeech_process(env2env_gainspeech_obj * obj, const tracks_obj * tracks, const envs_obj * seps, const envs_obj * noises, envs_obj * gains, envs_obj * snrs, envs_obj * vs); + + env2env_probspeech_obj * env2env_probspeech_construct_zero(const unsigned int nChannels, const unsigned int halfFrameSize, const float theta, const float alpha, const float maxAbsenceProb, const float Gmin, const unsigned int winSizeLocal, const unsigned int winSizeGlobal, const unsigned int winSizeFrame); + + void env2env_probspeech_destroy(env2env_probspeech_obj * obj); + + void env2env_probspeech_process(env2env_probspeech_obj * obj, const tracks_obj * tracks, const envs_obj * snrs, const envs_obj * vs, envs_obj * probspeechs); + + env2env_gainall_obj * env2env_gainall_construct_zero(const unsigned int nChannels, const unsigned int halfFrameSize, const float Gmin); + + void env2env_gainall_destroy(env2env_gainall_obj * obj); + + void env2env_gainall_process(env2env_gainall_obj * obj, const tracks_obj * tracks, const envs_obj * gainspeeches, const envs_obj * probspeeches, envs_obj * gainalls); + + env2env_gainratio_obj * env2env_gainratio_construct_zero(const unsigned int nInitChannels, const unsigned int nChannels, const unsigned int halfFrameSize, const float Gmin, const float Gmid, const float Gslope, const float epsilon); + + void env2env_gainratio_destroy(env2env_gainratio_obj * obj); + + void env2env_gainratio_process(env2env_gainratio_obj * obj, const tracks_obj * tracks, const envs_obj * seps, const envs_obj * diffuse, envs_obj * gainratio); + +#endif diff --git a/include/odas/system/frame2freq.h b/include/odas/system/frame2freq.h new file mode 100644 index 0000000..b42162d --- /dev/null +++ b/include/odas/system/frame2freq.h @@ -0,0 +1,52 @@ +#ifndef __ODAS_SYSTEM_FRAME2FREQ +#define __ODAS_SYSTEM_FRAME2FREQ + + /** + * \file frame2freq.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + + #include + #include + #include + #include + #include + + typedef struct frame2freq_obj { + + unsigned int frameSize; + unsigned int halfFrameSize; + + window_obj * win; + float * frame; + + fft_obj * fft; + + } frame2freq_obj; + + frame2freq_obj * frame2freq_construct_zero(const unsigned int frameSize, const unsigned int halfFrameSize); + + void frame2freq_destroy(frame2freq_obj * obj); + + void frame2freq_process(frame2freq_obj * obj, const frames_obj * frames, freqs_obj * freqs); + +#endif diff --git a/include/odas/system/frame2hop.h b/include/odas/system/frame2hop.h new file mode 100644 index 0000000..d42fa9d --- /dev/null +++ b/include/odas/system/frame2hop.h @@ -0,0 +1,48 @@ +#ifndef __ODAS_SYSTEM_FRAME2HOP +#define __ODAS_SYSTEM_FRAME2HOP + + /** + * \file frame2hop.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + + #include + #include + + typedef struct frame2hop_obj { + + unsigned int hopSize; + unsigned int frameSize; + unsigned int nSignals; + + float ** array; + + } frame2hop_obj; + + frame2hop_obj * frame2hop_construct_zero(const unsigned int hopSize, const unsigned int frameSize, const unsigned int nSignals); + + void frame2hop_destroy(frame2hop_obj * obj); + + void frame2hop_process(frame2hop_obj * obj, const frames_obj * frames, hops_obj * hops); + +#endif diff --git a/include/odas/system/freq2acorr.h b/include/odas/system/freq2acorr.h new file mode 100644 index 0000000..9b7be53 --- /dev/null +++ b/include/odas/system/freq2acorr.h @@ -0,0 +1,53 @@ +#ifndef __ODAS_SYSTEM_FREQ2ACORR +#define __ODAS_SYSTEM_FREQ2ACORR + + /** + * \file freq2acorr.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + #include + #include + #include + + typedef struct freq2acorr_obj { + + unsigned int nSignals; + unsigned int halfFrameSize; + unsigned int frameSize; + + float * arrayIn; + float * arrayOut; + + fft_obj * fft; + + } freq2acorr_obj; + + freq2acorr_obj * freq2acorr_construct_zero(const unsigned int nSignals, const unsigned int halfFrameSize); + + void freq2acorr_destroy(freq2acorr_obj * obj); + + void freq2acorr_process(freq2acorr_obj * obj, const freqs_obj * freqs, acorrs_obj * acorrs); + +#endif diff --git a/include/odas/system/freq2env.h b/include/odas/system/freq2env.h new file mode 100644 index 0000000..5c004f9 --- /dev/null +++ b/include/odas/system/freq2env.h @@ -0,0 +1,43 @@ +#ifndef __ODAS_SYSTEM_FREQ2ENV +#define __ODAS_SYSTEM_FREQ2ENV + + /** + * \file freq2env.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + + #include + #include + + typedef struct freq2env_obj { + + unsigned int halfFrameSize; + + } freq2env_obj; + + freq2env_obj * freq2env_construct_zero(const unsigned int halfFrameSize); + + void freq2env_destroy(freq2env_obj * obj); + + void freq2env_process(freq2env_obj * obj, const freqs_obj * freqs, envs_obj * envs); + +#endif diff --git a/include/odas/system/freq2frame.h b/include/odas/system/freq2frame.h new file mode 100644 index 0000000..b0e7ddd --- /dev/null +++ b/include/odas/system/freq2frame.h @@ -0,0 +1,52 @@ +#ifndef __ODAS_SYSTEM_FREQ2FRAME +#define __ODAS_SYSTEM_FREQ2FRAME + + /** + * \file freq2frame.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + + #include + #include + #include + #include + #include + + typedef struct freq2frame_obj { + + unsigned int frameSize; + unsigned int halfFrameSize; + + window_obj * win; + float * frame; + + fft_obj * fft; + + } freq2frame_obj; + + freq2frame_obj * freq2frame_construct_zero(const unsigned int frameSize, const unsigned int halfFrameSize); + + void freq2frame_destroy(freq2frame_obj * obj); + + void freq2frame_process(freq2frame_obj * obj, const freqs_obj * freqs, frames_obj * frames); + +#endif diff --git a/include/odas/system/freq2freq.h b/include/odas/system/freq2freq.h new file mode 100644 index 0000000..7b70200 --- /dev/null +++ b/include/odas/system/freq2freq.h @@ -0,0 +1,110 @@ +#ifndef __ODAS_SYSTEM_FREQ2FREQ +#define __ODAS_SYSTEM_FREQ2FREQ + + /** + * \file freq2freq.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + + #include + #include + #include + #include + + typedef struct freq2freq_phasor_obj { + + unsigned int halfFrameSize; + float epsilon; + + } freq2freq_phasor_obj; + + typedef struct freq2freq_weightedphasor_obj { + + unsigned int halfFrameSize; + float epsilon; + + } freq2freq_weightedphasor_obj; + + typedef struct freq2freq_product_obj { + + unsigned int halfFrameSize; + + } freq2freq_product_obj; + + typedef struct freq2freq_lowpass_obj { + + unsigned int halfFrameSize; + unsigned int lowPassCut; + + } freq2freq_lowpass_obj; + + typedef struct freq2freq_interpolate_obj { + + unsigned halfFrameSize; + unsigned halfFrameSizeInterp; + + } freq2freq_interpolate_obj; + + typedef struct freq2freq_gain_obj { + + unsigned int halfFrameSize; + + } freq2freq_gain_obj; + + freq2freq_phasor_obj * freq2freq_phasor_construct_zero(const unsigned int halfFrameSize, const float epsilon); + + void freq2freq_phasor_destroy(freq2freq_phasor_obj * obj); + + void freq2freq_phasor_process(freq2freq_phasor_obj * obj, const freqs_obj * freqs, freqs_obj * phasors); + + freq2freq_weightedphasor_obj * freq2freq_weightedphasor_construct_zero(const unsigned int halfFrameSize, const float epsilon); + + void freq2freq_weightedphasor_destroy(freq2freq_weightedphasor_obj * obj); + + void freq2freq_weightedphasor_process(freq2freq_weightedphasor_obj * obj, const freqs_obj * freqs, const envs_obj * weights, freqs_obj * weightedphasors); + + freq2freq_product_obj * freq2freq_product_construct_zero(const unsigned int halfFrameSize); + + void freq2freq_product_destroy(freq2freq_product_obj * obj); + + void freq2freq_product_process(freq2freq_product_obj * obj, const freqs_obj * freqs1, const freqs_obj * freqs2, const pairs_obj * pairs, freqs_obj * freqs12); + + freq2freq_lowpass_obj * freq2freq_lowpass_construct_zero(const unsigned int halfFrameSize, const unsigned int lowPassCut); + + void freq2freq_lowpass_destroy(freq2freq_lowpass_obj * obj); + + void freq2freq_lowpass_process(freq2freq_lowpass_obj * obj, const freqs_obj * freqsAllPass, freqs_obj * freqsLowPass); + + freq2freq_interpolate_obj * freq2freq_interpolate_construct_zero(const unsigned int halfFrameSize, const unsigned int halfFrameSizeInterp); + + void freq2freq_interpolate_destroy(freq2freq_interpolate_obj * obj); + + void freq2freq_interpolate_process(freq2freq_interpolate_obj * obj, const freqs_obj * freqs, const freqs_obj * freqsInterp); + + freq2freq_gain_obj * freq2freq_gain_construct_zero(const unsigned int halfFrameSize); + + void freq2freq_gain_destroy(freq2freq_gain_obj * obj); + + void freq2freq_gain_process(freq2freq_gain_obj * obj, const freqs_obj * freqsIn, const envs_obj * envsIn, freqs_obj * freqsOut); + +#endif diff --git a/include/odas/system/freq2xcorr.h b/include/odas/system/freq2xcorr.h new file mode 100644 index 0000000..811f53b --- /dev/null +++ b/include/odas/system/freq2xcorr.h @@ -0,0 +1,50 @@ +#ifndef __ODAS_SYSTEM_FREQ2XCORR +#define __ODAS_SYSTEM_FREQ2XCORR + + /** + * \file freq2xcorr.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + #include + #include + #include + + typedef struct freq2xcorr_obj { + + unsigned int frameSize; + unsigned int halfFrameSize; + + float * frame; + + fft_obj * fft; + + } freq2xcorr_obj; + + freq2xcorr_obj * freq2xcorr_construct_zero(const unsigned int frameSize, const unsigned int halfFrameSize); + + void freq2xcorr_destroy(freq2xcorr_obj * obj); + + void freq2xcorr_process(freq2xcorr_obj * obj, const freqs_obj * freqs, const pairs_obj * pairs, xcorrs_obj * xcorrs); + +#endif diff --git a/include/odas/system/gain2mask.h b/include/odas/system/gain2mask.h new file mode 100644 index 0000000..ae43f51 --- /dev/null +++ b/include/odas/system/gain2mask.h @@ -0,0 +1,46 @@ +#ifndef __ODAS_SYSTEM_GAIN2MASK +#define __ODAS_SYSTEM_GAIN2MASK + + /** + * \file gain2mask.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + + #include + #include + + typedef struct gain2mask_obj { + + unsigned int nSeps; + unsigned int nChannels; + float gainMin; + + } gain2mask_obj; + + gain2mask_obj * gain2mask_construct_zero(const unsigned int nSeps, const unsigned int nChannels, const float gainMin); + + void gain2mask_destroy(gain2mask_obj * obj); + + void gain2mask_process(gain2mask_obj * obj, const gains_obj * gains, masks_obj * masks); + +#endif diff --git a/include/odas/system/hop2frame.h b/include/odas/system/hop2frame.h new file mode 100644 index 0000000..793839c --- /dev/null +++ b/include/odas/system/hop2frame.h @@ -0,0 +1,48 @@ +#ifndef __ODAS_SYSTEM_HOP2FRAME +#define __ODAS_SYSTEM_HOP2FRAME + + /** + * \file hop2frame.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + + #include + #include + + typedef struct hop2frame_obj { + + unsigned int hopSize; + unsigned int frameSize; + unsigned int nSignals; + + float ** array; + + } hop2frame_obj; + + hop2frame_obj * hop2frame_construct_zero(const unsigned int hopSize, const unsigned int frameSize, const unsigned int nSignals); + + void hop2frame_destroy(hop2frame_obj * obj); + + void hop2frame_process(hop2frame_obj * obj, const hops_obj * hops, frames_obj * frames); + +#endif diff --git a/include/odas/system/hop2hop.h b/include/odas/system/hop2hop.h new file mode 100644 index 0000000..311aa7b --- /dev/null +++ b/include/odas/system/hop2hop.h @@ -0,0 +1,89 @@ +#ifndef __ODAS_SYSTEM_HOP2HOP +#define __ODAS_SYSTEM_HOP2HOP + + /** + * \file hop2hop.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + #include + #include + + typedef struct hop2hop_multiplex_obj { + + unsigned int hopSize; + + } hop2hop_multiplex_obj; + + typedef struct hop2hop_buffer_obj { + + unsigned int nSignals; + unsigned int hopSizeIn; + unsigned int hopSizeOut; + float intervalIn; + float intervalOut; + float intervalSize; + unsigned int bufferSize; + float ratio; + float delta; + + float iWrite; + float iRead; + + float ** array; + + } hop2hop_buffer_obj; + + typedef struct hop2hop_gain_obj { + + unsigned int hopSize; + float gain; + + } hop2hop_gain_obj; + + hop2hop_multiplex_obj * hop2hop_multiplex_construct_zero(const unsigned int hopSize); + + void hop2hop_multiplex_destroy(hop2hop_multiplex_obj * obj); + + void hop2hop_multiplex_process(hop2hop_multiplex_obj * obj, const links_obj * links, const hops_obj * src, hops_obj * dest); + + hop2hop_buffer_obj * hop2hop_buffer_construct_zero(const unsigned int nSignals, const unsigned int hopSizeIn, const unsigned int hopSizeOut, const float ratio); + + void hop2hop_buffer_destroy(hop2hop_buffer_obj * obj); + + void hop2hop_buffer_push(hop2hop_buffer_obj * obj, const hops_obj * hops); + + void hop2hop_buffer_pop(hop2hop_buffer_obj * obj, hops_obj * hops); + + char hop2hop_buffer_isFull(hop2hop_buffer_obj * obj); + + char hop2hop_buffer_isEmpty(hop2hop_buffer_obj * obj); + + hop2hop_gain_obj * hop2hop_gain_construct_zero(const unsigned int hopSize, const float gain); + + void hop2hop_gain_destroy(hop2hop_gain_obj * obj); + + void hop2hop_gain_process(hop2hop_gain_obj * obj, const hops_obj * src, hops_obj * dest); + +#endif diff --git a/include/odas/system/kalman2coherence.h b/include/odas/system/kalman2coherence.h new file mode 100644 index 0000000..c42f416 --- /dev/null +++ b/include/odas/system/kalman2coherence.h @@ -0,0 +1,79 @@ +#ifndef __ODAS_SYSTEM_KALMAN2PRIOR +#define __ODAS_SYSTEM_KALMAN2PRIOR + + /** + * \file kalman2prior.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + + #include + #include + #include + #include + + typedef struct kalman2coherence_obj { + + float epsilon; + + matrix_obj * H; + matrix_obj * Ht; + + matrix_obj * mu_t; + matrix_obj * mu_t_t; + matrix_obj * mu_s; + matrix_obj * mu_s_t; + matrix_obj * mu_st; + matrix_obj * mu_st_t; + + matrix_obj * HP; + matrix_obj * sigma_epsilon; + + matrix_obj * sigma_t; + matrix_obj * sigma_s; + matrix_obj * sigma_st; + + matrix_obj * sigma_t_epsilon; + matrix_obj * sigma_t_inv; + matrix_obj * sigma_s_inv; + matrix_obj * sigma_st_inv; + + matrix_obj * sigma_t_inv_mu_t; + matrix_obj * sigma_s_inv_mu_s; + matrix_obj * sigma_st_inv_mu_st; + + matrix_obj * mu_t_t_sigma_t_inv_mu_t; + matrix_obj * mu_s_t_sigma_s_inv_mu_s; + matrix_obj * mu_st_t_sigma_st_inv_mu_st; + + matrix_obj * sigma_t_inv_mu_t_sigma_s_inv_mu_s; + + } kalman2coherence_obj; + + kalman2coherence_obj * kalman2coherence_construct(const float epsilon, const float sigmaR); + + void kalman2coherence_destroy(kalman2coherence_obj * obj); + + void kalman2coherence_process(kalman2coherence_obj * obj, const kalman_obj * kalman, const pots_obj * pots, const unsigned int iTrack, coherences_obj * coherences); + + +#endif diff --git a/include/odas/system/kalman2kalman.h b/include/odas/system/kalman2kalman.h new file mode 100644 index 0000000..8e61192 --- /dev/null +++ b/include/odas/system/kalman2kalman.h @@ -0,0 +1,88 @@ +#ifndef __ODAS_SYSTEM_KALMAN2KALMAN +#define __ODAS_SYSTEM_KALMAN2KALMAN + + /** + * \file kalman2kalman.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + #include + #include + #include + #include + #include + + typedef struct kalman2kalman_obj { + + float epsilon; + + float deltaT; + float sigmaQ; + float sigmaR; + + matrix_obj * F; + matrix_obj * Ft; + matrix_obj * Q; + matrix_obj * H; + matrix_obj * Ht; + matrix_obj * R; + + matrix_obj * FP; + matrix_obj * FPFt; + + matrix_obj * K; + matrix_obj * PHt; + matrix_obj * HP; + matrix_obj * HPHt; + matrix_obj * HPHt_R; + matrix_obj * HPHt_Rinv; + matrix_obj * Hx; + matrix_obj * z; + matrix_obj * z_Hx; + matrix_obj * Kz_Hx; + matrix_obj * pKz_Hx; + matrix_obj * KHP; + matrix_obj * pKHP; + + } kalman2kalman_obj; + + kalman2kalman_obj * kalman2kalman_construct(const float deltaT, const float sigmaQ, const float sigmaR, const float epsilon); + + void kalman2kalman_destroy(kalman2kalman_obj * obj); + + void kalman2kalman_init_pots(kalman2kalman_obj * obj, const pots_obj * pots, const unsigned int iPot, kalman_obj * kalman); + + void kalman2kalman_init_targets(kalman2kalman_obj * obj, const targets_obj * targets, const unsigned int iTarget, kalman_obj * kalman); + + void kalman2kalman_predict(kalman2kalman_obj * obj, kalman_obj * kalman); + + void kalman2kalman_predict_static(kalman2kalman_obj * obj, kalman_obj * kalman); + + void kalman2kalman_update(kalman2kalman_obj * obj, const postprobs_obj * postprobs, const unsigned int iTrack, const pots_obj * pots, kalman_obj * kalman); + + void kalman2kalman_update_static(kalman2kalman_obj * obj, const postprobs_obj * postprobs, const unsigned int iTrack, const pots_obj * pots, kalman_obj * kalman); + + void kalman2kalman_estimate(kalman2kalman_obj * obj, const kalman_obj * kalman, float * x, float * y, float * z); + +#endif diff --git a/include/odas/system/mixture2mixture.h b/include/odas/system/mixture2mixture.h new file mode 100644 index 0000000..c4d6171 --- /dev/null +++ b/include/odas/system/mixture2mixture.h @@ -0,0 +1,55 @@ +#ifndef __ODAS_SYSTEM_MIXTURE2MIXTURE +#define __ODAS_SYSTEM_MIXTURE2MIXTURE + + /** + * \file mixture2mixture.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + #include + #include + #include + #include + #include + + typedef struct mixture2mixture_obj { + + gaussians_1d_obj * active; + gaussians_1d_obj * inactive; + float diffuse; + + float Pfalse; + float Pnew; + float Ptrack; + float epsilon; + + } mixture2mixture_obj; + + mixture2mixture_obj * mixture2mixture_construct(const gaussians_1d_obj * active_gmm, const gaussians_1d_obj * inactive_gmm, const float diffuse_cst, const float Pfalse, const float Pnew, const float Ptrack, const float epsilon); + + void mixture2mixture_destroy(mixture2mixture_obj * obj); + + void mixture2mixture_process(mixture2mixture_obj * obj, mixture_obj * mixture, const pots_obj * pots, const coherences_obj * coherences, postprobs_obj * postprobs); + +#endif diff --git a/include/odas/system/particle2coherence.h b/include/odas/system/particle2coherence.h new file mode 100644 index 0000000..c848f8c --- /dev/null +++ b/include/odas/system/particle2coherence.h @@ -0,0 +1,45 @@ +#ifndef __ODAS_SYSTEM_PARTICLE2COHERENCE +#define __ODAS_SYSTEM_PARTICLE2COHERENCE + + /** + * \file particle2coherence.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + #include + + typedef struct particle2coherence_obj { + + float sigmaR; + float expScale; + float expFactor; + + } particle2coherence_obj; + + particle2coherence_obj * particle2coherence_construct(const float sigmaR); + + void particle2coherence_destroy(particle2coherence_obj * obj); + + void particle2coherence_process(particle2coherence_obj * obj, const particles_obj * particles, const pots_obj * pots, const unsigned int iTrack, coherences_obj * coherences); + +#endif diff --git a/include/odas/system/particle2particle.h b/include/odas/system/particle2particle.h new file mode 100644 index 0000000..7de8073 --- /dev/null +++ b/include/odas/system/particle2particle.h @@ -0,0 +1,85 @@ +#ifndef __ODAS_SYSTEM_PARTICLE2PARTICLE +#define __ODAS_SYSTEM_PARTICLE2PARTICLE + + /** + * \file particle2particle.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + #include + #include + #include + + typedef struct particle2particle_obj { + + unsigned int nParticles; + float deltaT; + + float alphas[3]; + float betas[3]; + float as[3]; + float bs[3]; + float ratios[3]; + + float sigmaR; + float expScale; + float expFactor; + + float * pdf_ratio; + unsigned int * indexes_ratio; + random_obj * rnd_ratio; + + float * pdf_weight; + unsigned int * indexes_weight; + random_obj * rnd_weight; + + float * realisation_normal; + double epsilon; + normaloff_obj * normaloff; + + float * sum_P_p_x_O; + particles_obj * particles; + + float Nmin; + + } particle2particle_obj; + + particle2particle_obj * particle2particle_construct(const unsigned int nParticles, const float deltaT, const float st_alpha, const float st_beta, const float st_ratio, const float ve_alpha, const float ve_beta, const float ve_ratio, const float ac_alpha, const float ac_beta, const float ac_ratio, const double epsilon, const float sigmaR, const float Nmin); + + void particle2particle_destroy(particle2particle_obj * obj); + + void particle2particle_init_pots(particle2particle_obj * obj, const pots_obj * pots, const unsigned int iPot, particles_obj * particles); + + void particle2particle_init_targets(particle2particle_obj * obj, const targets_obj * targets, const unsigned int iTarget, particles_obj * particles); + + void particle2particle_predict(particle2particle_obj * obj, particles_obj * particles); + + void particle2particle_predict_static(particle2particle_obj * obj, particles_obj * particles); + + void particle2particle_update(particle2particle_obj * obj, const postprobs_obj * postprobs, const unsigned int iTrack, const pots_obj * pots, particles_obj * particles); + + void particle2particle_update_static(particle2particle_obj * obj, const postprobs_obj * postprobs, const unsigned int iTrack, const pots_obj * pots, particles_obj * particles); + + void particle2particle_estimate(const particle2particle_obj * obj, const particles_obj * particles, float * x, float * y, float * z); + +#endif diff --git a/include/odas/system/pitch2category.h b/include/odas/system/pitch2category.h new file mode 100644 index 0000000..ea88203 --- /dev/null +++ b/include/odas/system/pitch2category.h @@ -0,0 +1,65 @@ +#ifndef __ODAS_SYSTEM_PITCH2CATEGORY +#define __ODAS_SYSTEM_PITCH2CATEGORY + + /** + * \file pitch2category.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + #include + + #include + #include + #include + + typedef struct pitch2category_obj { + + unsigned int nSeps; + + float tauMin; + float tauMax; + float deltaTauMax; + float alpha; + float gamma; + float phiMin; + float r0; + + float * tausNow; + float * tausPrev; + float * deltaTausNow; + float * deltaTausPrev; + float * phisNow; + float * phisPrev; + float * vs; + float * rs; + char * categories; + + } pitch2category_obj; + + pitch2category_obj * pitch2category_construct_zero(const unsigned int nSeps, const float tauMin, const float tauMax, const float deltaTauMax, const float alpha, const float gamma, const float phiMin, const float r0); + + void pitch2category_destroy(pitch2category_obj * obj); + + void pitch2category_process(pitch2category_obj * obj, const pitches_obj * pitches, const tracks_obj * tracks, categories_obj * categories); + +#endif diff --git a/include/odas/system/steer2demixing.h b/include/odas/system/steer2demixing.h new file mode 100644 index 0000000..0ec7fe9 --- /dev/null +++ b/include/odas/system/steer2demixing.h @@ -0,0 +1,117 @@ +#ifndef __ODAS_SYSTEM_STEER2DEMIXING +#define __ODAS_SYSTEM_STEER2DEMIXING + + /** + * \file steer2demixing.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + #include + + #include + #include + #include + #include + #include + + #include + + typedef struct steer2demixing_ds_obj { + + unsigned int nSeps; + unsigned int nChannels; + unsigned int halfFrameSize; + float epsilon; + + float * gains2; + + } steer2demixing_ds_obj; + + typedef struct steer2demixing_gss_obj { + + unsigned int nSeps; + unsigned int nChannels; + unsigned int halfFrameSize; + float epsilon; + + float mu; + float lambda; + + cmatrix_obj * X; + cmatrix_obj * XH; + + cmatrix_obj ** Y; + cmatrix_obj ** YH; + cmatrix_obj ** Ryy; + cmatrix_obj ** E; + cmatrix_obj ** A; + cmatrix_obj ** AH; + cmatrix_obj ** Wn; + cmatrix_obj ** Wnp1; + cmatrix_obj ** dJ1; + cmatrix_obj ** dJ2; + + cmatrix_obj ** dJ1_EY; + cmatrix_obj ** dJ1_4EY; + cmatrix_obj ** dJ1_4EYXH; + + cmatrix_obj ** dJ2_WA; + cmatrix_obj ** dJ2_WAmI; + cmatrix_obj ** dJ2_2WAmI; + cmatrix_obj ** dJ2_2WAmIAH; + + cmatrix_obj ** alpha_dJ1; + cmatrix_obj ** alpha_dJ1_p_dJ2; + cmatrix_obj ** mu_alpha_dJ1_p_dJ2; + cmatrix_obj ** one_m_lambda_mu_Wn; + cmatrix_obj ** one_m_lambda_mu_Wn_m_mu_alpha_dJ1_p_dJ2; + + } steer2demixing_gss_obj; + + typedef struct steer2demixing_mvdr_obj { + + } steer2demixing_mvdr_obj; + + + steer2demixing_ds_obj * steer2demixing_ds_construct_zero(const unsigned int nSeps, const unsigned int nChannels, const unsigned int halfFrameSize, const float epsilon); + + void steer2demixing_ds_destroy(steer2demixing_ds_obj * obj); + + void steer2demixing_ds_process(steer2demixing_ds_obj * obj, const tracks_obj * tracks, const steers_obj * steers, const masks_obj * masks, demixings_obj * demixings); + + + steer2demixing_gss_obj * steer2demixing_gss_construct_zero(const unsigned int nSeps, const unsigned int nChannels, const unsigned int halfFrameSize, const float mu, const float lambda, const float epsilon); + + void steer2demixing_gss_destroy(steer2demixing_gss_obj * obj); + + void steer2demixing_gss_process(steer2demixing_gss_obj * obj, const tracks_obj * tracksPrev, const tracks_obj * tracks, const steers_obj * steers, const masks_obj * masks, const freqs_obj * freqs, const demixings_obj * demixingsPrev, demixings_obj * demixings); + + + steer2demixing_mvdr_obj * steer2demixing_mvdr_construct_zero(const unsigned int nSeps, const unsigned int nChannels, const unsigned int halfFrameSize, const float alpha, const float sigma, const unsigned int deltaK); + + void steer2demixing_mvdr_destroy(steer2demixing_mvdr_obj * obj); + + void steer2demixing_mvdr_process(steer2demixing_mvdr_obj * obj, const tracks_obj * tracks, const steers_obj * steers, const masks_obj * masks, const freqs_obj * freqs, demixings_obj * demixings); + + +#endif diff --git a/include/odas/system/track2gain.h b/include/odas/system/track2gain.h new file mode 100644 index 0000000..55e425f --- /dev/null +++ b/include/odas/system/track2gain.h @@ -0,0 +1,50 @@ +#ifndef __ODAS_SYSTEM_TRACK2GAIN +#define __ODAS_SYSTEM_TRACK2GAIN + + /** + * \file track2gain.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + #include + #include + #include + + typedef struct track2gain_obj { + + unsigned int nSeps; + unsigned int nChannels; + float * directions; + float * direction; + + } track2gain_obj; + + track2gain_obj * track2gain_construct_zero(const unsigned int nSeps, const unsigned int nChannels, const float * directions, const float * direction); + + void track2gain_destroy(track2gain_obj * obj); + + void track2gain_process(track2gain_obj * obj, const beampatterns_obj * beampatterns_mics, const beampatterns_obj * beampatterns_spatialfilter, const tracks_obj * tracks, gains_obj * gains); + + +#endif diff --git a/include/odas/system/track2steer.h b/include/odas/system/track2steer.h new file mode 100644 index 0000000..65ea5f4 --- /dev/null +++ b/include/odas/system/track2steer.h @@ -0,0 +1,56 @@ +#ifndef __ODAS_SYSTEM_TRACK2STEER +#define __ODAS_SYSTEM_TRACK2STEER + + /** + * \file track2steer.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + #include + + #include + #include + #include + #include + + typedef struct track2steer_obj { + + unsigned int nSeps; + unsigned int nChannels; + unsigned int halfFrameSize; + float c; + unsigned int fS; + float * mics; + + float * factor; + float speed; + + } track2steer_obj; + + track2steer_obj * track2steer_construct_zero(const unsigned int nSeps, const unsigned int nChannels, const unsigned int halfFrameSize, const float c, const unsigned int fS, const float * mics); + + void track2steer_destroy(track2steer_obj * obj); + + void track2steer_process(track2steer_obj * obj, const tracks_obj * tracks, const gains_obj * gains, const masks_obj * masks, steers_obj * steers); + +#endif diff --git a/include/odas/system/xcorr2aimg.h b/include/odas/system/xcorr2aimg.h new file mode 100644 index 0000000..f74c5b8 --- /dev/null +++ b/include/odas/system/xcorr2aimg.h @@ -0,0 +1,47 @@ +#ifndef __ODAS_SYSTEM_XCORR2AIMG +#define __ODAS_SYSTEM_XCORR2AIMG + + /** + * \file xcorr2aimg.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + + #include + #include + #include + #include + #include + + //! Update the states of the particle filter + typedef struct xcorr2aimg_obj { + + unsigned int aimgSize; ///< Number of points scanned. + + } xcorr2aimg_obj; + + xcorr2aimg_obj * xcorr2aimg_construct_zero(const unsigned int aimgSize); + + void xcorr2aimg_destroy(xcorr2aimg_obj * obj); + + void xcorr2aimg_process(xcorr2aimg_obj * obj, const tdoas_obj * tdoas, const indexes_obj * indexes, const spatialindexes_obj * spatialindexes, const unsigned int iCoarse, const xcorrs_obj * xcorrs, aimg_obj * aimg); + +#endif diff --git a/include/odas/system/xcorr2xcorr.h b/include/odas/system/xcorr2xcorr.h new file mode 100644 index 0000000..2d3d3b5 --- /dev/null +++ b/include/odas/system/xcorr2xcorr.h @@ -0,0 +1,48 @@ +#ifndef __ODAS_SYSTEM_XCORR +#define __ODAS_SYSTEM_XCORR + + /** + * \file xcorr2xcorr.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + + #include + #include + #include + #include + + typedef struct xcorr2xcorr_obj { + + unsigned int frameSize; ///< Number of samples per frame. + + } xcorr2xcorr_obj; + + xcorr2xcorr_obj * xcorr2xcorr_construct_zero(const unsigned int frameSize); + + void xcorr2xcorr_destroy(xcorr2xcorr_obj * obj); + + void xcorr2xcorr_process_max(xcorr2xcorr_obj * obj, const xcorrs_obj * xcorrs, const tdoas_obj * tdoas, const deltas_obj * deltas, const pairs_obj * pairs, xcorrs_obj * xcorrsMax); + + void xcorr2xcorr_process_reset(xcorr2xcorr_obj * obj, const tdoas_obj * tdoas, const deltas_obj * deltas, const pairs_obj * pairs, const unsigned int iPoint, xcorrs_obj * xcorrs); + +#endif diff --git a/include/odas/utils/cmatrix.h b/include/odas/utils/cmatrix.h new file mode 100644 index 0000000..03eab97 --- /dev/null +++ b/include/odas/utils/cmatrix.h @@ -0,0 +1,66 @@ +#ifndef __ODAS_UTILS_CMATRIX +#define __ODAS_UTILS_CMATRIX + + /** + * \file cmatrix.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + #include + + typedef struct cmatrix_obj { + + float * real; + float * imag; + unsigned int nRows; + unsigned int nCols; + + } cmatrix_obj; + + cmatrix_obj * cmatrix_construct_zero(const unsigned int nRows, const unsigned int nCols); + + cmatrix_obj * cmatrix_construct_matrix(const cmatrix_obj * cmatrix); + + void cmatrix_copy_zero(cmatrix_obj * obj); + + void cmatrix_copy_cmatrix(cmatrix_obj * obj, const cmatrix_obj * cmatrix); + + void cmatrix_destroy(cmatrix_obj * obj); + + void cmatrix_transpose(cmatrix_obj * obj, const cmatrix_obj * src); + + void cmatrix_hermitian(cmatrix_obj * obj, const cmatrix_obj * src); + + void cmatrix_add(cmatrix_obj * obj, const cmatrix_obj * src1, const cmatrix_obj * src2); + + void cmatrix_sub(cmatrix_obj * obj, const cmatrix_obj * src1, const cmatrix_obj * src2); + + void cmatrix_mul(cmatrix_obj * obj, const cmatrix_obj * src1, const cmatrix_obj * src2); + + void cmatrix_scale(cmatrix_obj * obj, const cmatrix_obj * src, const float scale); + + void cmatrix_zero(cmatrix_obj * obj); + + void cmatrix_printf(const cmatrix_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/utils/fft.h b/include/odas/utils/fft.h new file mode 100644 index 0000000..883beef --- /dev/null +++ b/include/odas/utils/fft.h @@ -0,0 +1,66 @@ +#ifndef __ODAS_UTILS_FFT +#define __ODAS_UTILS_FFT + + /** + * \file cmatrix.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + + //! FFT object. + typedef struct fft_obj { + + unsigned int frameSize; ///< Frame size (in samples). + unsigned int halfFrameSize; ///< Half frame size (frame size divided by 2 plus 1). + fftwf_plan R2C; ///< FFTW plan for FFT from real to complex. + fftwf_plan C2R; ///< FFTW plan for FFT from complex to real. + float * realArray; ///< Array that holds all real values. + fftwf_complex * complexArray; ///< Array that holds all complex values. + + } fft_obj; + + /** Constructor. Initialize all fields to perform FFT. + \param size FFT size (in samples). + \return Pointer to the instantiated object. + */ + fft_obj * fft_construct(const unsigned int size); + + /** Destructor. Free memory. + \param obj Object to be destroyed. + */ + void fft_destroy(fft_obj * obj); + + /** Perform Fast Fourier Transform (real vector as input, complex vector as output). + \param obj Object used. + \param in Pointer to the real array used for input. + \param out Pointer to the complex array used for output. + */ + void fft_r2c(fft_obj * obj, const float * in, float * out); + + /** Perform Inverse Fast Fourier Transform (complex vector as input, real vector as output). + \param obj Object used. + \param in Pointer to the complex array used for input. + \param out Pointer to the real array used for output. + */ + void fft_c2r(fft_obj * obj, const float * in, float * out); + +#endif \ No newline at end of file diff --git a/include/odas/utils/fifo.h b/include/odas/utils/fifo.h new file mode 100644 index 0000000..8a626a3 --- /dev/null +++ b/include/odas/utils/fifo.h @@ -0,0 +1,56 @@ +#ifndef __ODAS_UTILS_FIFO +#define __ODAS_UTILS_FIFO + + /** + * \file fifo.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + #include + #include + + typedef struct fifo_obj { + + void ** array; + unsigned int nElements; + unsigned int nMaxElements; + + pthread_mutex_t use; + sem_t push; + sem_t pop; + + } fifo_obj; + + fifo_obj * fifo_construct_zero(const unsigned int nMaxElements); + + void fifo_destroy(fifo_obj * obj); + + void fifo_push(fifo_obj * obj, void * element); + + void * fifo_pop(fifo_obj * obj); + + int fifo_nElements(fifo_obj * obj); + + void fifo_printf(const fifo_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/utils/gaussian.h b/include/odas/utils/gaussian.h new file mode 100644 index 0000000..3713dfa --- /dev/null +++ b/include/odas/utils/gaussian.h @@ -0,0 +1,297 @@ +#ifndef __ODAS_UTILS_GAUSSIAN +#define __ODAS_UTILS_GAUSSIAN + + /** + * \file gaussian.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + //! 1-D gaussian + typedef struct gaussian_1d_obj { + + float weight; ///< Weight of the gaussian. + float mu_x; ///< Mean of the gaussian. + float sigma_x; ///< Standard deviation of the gaussian. + float scaleFactor; ///< Precomputed scale factor for the exponential function. + + } gaussian_1d_obj; + + //! 2-D gaussian + typedef struct gaussian_2d_obj { + + float weight; ///< Weight of the gaussian. + float mu_x; ///< X-component of the mean of the gaussian. + float mu_y; ///< Y-component of the mean of the gaussian. + float sigma_x; ///< X-component of the standard deviation of the gaussian. + float sigma_y; ///< Y-component of the standard deviation of the gaussian. + float scaleFactor; ///< Precomputed scale factor for the exponential function. + + } gaussian_2d_obj; + + //! 3-D gaussian + typedef struct gaussian_3d_obj { + + float weight; ///< Weight of the gaussian. + float mu_x; ///< X-component of the mean of the gaussian. + float mu_y; ///< Y-component of the mean of the gaussian. + float mu_z; ///< Z-component of the mean of the gaussian. + float sigma_x; ///< X-component of the standard deviation of the gaussian. + float sigma_y; ///< Y-component of the standard deviation of the gaussian. + float sigma_z; ///< Z-component of the standard deviation of the gaussian. + float scaleFactor; ///< Precomputed scale factor for the exponential function. + + } gaussian_3d_obj; + + //! 1-D gaussian mixture model + typedef struct gaussians_1d_obj { + + unsigned int nSignals; ///< Number of gaussians. + gaussian_1d_obj ** array; ///< List of gaussians. + + } gaussians_1d_obj; + + //! 2-D gaussian mixture model + typedef struct gaussians_2d_obj { + + unsigned int nSignals; ///< Number of gaussians. + gaussian_2d_obj ** array; ///< List of gaussians. + + } gaussians_2d_obj; + + //! 3-D gaussian mixture model + typedef struct gaussians_3d_obj { + + unsigned int nSignals; ///< Number of gaussians. + gaussian_3d_obj ** array; ///< List of gaussians. + + } gaussians_3d_obj; + + /** Constructor. Initialize all fields to zero (weight to 1, mean to 0, standard deviation to 1). + \return Pointer to the instantiated object. + */ + gaussian_1d_obj * gaussian_1d_construct_zero(void); + + /** Constructor. Initialize all fields to zero (weight to 1, means to 0, standard deviations to 1). + \return Pointer to the instantiated object. + */ + gaussian_2d_obj * gaussian_2d_construct_zero(void); + + /** Constructor. Initialize all fields to zero (weight to 1, means to 0, standard deviations to 1). + \return Pointer to the instantiated object. + */ + gaussian_3d_obj * gaussian_3d_construct_zero(void); + + /** Constructor. Initialize all fields to weight, mu and sigma. + \param weight Weight value. + \param mu_x Mean value. + \param sigma_x Standard deviation value. + \return Pointer to the instantiated object. + */ + gaussian_1d_obj * gaussian_1d_construct_weightmusigma(const float weight, const float mu_x, const float sigma_x); + + /** Constructor. Initialize all fields to weight, mus and sigmas. + \param weight Weight value. + \param mu_x X-coordinate of the mean. + \param mu_y Y-coordinate of the mean. + \param sigma_x X-coordinate of the standard deviation. + \param sigma_y Y-coordinate of the standard deviation. + \return Pointer to the instantiated object. + */ + gaussian_2d_obj * gaussian_2d_construct_weightmusigma(const float weight, const float mu_x, const float mu_y, const float sigma_x, const float sigma_y); + + /** Constructor. Initialize all fields to weight, mus and sigmas. + \param weight Weight value. + \param mu_x X-coordinate of the mean. + \param mu_y Y-coordinate of the mean. + \param mu_z Z-coordinate of the mean. + \param sigma_x X-coordinate of the standard deviation. + \param sigma_y Y-coordinate of the standard deviation. + \param sigma_z Z-coordinate of the standard deviation. + \return Pointer to the instantiated object. + */ + gaussian_3d_obj * gaussian_3d_construct_weightmusigma(const float weight, const float mu_x, const float mu_y, const float mu_z, const float sigma_x, const float sigma_y, const float sigma_z); + + /** Constructor. Clone the object. + \param gaussian Object to cloned. + \return Pointer to the instantiated object. + */ + gaussian_1d_obj * gaussian_1d_construct_gaussian(const gaussian_1d_obj * gaussian); + + /** Constructor. Clone the object. + \param gaussian Object to cloned. + \return Pointer to the instantiated object. + */ + gaussian_2d_obj * gaussian_2d_construct_gaussian(const gaussian_2d_obj * gaussian); + + /** Constructor. Clone the object. + \param gaussian Object to cloned. + \return Pointer to the instantiated object. + */ + gaussian_3d_obj * gaussian_3d_construct_gaussian(const gaussian_3d_obj * gaussian); + + /** Destructor. Free memory. + \param obj Object to be destroyed. + */ + void gaussian_1d_destroy(gaussian_1d_obj * obj); + + /** Destructor. Free memory. + \param obj Object to be destroyed. + */ + void gaussian_2d_destroy(gaussian_2d_obj * obj); + + /** Destructor. Free memory. + \param obj Object to be destroyed. + */ + void gaussian_3d_destroy(gaussian_3d_obj * obj); + + /** Evaluate the gaussian at x. + \param obj Object to be used. + \param x Value of x. + \return Value of the gaussian. + */ + float gaussian_1d_eval(const gaussian_1d_obj * obj, const float x); + + /** Evaluate the gaussian at x and y. + \param obj Object to be used. + \param x Value of x. + \param y Value of y. + \return Value of the gaussian. + */ + float gaussian_2d_eval(const gaussian_2d_obj * obj, const float x, const float y); + + /** Evaluate the gaussian at x, y and z. + \param obj Object to be used. + \param x Value of x. + \param y Value of y. + \param z Value of z. + \return Value of the gaussian. + */ + float gaussian_3d_eval(const gaussian_3d_obj * obj, const float x, const float y, const float z); + + /** Print the content of the gaussian. + \param obj Object to be used. + */ + void gaussian_1d_printf(const gaussian_1d_obj * obj); + + /** Print the content of the gaussian. + \param obj Object to be used. + */ + void gaussian_2d_printf(const gaussian_2d_obj * obj); + + /** Print the content of the gaussian. + \param obj Object to be used. + */ + void gaussian_3d_printf(const gaussian_3d_obj * obj); + + /** Constructor. Fill the array of objects with null pointers. + \param nSignals Number of gaussians. + \return Pointer to the instantiated object. + */ + gaussians_1d_obj * gaussians_1d_construct_null(const unsigned int nSignals); + + /** Constructor. Fill the array of objects with null pointers. + \param nSignals Number of gaussians. + \return Pointer to the instantiated object. + */ + gaussians_2d_obj * gaussians_2d_construct_null(const unsigned int nSignals); + + /** Constructor. Fill the array of objects with null pointers. + \param nSignals Number of gaussians. + \return Pointer to the instantiated object. + */ + gaussians_3d_obj * gaussians_3d_construct_null(const unsigned int nSignals); + + /** Constructor. Clone the gaussians. + \param gaussians Object to be cloned. + \return Pointer to the instantiated object. + */ + gaussians_1d_obj * gaussians_1d_construct_gaussians(const gaussians_1d_obj * gaussians); + + /** Constructor. Clone the gaussians. + \param gaussians Object to be cloned. + \return Pointer to the instantiated object. + */ + gaussians_2d_obj * gaussians_2d_construct_gaussians(const gaussians_2d_obj * gaussians); + + /** Constructor. Clone the gaussians. + \param gaussians Object to be cloned. + \return Pointer to the instantiated object. + */ + gaussians_3d_obj * gaussians_3d_construct_gaussians(const gaussians_3d_obj * gaussians); + + /** Destructor. Free memory. + \param obj Object to be destroyed. + */ + void gaussians_1d_destroy(gaussians_1d_obj * obj); + + /** Destructor. Free memory. + \param obj Object to be destroyed. + */ + void gaussians_2d_destroy(gaussians_2d_obj * obj); + + /** Destructor. Free memory. + \param obj Object to be destroyed. + */ + void gaussians_3d_destroy(gaussians_3d_obj * obj); + + /** Evaluate the gaussian mixture model (GMM) at x. + \param obj Object to be used. + \param x Value of x. + \return Value of the GMM. + */ + float gaussians_1d_eval(const gaussians_1d_obj * obj, const float x); + + /** Evaluate the gaussian mixture model (GMM) at x and y. + \param obj Object to be used. + \param x Value of x. + \param y Value of y. + \return Value of the GMM. + */ + float gaussians_2d_eval(const gaussians_2d_obj * obj, const float x, const float y); + + /** Evaluate the gaussian mixture model (GMM) at x, y and z. + \param obj Object to be used. + \param x Value of x. + \param y Value of y. + \param z Value of z. + \return Value of the GMM. + */ + float gaussians_3d_eval(const gaussians_3d_obj * obj, const float x, const float y, const float z); + + /** Print the content of the gaussian mixture model (GMM). + \param obj Object to be used. + */ + void gaussians_1d_printf(const gaussians_1d_obj * obj); + + /** Print the content of the gaussian mixture model (GMM). + \param obj Object to be used. + */ + void gaussians_2d_printf(const gaussians_2d_obj * obj); + + /** Print the content of the gaussian mixture model (GMM). + \param obj Object to be used. + */ + void gaussians_3d_printf(const gaussians_3d_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/utils/gaussjordan.h b/include/odas/utils/gaussjordan.h new file mode 100644 index 0000000..3e3668f --- /dev/null +++ b/include/odas/utils/gaussjordan.h @@ -0,0 +1,44 @@ +#ifndef __ODAS_UTILS_GAUSSJORDAN +#define __ODAS_UTILS_GAUSSJORDAN + + /** + * \file gaussjordan.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + + typedef struct gaussjordan_obj { + + unsigned int nRowsCols; + float * array; + float epsilon; + + } gaussjordan_obj; + + gaussjordan_obj * gaussjordan_construct_zero(const unsigned int nRowsCols, const float epsilon); + + void gaussjordan_destroy(gaussjordan_obj * obj); + + void gaussjordan_process(gaussjordan_obj * obj, const float * src, float * dest); + +#endif \ No newline at end of file diff --git a/include/odas/utils/inverse.h b/include/odas/utils/inverse.h new file mode 100644 index 0000000..7285721 --- /dev/null +++ b/include/odas/utils/inverse.h @@ -0,0 +1,78 @@ +#ifndef __ODAS_UTILS_INVERSE +#define __ODAS_UTILS_INVERSE + + /** + * \file inverse.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include "gaussjordan.h" + #include "matrix.h" + #include "cmatrix.h" + + typedef struct inverse_real_obj { + + unsigned int nRowsCols; + + gaussjordan_obj * gaussjordan; + + } inverse_real_obj; + + typedef struct inverse_complex_obj { + + unsigned int nRowsCols; + + gaussjordan_obj * gaussjordan; + + matrix_obj * A; + matrix_obj * B; + + matrix_obj * Ainv; + matrix_obj * Binv; + + matrix_obj * BAinv; + matrix_obj * ABinv; + + matrix_obj * BAinvB; + matrix_obj * ABinvA; + + matrix_obj * ApBAinvB; + matrix_obj * BpABinvA; + + matrix_obj * ApBAinvB_inv; + matrix_obj * BpABinvA_inv; + + matrix_obj * mBpABinvA_inv; + + } inverse_complex_obj; + + inverse_real_obj * inverse_real_construct_zero(const unsigned int nRowsCols, const float epsilon); + + void inverse_real_destroy(inverse_real_obj * obj); + + void inverse_real_process(inverse_real_obj * obj, const matrix_obj * src, matrix_obj * dest); + + inverse_complex_obj * inverse_complex_construct_zero(const unsigned int nRowsCols, const float epsilon); + + void inverse_complex_destroy(inverse_complex_obj * obj); + + void inverse_complex_process(inverse_complex_obj * obj, const cmatrix_obj * src, cmatrix_obj * dest); + +#endif \ No newline at end of file diff --git a/include/odas/utils/matrix.h b/include/odas/utils/matrix.h new file mode 100644 index 0000000..62833b9 --- /dev/null +++ b/include/odas/utils/matrix.h @@ -0,0 +1,120 @@ +#ifndef __ODAS_UTILS_MATRIX +#define __ODAS_UTILS_MATRIX + + /** + * \file matrix.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + #include + + //! Matrix + typedef struct matrix_obj { + + float * array; ///< Array of elements in the matrix. + unsigned int nRows; ///< Number of rows. + unsigned int nCols; ///< Number of columns. + + } matrix_obj; + + /** Constructor. Initialize all elements to zero in a matrix nRows x nCols. + \param nRows Number of rows. + \param nCols Number of columns. + \return Pointer to the instantiated object. + */ + matrix_obj * matrix_construct_zero(const unsigned int nRows, const unsigned int nCols); + + /** Constructor. Clone the object. + \param matrix Object to be cloned. + \return Pointer to the instantiated object. + */ + matrix_obj * matrix_construct_matrix(const matrix_obj * matrix); + + /** Set elements to 0. + \param obj Object to be used. + */ + void matrix_copy_zero(matrix_obj * obj); + + /** Set fields to the field values of the model object. No memory allocated. + \param matrix Object to be copied. + \param obj Object to be modified. + */ + void matrix_copy_matrix(matrix_obj * obj, const matrix_obj * matrix); + + /** Destructor. Free memory. + \param obj Object to be destroyed. + */ + void matrix_destroy(matrix_obj * obj); + + /** Compute the matrix transpose. + \param src Matrix to be transpose. + \param obj Transposed matrix. + */ + void matrix_transpose(matrix_obj * obj, const matrix_obj * src); + + /** Add two matrices. + \param src1 First matrix to be added. + \param src2 Second matrix to be added. + \param obj Result of the addition. + */ + void matrix_add(matrix_obj * obj, const matrix_obj * src1, const matrix_obj * src2); + + /** Subtract two matrices. + \param src1 Matrix to be subtracted from. + \param src2 Matrix to subtract. + \param obj Result of the subtraction. + */ + void matrix_sub(matrix_obj * obj, const matrix_obj * src1, const matrix_obj * src2); + + /** Multiply two matrices. + \param src1 First matrix to be multiplied. + \param src2 Second matrix to be multiplied. + \param obj Result of the multiplication. + */ + void matrix_mul(matrix_obj * obj, const matrix_obj * src1, const matrix_obj * src2); + + /** Inverse a matrix. + \param src Matrix to be inverted. + \param obj Inverted matrix. + */ + void matrix_inv(matrix_obj * obj, const matrix_obj * src); + + /** Compute the determinant. + \param obj Matrix which determinant is computed. + \return Determinant value. + */ + float matrix_det(const matrix_obj * obj); + + /** Multiply a matrix by a scalar. + \param src Matrix to be scaled. + \param scale Scaling factor. + \param obj Scaled matrix. + */ + void matrix_scale(matrix_obj * obj, const matrix_obj * src, const float scale); + + /** Print the content of the matrix. + \param obj Object to be used. + */ + void matrix_printf(const matrix_obj * obj); + +#endif \ No newline at end of file diff --git a/include/odas/utils/pcm.h b/include/odas/utils/pcm.h new file mode 100644 index 0000000..33a01f9 --- /dev/null +++ b/include/odas/utils/pcm.h @@ -0,0 +1,35 @@ +#ifndef __ODAS_UTILS_PCM +#define __ODAS_UTILS_PCM + + /** + * \file pcm.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + + float pcm_signedXXbits2normalized(const char * bytes, const unsigned int nBytes); + + void pcm_signedXXbits2json(const char * bytes, const unsigned int nBytes, char * json); + + void pcm_normalized2signedXXbits(const float sample, const unsigned int nBytes, char * bytes); + +#endif \ No newline at end of file diff --git a/include/odas/utils/random.h b/include/odas/utils/random.h new file mode 100644 index 0000000..76f0a5a --- /dev/null +++ b/include/odas/utils/random.h @@ -0,0 +1,118 @@ +#ifndef __ODAS_UTILS_RANDOM +#define __ODAS_UTILS_RANDOM + + /** + * \file random.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + #include + + //! Random number generator + typedef struct random_obj { + + unsigned int N; ///< Number of elements in the space + unsigned int I; ///< Number of iterations to perform a binary search + float * pdf; ///< Probability density function (probability mass function) + float * cdf; ///< Cumulative density function + + } random_obj; + + //! Standard normal number generator + typedef struct normal_obj { + + double epsilon; ///< Small value to perform the Box-Muller transform. + + } normal_obj; + + //! Standard normal number generator offline + typedef struct normaloff_obj { + + unsigned int N; ///< Number of samples. + float * values; ///< Normally distributed samples. + + } normaloff_obj; + + /** Constructor. Initialize all elements to zero. + \param N Number of elements in the space. + \return Pointer to the instantiated object. + */ + random_obj * random_construct_zero(const unsigned int N); + + /** Destructor. Free memory. + \param obj Object to be destroyed. + */ + void random_destroy(random_obj * obj); + + /** Set the PDF. + \param pdf Array that contains the PDF values. + \param obj Object to be modified. + */ + void random_pdf(random_obj * obj, const float * pdf); + + /** Pick element randomly according to the PDF, and return the index. + \param nSamples Number of elements to pick. + \param indexes Array that contains the returned indexes. + \param obj Object to be used. + */ + void random_generate(const random_obj * obj, const unsigned int nSamples, unsigned int * indexes); + + /** Constructor. + \param epsilon Small value to perform the Box-Muller transform. + \return Pointer of the instantiated object. + */ + normal_obj * normal_construct_zero(const double epsilon); + + /** Destructor. Free memory. + \param obj Object to be destroyed. + */ + void normal_destroy(normal_obj * obj); + + /** Generate a random number according to a standard normal distribution. + \param nSamples Number of random numbers to generate. + \param values Array that contains the generated random numbers. + \param obj Object to be used. + */ + void normal_generate(const normal_obj * obj, const unsigned int nSamples, float * values); + + /** Constructor. + \param epsilon Small value to perform the Box-Muller transform. + \param N Number of random numbers generated offline and stored. + \return Pointer of the instantiated object. + */ + normaloff_obj * normaloff_construct_rnd(const double epsilon, const unsigned int N); + + /** Destructor. Free memory. + \param obj Object to be destroyed. + */ + void normaloff_destroy(normaloff_obj * obj); + + /** Generate a random number according to a standard normal distribution. + \param nSamples Number of random numbers to generate. + \param values Array that contains the generated random numbers. + \param obj Object to be used. + */ + void normaloff_generate(const normaloff_obj * obj, const unsigned int nSamples, float * values); + + +#endif \ No newline at end of file diff --git a/include/odas/utils/transcendental.h b/include/odas/utils/transcendental.h new file mode 100644 index 0000000..ca32709 --- /dev/null +++ b/include/odas/utils/transcendental.h @@ -0,0 +1,48 @@ +#ifndef __ODAS_UTILS_TRANSCENDENTAL +#define __ODAS_UTILS_TRANSCENDENTAL + + /** + * \file transcendental.h + * \author François Grondin + * \version 2.0 + * \date 2018-03-18 + * \copyright + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + #include + #include + #include + #include + + typedef struct transcendental_obj { + + float maxValue; + float minValue; + float interval; + + float * array; + unsigned int nElements; + + } transcendental_obj; + + transcendental_obj * transcendental_construct_zero(const float minValue, const float maxValue, const unsigned int nElements); + + void transcendental_destroy(transcendental_obj * obj); + + float transcendental_process(const transcendental_obj * obj, const float value); + +#endif \ No newline at end of file diff --git a/src/aconnector/acon_categories.c b/src/aconnector/acon_categories.c index e24ac3c..e66f516 100644 --- a/src/aconnector/acon_categories.c +++ b/src/aconnector/acon_categories.c @@ -21,7 +21,7 @@ * */ - #include "acon_categories.h" + #include acon_categories_obj * acon_categories_construct(const unsigned int nOuts, const unsigned int nMessages, const msg_categories_cfg * msg_categories_config) { @@ -104,4 +104,4 @@ } - } \ No newline at end of file + } diff --git a/src/aconnector/acon_categories.h b/src/aconnector/acon_categories.h deleted file mode 100644 index 7815c01..0000000 --- a/src/aconnector/acon_categories.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef __ODAS_ACONNECTOR_CATEGORIES -#define __ODAS_ACONNECTOR_CATEGORIES - - /** - * \file acon_categories.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../connector/con_categories.h" - #include "../amessage/amsg_categories.h" - #include "../message/msg_categories.h" - #include "../general/thread.h" - - #include - #include - - typedef struct acon_categories_obj { - - amsg_categories_obj * in; - amsg_categories_obj ** outs; - con_categories_obj * con_categories; - thread_obj * thread; - - } acon_categories_obj; - - acon_categories_obj * acon_categories_construct(const unsigned int nOuts, const unsigned int nMessages, const msg_categories_cfg * msg_categories_config); - - void acon_categories_destroy(acon_categories_obj * obj); - - void * acon_categories_thread(void * ptr); - -#endif \ No newline at end of file diff --git a/src/aconnector/acon_hops.c b/src/aconnector/acon_hops.c index 564ec2e..d20654c 100644 --- a/src/aconnector/acon_hops.c +++ b/src/aconnector/acon_hops.c @@ -21,7 +21,7 @@ * */ - #include "acon_hops.h" + #include acon_hops_obj * acon_hops_construct(const unsigned int nOuts, const unsigned int nMessages, const msg_hops_cfg * msg_hops_config) { @@ -104,4 +104,4 @@ } - } \ No newline at end of file + } diff --git a/src/aconnector/acon_hops.h b/src/aconnector/acon_hops.h deleted file mode 100644 index 07fef53..0000000 --- a/src/aconnector/acon_hops.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef __ODAS_ACONNECTOR_HOPS -#define __ODAS_ACONNECTOR_HOPS - - /** - * \file acon_hops.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../connector/con_hops.h" - #include "../amessage/amsg_hops.h" - #include "../message/msg_hops.h" - #include "../general/thread.h" - - #include - #include - - typedef struct acon_hops_obj { - - amsg_hops_obj * in; - amsg_hops_obj ** outs; - con_hops_obj * con_hops; - thread_obj * thread; - - } acon_hops_obj; - - acon_hops_obj * acon_hops_construct(const unsigned int nOuts, const unsigned int nMessages, const msg_hops_cfg * msg_hops_config); - - void acon_hops_destroy(acon_hops_obj * obj); - - void * acon_hops_thread(void * ptr); - -#endif \ No newline at end of file diff --git a/src/aconnector/acon_pots.c b/src/aconnector/acon_pots.c index 85bd1f1..e4b7baf 100644 --- a/src/aconnector/acon_pots.c +++ b/src/aconnector/acon_pots.c @@ -21,7 +21,7 @@ * */ - #include "acon_pots.h" + #include acon_pots_obj * acon_pots_construct(const unsigned int nOuts, const unsigned int nMessages, const msg_pots_cfg * msg_pots_config) { @@ -104,4 +104,4 @@ } - } \ No newline at end of file + } diff --git a/src/aconnector/acon_pots.h b/src/aconnector/acon_pots.h deleted file mode 100644 index 28e2c96..0000000 --- a/src/aconnector/acon_pots.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef __ODAS_ACONNECTOR_POTS -#define __ODAS_ACONNECTOR_POTS - - /** - * \file acon_pots.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../connector/con_pots.h" - #include "../amessage/amsg_pots.h" - #include "../message/msg_pots.h" - #include "../general/thread.h" - - #include - #include - - typedef struct acon_pots_obj { - - amsg_pots_obj * in; - amsg_pots_obj ** outs; - con_pots_obj * con_pots; - thread_obj * thread; - - } acon_pots_obj; - - acon_pots_obj * acon_pots_construct(const unsigned int nOuts, const unsigned int nMessages, const msg_pots_cfg * msg_pots_config); - - void acon_pots_destroy(acon_pots_obj * obj); - - void * acon_pots_thread(void * ptr); - -#endif \ No newline at end of file diff --git a/src/aconnector/acon_powers.c b/src/aconnector/acon_powers.c index 2649941..0098d72 100644 --- a/src/aconnector/acon_powers.c +++ b/src/aconnector/acon_powers.c @@ -21,7 +21,7 @@ * */ - #include "acon_powers.h" + #include acon_powers_obj * acon_powers_construct(const unsigned int nOuts, const unsigned int nMessages, const msg_powers_cfg * msg_powers_config) { @@ -104,4 +104,4 @@ } - } \ No newline at end of file + } diff --git a/src/aconnector/acon_powers.h b/src/aconnector/acon_powers.h deleted file mode 100644 index 5254bae..0000000 --- a/src/aconnector/acon_powers.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef __ODAS_ACONNECTOR_POWERS -#define __ODAS_ACONNECTOR_POWERS - - /** - * \file acon_powers.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../connector/con_powers.h" - #include "../amessage/amsg_powers.h" - #include "../message/msg_powers.h" - #include "../general/thread.h" - - #include - #include - - typedef struct acon_powers_obj { - - amsg_powers_obj * in; - amsg_powers_obj ** outs; - con_powers_obj * con_powers; - thread_obj * thread; - - } acon_powers_obj; - - acon_powers_obj * acon_powers_construct(const unsigned int nOuts, const unsigned int nMessages, const msg_powers_cfg * msg_powers_config); - - void acon_powers_destroy(acon_powers_obj * obj); - - void * acon_powers_thread(void * ptr); - -#endif \ No newline at end of file diff --git a/src/aconnector/acon_spectra.c b/src/aconnector/acon_spectra.c index 19e7836..3215af6 100644 --- a/src/aconnector/acon_spectra.c +++ b/src/aconnector/acon_spectra.c @@ -21,7 +21,7 @@ * */ - #include "acon_spectra.h" + #include acon_spectra_obj * acon_spectra_construct(const unsigned int nOuts, const unsigned int nMessages, const msg_spectra_cfg * msg_spectra_config) { @@ -104,4 +104,4 @@ } - } \ No newline at end of file + } diff --git a/src/aconnector/acon_spectra.h b/src/aconnector/acon_spectra.h deleted file mode 100644 index 0a423e3..0000000 --- a/src/aconnector/acon_spectra.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef __ODAS_ACONNECTOR_SPECTRA -#define __ODAS_ACONNECTOR_SPECTRA - - /** - * \file acon_spectra.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../connector/con_spectra.h" - #include "../amessage/amsg_spectra.h" - #include "../message/msg_spectra.h" - #include "../general/thread.h" - - #include - #include - - typedef struct acon_spectra_obj { - - amsg_spectra_obj * in; - amsg_spectra_obj ** outs; - con_spectra_obj * con_spectra; - thread_obj * thread; - - } acon_spectra_obj; - - acon_spectra_obj * acon_spectra_construct(const unsigned int nOuts, const unsigned int nMessages, const msg_spectra_cfg * msg_spectra_config); - - void acon_spectra_destroy(acon_spectra_obj * obj); - - void * acon_spectra_thread(void * ptr); - -#endif \ No newline at end of file diff --git a/src/aconnector/acon_targets.c b/src/aconnector/acon_targets.c index 0febfdf..15a4e2c 100644 --- a/src/aconnector/acon_targets.c +++ b/src/aconnector/acon_targets.c @@ -21,7 +21,7 @@ * */ - #include "acon_targets.h" + #include acon_targets_obj * acon_targets_construct(const unsigned int nOuts, const unsigned int nMessages, const msg_targets_cfg * msg_targets_config) { @@ -103,4 +103,4 @@ } - } \ No newline at end of file + } diff --git a/src/aconnector/acon_targets.h b/src/aconnector/acon_targets.h deleted file mode 100644 index bef3ef9..0000000 --- a/src/aconnector/acon_targets.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef __ODAS_ACONNECTOR_TARGETS -#define __ODAS_ACONNECTOR_TARGETS - - /** - * \file acon_targets.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../connector/con_targets.h" - #include "../amessage/amsg_targets.h" - #include "../message/msg_targets.h" - #include "../general/thread.h" - - #include - #include - - typedef struct acon_targets_obj { - - amsg_targets_obj * in; - amsg_targets_obj ** outs; - con_targets_obj * con_targets; - thread_obj * thread; - - } acon_targets_obj; - - acon_targets_obj * acon_targets_construct(const unsigned int nOuts, const unsigned int nMessages, const msg_targets_cfg * msg_targets_config); - - void acon_targets_destroy(acon_targets_obj * obj); - - void * acon_targets_thread(void * ptr); - -#endif \ No newline at end of file diff --git a/src/aconnector/acon_tracks.c b/src/aconnector/acon_tracks.c index 5e70a33..bfdfcde 100644 --- a/src/aconnector/acon_tracks.c +++ b/src/aconnector/acon_tracks.c @@ -21,7 +21,7 @@ * */ - #include "acon_tracks.h" + #include acon_tracks_obj * acon_tracks_construct(const unsigned int nOuts, const unsigned int nMessages, const msg_tracks_cfg * msg_tracks_config) { @@ -103,4 +103,4 @@ } - } \ No newline at end of file + } diff --git a/src/aconnector/acon_tracks.h b/src/aconnector/acon_tracks.h deleted file mode 100644 index 1427e02..0000000 --- a/src/aconnector/acon_tracks.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef __ODAS_ACONNECTOR_TRACKS -#define __ODAS_ACONNECTOR_TRACKS - - /** - * \file acon_tracks.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../connector/con_tracks.h" - #include "../amessage/amsg_tracks.h" - #include "../message/msg_tracks.h" - #include "../general/thread.h" - - #include - #include - - typedef struct acon_tracks_obj { - - amsg_tracks_obj * in; - amsg_tracks_obj ** outs; - con_tracks_obj * con_tracks; - thread_obj * thread; - - } acon_tracks_obj; - - acon_tracks_obj * acon_tracks_construct(const unsigned int nOuts, const unsigned int nMessages, const msg_tracks_cfg * msg_tracks_config); - - void acon_tracks_destroy(acon_tracks_obj * obj); - - void * acon_tracks_thread(void * ptr); - -#endif \ No newline at end of file diff --git a/src/ainjector/ainj_targets.c b/src/ainjector/ainj_targets.c index 7163bf3..7d596ad 100644 --- a/src/ainjector/ainj_targets.c +++ b/src/ainjector/ainj_targets.c @@ -21,7 +21,7 @@ * */ - #include "ainj_targets.h" + #include ainj_targets_obj * ainj_targets_construct(const inj_targets_cfg * inj_targets_config, const msg_hops_cfg * msg_hops_config, const msg_targets_cfg * msg_targets_config) { @@ -91,4 +91,4 @@ } - } \ No newline at end of file + } diff --git a/src/ainjector/ainj_targets.h b/src/ainjector/ainj_targets.h deleted file mode 100644 index e3a2862..0000000 --- a/src/ainjector/ainj_targets.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef __ODAS_AINJECTOR_TARGETS -#define __ODAS_AINJECTOR_TARGETS - - /** - * \file ainj_targets.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../injector/inj_targets.h" - #include "../amessage/amsg_hops.h" - #include "../amessage/amsg_targets.h" - #include "../general/thread.h" - - typedef struct ainj_targets_obj { - - inj_targets_obj * inj_targets; - amsg_hops_obj * in; - amsg_targets_obj * out; - thread_obj * thread; - - } ainj_targets_obj; - - ainj_targets_obj * ainj_targets_construct(const inj_targets_cfg * inj_targets_config, const msg_hops_cfg * msg_hops_config, const msg_targets_cfg * msg_targets_config); - - void ainj_targets_destroy(ainj_targets_obj * obj); - - void ainj_targets_connect(ainj_targets_obj * obj, amsg_hops_obj * in, amsg_targets_obj * out); - - void ainj_targets_disconnect(ainj_targets_obj * obj); - - void * ainj_targets_thread(void * ptr); - -#endif \ No newline at end of file diff --git a/src/amessage/amsg_categories.c b/src/amessage/amsg_categories.c index cf0f431..2e15aa1 100644 --- a/src/amessage/amsg_categories.c +++ b/src/amessage/amsg_categories.c @@ -21,7 +21,7 @@ * */ - #include "amsg_categories.h" + #include amsg_categories_obj * amsg_categories_construct(const unsigned int nMessages, const msg_categories_cfg * msg_categories_config) { diff --git a/src/amessage/amsg_categories.h b/src/amessage/amsg_categories.h deleted file mode 100644 index ab52673..0000000 --- a/src/amessage/amsg_categories.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef __ODAS_AMESSAGE_CATEGORIES -#define __ODAS_AMESSAGE_CATEGORIES - - /** - * \file amsg_categories.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - - #include "../message/msg_categories.h" - #include "../utils/fifo.h" - - typedef struct amsg_categories_obj { - - unsigned int nMessages; - fifo_obj * filled; - fifo_obj * empty; - - } amsg_categories_obj; - - amsg_categories_obj * amsg_categories_construct(const unsigned int nMessages, const msg_categories_cfg * msg_categories_config); - - void amsg_categories_destroy(amsg_categories_obj * obj); - - msg_categories_obj * amsg_categories_filled_pop(amsg_categories_obj * obj); - - void amsg_categories_filled_push(amsg_categories_obj * obj, msg_categories_obj * msg_categories); - - msg_categories_obj * amsg_categories_empty_pop(amsg_categories_obj * obj); - - void amsg_categories_empty_push(amsg_categories_obj * obj, msg_categories_obj * msg_categories); - -#endif \ No newline at end of file diff --git a/src/amessage/amsg_hops.c b/src/amessage/amsg_hops.c index bde2be0..f636e6f 100644 --- a/src/amessage/amsg_hops.c +++ b/src/amessage/amsg_hops.c @@ -21,7 +21,7 @@ * */ - #include "amsg_hops.h" + #include amsg_hops_obj * amsg_hops_construct(const unsigned int nMessages, const msg_hops_cfg * msg_hops_config) { @@ -83,4 +83,4 @@ fifo_push(obj->empty, (void *) msg_hops); - } \ No newline at end of file + } diff --git a/src/amessage/amsg_hops.h b/src/amessage/amsg_hops.h deleted file mode 100644 index fc69bc7..0000000 --- a/src/amessage/amsg_hops.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef __ODAS_AMESSAGE_HOPS -#define __ODAS_AMESSAGE_HOPS - - /** - * \file amsg_hops.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - - #include "../message/msg_hops.h" - #include "../utils/fifo.h" - - typedef struct amsg_hops_obj { - - unsigned int nMessages; - fifo_obj * filled; - fifo_obj * empty; - - } amsg_hops_obj; - - amsg_hops_obj * amsg_hops_construct(const unsigned int nMessages, const msg_hops_cfg * msg_hops_config); - - void amsg_hops_destroy(amsg_hops_obj * obj); - - msg_hops_obj * amsg_hops_filled_pop(amsg_hops_obj * obj); - - void amsg_hops_filled_push(amsg_hops_obj * obj, msg_hops_obj * msg_hops); - - msg_hops_obj * amsg_hops_empty_pop(amsg_hops_obj * obj); - - void amsg_hops_empty_push(amsg_hops_obj * obj, msg_hops_obj * msg_hops); - -#endif \ No newline at end of file diff --git a/src/amessage/amsg_pots.c b/src/amessage/amsg_pots.c index a31537d..1800a13 100644 --- a/src/amessage/amsg_pots.c +++ b/src/amessage/amsg_pots.c @@ -21,7 +21,7 @@ * */ - #include "amsg_pots.h" + #include amsg_pots_obj * amsg_pots_construct(const unsigned int nMessages, const msg_pots_cfg * msg_pots_config) { @@ -83,4 +83,4 @@ fifo_push(obj->empty, (void *) msg_pots); - } \ No newline at end of file + } diff --git a/src/amessage/amsg_pots.h b/src/amessage/amsg_pots.h deleted file mode 100644 index 54495c6..0000000 --- a/src/amessage/amsg_pots.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef __ODAS_AMESSAGE_POTS -#define __ODAS_AMESSAGE_POTS - - /** - * \file amsg_pots.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - - #include "../message/msg_pots.h" - #include "../utils/fifo.h" - - typedef struct amsg_pots_obj { - - unsigned int nMessages; - fifo_obj * filled; - fifo_obj * empty; - - } amsg_pots_obj; - - amsg_pots_obj * amsg_pots_construct(const unsigned int nMessages, const msg_pots_cfg * msg_pots_config); - - void amsg_pots_destroy(amsg_pots_obj * obj); - - msg_pots_obj * amsg_pots_filled_pop(amsg_pots_obj * obj); - - void amsg_pots_filled_push(amsg_pots_obj * obj, msg_pots_obj * msg_pots); - - msg_pots_obj * amsg_pots_empty_pop(amsg_pots_obj * obj); - - void amsg_pots_empty_push(amsg_pots_obj * obj, msg_pots_obj * msg_pots); - -#endif \ No newline at end of file diff --git a/src/amessage/amsg_powers.c b/src/amessage/amsg_powers.c index cf59e77..68798fa 100644 --- a/src/amessage/amsg_powers.c +++ b/src/amessage/amsg_powers.c @@ -21,7 +21,7 @@ * */ - #include "amsg_powers.h" + #include amsg_powers_obj * amsg_powers_construct(const unsigned int nMessages, const msg_powers_cfg * msg_powers_config) { @@ -83,4 +83,4 @@ fifo_push(obj->empty, (void *) msg_powers); - } \ No newline at end of file + } diff --git a/src/amessage/amsg_powers.h b/src/amessage/amsg_powers.h deleted file mode 100644 index b143193..0000000 --- a/src/amessage/amsg_powers.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef __ODAS_AMESSAGE_POWERS -#define __ODAS_AMESSAGE_POWERS - - /** - * \file amsg_powers.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - - #include "../message/msg_powers.h" - #include "../utils/fifo.h" - - typedef struct amsg_powers_obj { - - unsigned int nMessages; - fifo_obj * filled; - fifo_obj * empty; - - } amsg_powers_obj; - - amsg_powers_obj * amsg_powers_construct(const unsigned int nMessages, const msg_powers_cfg * msg_powers_config); - - void amsg_powers_destroy(amsg_powers_obj * obj); - - msg_powers_obj * amsg_powers_filled_pop(amsg_powers_obj * obj); - - void amsg_powers_filled_push(amsg_powers_obj * obj, msg_powers_obj * msg_powers); - - msg_powers_obj * amsg_powers_empty_pop(amsg_powers_obj * obj); - - void amsg_powers_empty_push(amsg_powers_obj * obj, msg_powers_obj * msg_powers); - -#endif \ No newline at end of file diff --git a/src/amessage/amsg_spectra.c b/src/amessage/amsg_spectra.c index 3cb024f..20c93d4 100644 --- a/src/amessage/amsg_spectra.c +++ b/src/amessage/amsg_spectra.c @@ -21,7 +21,7 @@ * */ - #include "amsg_spectra.h" + #include amsg_spectra_obj * amsg_spectra_construct(const unsigned int nMessages, const msg_spectra_cfg * msg_spectra_config) { @@ -83,4 +83,4 @@ fifo_push(obj->empty, (void *) msg_spectra); - } \ No newline at end of file + } diff --git a/src/amessage/amsg_spectra.h b/src/amessage/amsg_spectra.h deleted file mode 100644 index d7a0eec..0000000 --- a/src/amessage/amsg_spectra.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef __ODAS_AMESSAGE_SPECTRA -#define __ODAS_AMESSAGE_SPECTRA - - /** - * \file amsg_spectra.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - - #include "../message/msg_spectra.h" - #include "../utils/fifo.h" - - typedef struct amsg_spectra_obj { - - unsigned int nMessages; - fifo_obj * filled; - fifo_obj * empty; - - } amsg_spectra_obj; - - amsg_spectra_obj * amsg_spectra_construct(const unsigned int nMessages, const msg_spectra_cfg * msg_spectra_config); - - void amsg_spectra_destroy(amsg_spectra_obj * obj); - - msg_spectra_obj * amsg_spectra_filled_pop(amsg_spectra_obj * obj); - - void amsg_spectra_filled_push(amsg_spectra_obj * obj, msg_spectra_obj * msg_spectra); - - msg_spectra_obj * amsg_spectra_empty_pop(amsg_spectra_obj * obj); - - void amsg_spectra_empty_push(amsg_spectra_obj * obj, msg_spectra_obj * msg_spectra); - -#endif \ No newline at end of file diff --git a/src/amessage/amsg_targets.c b/src/amessage/amsg_targets.c index 2b55deb..2b118ec 100644 --- a/src/amessage/amsg_targets.c +++ b/src/amessage/amsg_targets.c @@ -21,7 +21,7 @@ * */ - #include "amsg_targets.h" + #include amsg_targets_obj * amsg_targets_construct(const unsigned int nMessages, const msg_targets_cfg * msg_targets_config) { @@ -83,4 +83,4 @@ fifo_push(obj->empty, (void *) msg_targets); - } \ No newline at end of file + } diff --git a/src/amessage/amsg_targets.h b/src/amessage/amsg_targets.h deleted file mode 100644 index d12be3e..0000000 --- a/src/amessage/amsg_targets.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef __ODAS_AMESSAGE_TARGETS -#define __ODAS_AMESSAGE_TARGETS - - /** - * \file amsg_targets.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - - #include "../message/msg_targets.h" - #include "../utils/fifo.h" - - typedef struct amsg_targets_obj { - - unsigned int nMessages; - fifo_obj * filled; - fifo_obj * empty; - - } amsg_targets_obj; - - amsg_targets_obj * amsg_targets_construct(const unsigned int nMessages, const msg_targets_cfg * msg_targets_config); - - void amsg_targets_destroy(amsg_targets_obj * obj); - - msg_targets_obj * amsg_targets_filled_pop(amsg_targets_obj * obj); - - void amsg_targets_filled_push(amsg_targets_obj * obj, msg_targets_obj * msg_targets); - - msg_targets_obj * amsg_targets_empty_pop(amsg_targets_obj * obj); - - void amsg_targets_empty_push(amsg_targets_obj * obj, msg_targets_obj * msg_targets); - -#endif \ No newline at end of file diff --git a/src/amessage/amsg_tracks.c b/src/amessage/amsg_tracks.c index ed3a1f6..4caea48 100644 --- a/src/amessage/amsg_tracks.c +++ b/src/amessage/amsg_tracks.c @@ -21,7 +21,7 @@ * */ - #include "amsg_tracks.h" + #include amsg_tracks_obj * amsg_tracks_construct(const unsigned int nMessages, const msg_tracks_cfg * msg_tracks_config) { @@ -83,4 +83,4 @@ fifo_push(obj->empty, (void *) msg_tracks); - } \ No newline at end of file + } diff --git a/src/amessage/amsg_tracks.h b/src/amessage/amsg_tracks.h deleted file mode 100644 index 34f7529..0000000 --- a/src/amessage/amsg_tracks.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef __ODAS_AMESSAGE_TRACKS -#define __ODAS_AMESSAGE_TRACKS - - /** - * \file amsg_tracks.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - - #include "../message/msg_tracks.h" - #include "../utils/fifo.h" - - typedef struct amsg_tracks_obj { - - unsigned int nMessages; - fifo_obj * filled; - fifo_obj * empty; - - } amsg_tracks_obj; - - amsg_tracks_obj * amsg_tracks_construct(const unsigned int nMessages, const msg_tracks_cfg * msg_tracks_config); - - void amsg_tracks_destroy(amsg_tracks_obj * obj); - - msg_tracks_obj * amsg_tracks_filled_pop(amsg_tracks_obj * obj); - - void amsg_tracks_filled_push(amsg_tracks_obj * obj, msg_tracks_obj * msg_tracks); - - msg_tracks_obj * amsg_tracks_empty_pop(amsg_tracks_obj * obj); - - void amsg_tracks_empty_push(amsg_tracks_obj * obj, msg_tracks_obj * msg_tracks); - -#endif \ No newline at end of file diff --git a/src/amodule/amod_classify.c b/src/amodule/amod_classify.c index b0cbc5c..61a08d7 100644 --- a/src/amodule/amod_classify.c +++ b/src/amodule/amod_classify.c @@ -21,7 +21,7 @@ * */ - #include "amod_classify.h" + #include amod_classify_obj * amod_classify_construct(const mod_classify_cfg * mod_classify_config, const msg_hops_cfg * msg_hops_config, const msg_tracks_cfg * msg_tracks_config, const msg_categories_cfg * msg_categories_config) { diff --git a/src/amodule/amod_classify.h b/src/amodule/amod_classify.h deleted file mode 100644 index 3ff14c5..0000000 --- a/src/amodule/amod_classify.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef __ODAS_AMODULE_CLASSIFY -#define __ODAS_AMODULE_CLASSIFY - - /** - * \file amod_classify.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../module/mod_classify.h" - #include "../amessage/amsg_hops.h" - #include "../amessage/amsg_tracks.h" - #include "../amessage/amsg_categories.h" - #include "../general/thread.h" - - typedef struct amod_classify_obj { - - mod_classify_obj * mod_classify; - amsg_hops_obj * in1; - amsg_tracks_obj * in2; - amsg_categories_obj * out; - thread_obj * thread; - - } amod_classify_obj; - - amod_classify_obj * amod_classify_construct(const mod_classify_cfg * mod_classify_config, const msg_hops_cfg * msg_hops_config, const msg_tracks_cfg * msg_tracks_config, const msg_categories_cfg * msg_categories_config); - - void amod_classify_destroy(amod_classify_obj * obj); - - void amod_classify_connect(amod_classify_obj * obj, amsg_hops_obj * in1, amsg_tracks_obj * in2, amsg_categories_obj * out); - - void amod_classify_disconnect(amod_classify_obj * obj); - - void * amod_classify_thread(void * ptr); - -#endif \ No newline at end of file diff --git a/src/amodule/amod_istft.c b/src/amodule/amod_istft.c index 371ec3d..1c57a2c 100644 --- a/src/amodule/amod_istft.c +++ b/src/amodule/amod_istft.c @@ -21,7 +21,7 @@ * */ - #include "amod_istft.h" + #include amod_istft_obj * amod_istft_construct(const mod_istft_cfg * mod_istft_config, const msg_spectra_cfg * msg_spectra_config, const msg_hops_cfg * msg_hops_config) { @@ -90,4 +90,4 @@ } - } \ No newline at end of file + } diff --git a/src/amodule/amod_istft.h b/src/amodule/amod_istft.h deleted file mode 100644 index f2b7ccf..0000000 --- a/src/amodule/amod_istft.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef __ODAS_AMODULE_ISTFT -#define __ODAS_AMODULE_ISTFT - - /** - * \file amod_istft.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../module/mod_istft.h" - #include "../amessage/amsg_spectra.h" - #include "../amessage/amsg_hops.h" - #include "../general/thread.h" - - typedef struct amod_istft_obj { - - mod_istft_obj * mod_istft; - amsg_spectra_obj * in; - amsg_hops_obj * out; - thread_obj * thread; - - } amod_istft_obj; - - amod_istft_obj * amod_istft_construct(const mod_istft_cfg * mod_istft_config, const msg_spectra_cfg * msg_spectra_config, const msg_hops_cfg * msg_hops_config); - - void amod_istft_destroy(amod_istft_obj * obj); - - void amod_istft_connect(amod_istft_obj * obj, amsg_spectra_obj * in, amsg_hops_obj * out); - - void amod_istft_disconnect(amod_istft_obj * obj); - - void * amod_istft_thread(void * ptr); - -#endif \ No newline at end of file diff --git a/src/amodule/amod_mapping.c b/src/amodule/amod_mapping.c index 4ad3b40..db2bc92 100644 --- a/src/amodule/amod_mapping.c +++ b/src/amodule/amod_mapping.c @@ -21,7 +21,7 @@ * */ - #include "amod_mapping.h" + #include amod_mapping_obj * amod_mapping_construct(const mod_mapping_cfg * mod_mapping_config, const msg_hops_cfg * msg_hops_config) { @@ -90,4 +90,4 @@ } - } \ No newline at end of file + } diff --git a/src/amodule/amod_mapping.h b/src/amodule/amod_mapping.h deleted file mode 100644 index 014d589..0000000 --- a/src/amodule/amod_mapping.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef __ODAS_AMODULE_MAPPING -#define __ODAS_AMODULE_MAPPING - - /** - * \file amod_mapping.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../module/mod_mapping.h" - #include "../amessage/amsg_hops.h" - #include "../general/thread.h" - - typedef struct amod_mapping_obj { - - mod_mapping_obj * mod_mapping; - amsg_hops_obj * in; - amsg_hops_obj * out; - thread_obj * thread; - - } amod_mapping_obj; - - amod_mapping_obj * amod_mapping_construct(const mod_mapping_cfg * mod_mapping_config, const msg_hops_cfg * msg_hops_config); - - void amod_mapping_destroy(amod_mapping_obj * obj); - - void amod_mapping_connect(amod_mapping_obj * obj, amsg_hops_obj * in, amsg_hops_obj * out); - - void amod_mapping_disconnect(amod_mapping_obj * obj); - - void * amod_mapping_thread(void * ptr); - -#endif \ No newline at end of file diff --git a/src/amodule/amod_noise.c b/src/amodule/amod_noise.c index cb6f8ec..339af77 100644 --- a/src/amodule/amod_noise.c +++ b/src/amodule/amod_noise.c @@ -21,7 +21,7 @@ * */ - #include "amod_noise.h" + #include amod_noise_obj * amod_noise_construct(const mod_noise_cfg * mod_noise_config, const msg_spectra_cfg * msg_spectra_config, const msg_powers_cfg * msg_powers_config) { @@ -91,4 +91,4 @@ } - } \ No newline at end of file + } diff --git a/src/amodule/amod_noise.h b/src/amodule/amod_noise.h deleted file mode 100644 index 873d7f6..0000000 --- a/src/amodule/amod_noise.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef __ODAS_AMODULE_NOISE -#define __ODAS_AMODULE_NOISE - - /** - * \file amod_noise.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../module/mod_noise.h" - #include "../amessage/amsg_spectra.h" - #include "../amessage/amsg_powers.h" - #include "../general/thread.h" - - typedef struct amod_noise_obj { - - mod_noise_obj * mod_noise; - amsg_spectra_obj * in; - amsg_powers_obj * out; - thread_obj * thread; - - } amod_noise_obj; - - amod_noise_obj * amod_noise_construct(const mod_noise_cfg * mod_noise_config, const msg_spectra_cfg * msg_spectra_config, const msg_powers_cfg * msg_powers_config); - - void amod_noise_destroy(amod_noise_obj * obj); - - void amod_noise_connect(amod_noise_obj * obj, amsg_spectra_obj * in, amsg_powers_obj * out); - - void amod_noise_disconnect(amod_noise_obj * obj); - - void * amod_noise_thread(void * ptr); - -#endif \ No newline at end of file diff --git a/src/amodule/amod_resample.c b/src/amodule/amod_resample.c index c98190f..7eb8b76 100644 --- a/src/amodule/amod_resample.c +++ b/src/amodule/amod_resample.c @@ -21,7 +21,7 @@ * */ - #include "amod_resample.h" + #include amod_resample_obj * amod_resample_construct(const mod_resample_cfg * mod_resample_config, const msg_hops_cfg * msg_hops_in_config, const msg_hops_cfg * msg_hops_out_config) { @@ -106,4 +106,4 @@ } - } \ No newline at end of file + } diff --git a/src/amodule/amod_resample.h b/src/amodule/amod_resample.h deleted file mode 100644 index 996bf50..0000000 --- a/src/amodule/amod_resample.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef __ODAS_AMODULE_RESAMPLE -#define __ODAS_AMODULE_RESAMPLE - - /** - * \file amod_resample.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../module/mod_resample.h" - #include "../amessage/amsg_hops.h" - #include "../general/thread.h" - - typedef struct amod_resample_obj { - - mod_resample_obj * mod_resample; - amsg_hops_obj * in; - amsg_hops_obj * out; - thread_obj * thread; - - } amod_resample_obj; - - amod_resample_obj * amod_resample_construct(const mod_resample_cfg * mod_resample_config, const msg_hops_cfg * msg_hops_in_config, const msg_hops_cfg * msg_hops_out_config); - - void amod_resample_destroy(amod_resample_obj * obj); - - void amod_resample_connect(amod_resample_obj * obj, amsg_hops_obj * in, amsg_hops_obj * out); - - void amod_resample_disconnect(amod_resample_obj * obj); - - void * amod_resample_thread(void * ptr); - -#endif \ No newline at end of file diff --git a/src/amodule/amod_ssl.c b/src/amodule/amod_ssl.c index 56a4af2..00a5d3e 100644 --- a/src/amodule/amod_ssl.c +++ b/src/amodule/amod_ssl.c @@ -21,7 +21,7 @@ * */ - #include "amod_ssl.h" + #include amod_ssl_obj * amod_ssl_construct(const mod_ssl_cfg * mod_ssl_config, const msg_spectra_cfg * msg_spectra_config, const msg_pots_cfg * msg_pots_config) { diff --git a/src/amodule/amod_ssl.h b/src/amodule/amod_ssl.h deleted file mode 100644 index f2d1208..0000000 --- a/src/amodule/amod_ssl.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef __ODAS_AMODULE_SSL -#define __ODAS_AMODULE_SSL - - /** - * \file amod_ssl.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../module/mod_ssl.h" - #include "../amessage/amsg_spectra.h" - #include "../amessage/amsg_powers.h" - #include "../amessage/amsg_pots.h" - #include "../general/thread.h" - - typedef struct amod_ssl_obj { - - mod_ssl_obj * mod_ssl; - amsg_spectra_obj * in; - amsg_pots_obj * out; - thread_obj * thread; - - } amod_ssl_obj; - - amod_ssl_obj * amod_ssl_construct(const mod_ssl_cfg * mod_ssl_config, const msg_spectra_cfg * msg_spectra_config, const msg_pots_cfg * msg_pots_config); - - void amod_ssl_destroy(amod_ssl_obj * obj); - - void amod_ssl_connect(amod_ssl_obj * obj, amsg_spectra_obj * in, amsg_pots_obj * out); - - void amod_ssl_disconnect(amod_ssl_obj * obj); - - void * amod_ssl_thread(void * ptr); - -#endif \ No newline at end of file diff --git a/src/amodule/amod_sss.c b/src/amodule/amod_sss.c index b574396..60a781e 100644 --- a/src/amodule/amod_sss.c +++ b/src/amodule/amod_sss.c @@ -21,7 +21,7 @@ * */ - #include "amod_sss.h" + #include amod_sss_obj * amod_sss_construct(const mod_sss_cfg * mod_sss_config, const msg_tracks_cfg * msg_tracks_config, const msg_spectra_cfg * msg_spectra_config) { diff --git a/src/amodule/amod_sss.h b/src/amodule/amod_sss.h deleted file mode 100644 index f4e9b90..0000000 --- a/src/amodule/amod_sss.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef __ODAS_AMODULE_SSS -#define __ODAS_AMODULE_SSS - - /** - * \file amod_sss.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../module/mod_sss.h" - #include "../amessage/amsg_powers.h" - #include "../amessage/amsg_tracks.h" - #include "../amessage/amsg_spectra.h" - #include "../general/thread.h" - - typedef struct amod_sss_obj { - - mod_sss_obj * mod_sss; - amsg_spectra_obj * in1; - amsg_powers_obj * in2; - amsg_tracks_obj * in3; - amsg_spectra_obj * out1; - amsg_spectra_obj * out2; - thread_obj * thread; - - } amod_sss_obj; - - amod_sss_obj * amod_sss_construct(const mod_sss_cfg * mod_sss_config, const msg_tracks_cfg * msg_tracks_config, const msg_spectra_cfg * msg_spectra_config); - - void amod_sss_destroy(amod_sss_obj * obj); - - void amod_sss_connect(amod_sss_obj * obj, amsg_spectra_obj * in1, amsg_powers_obj * in2, amsg_tracks_obj * in3, amsg_spectra_obj * out1, amsg_spectra_obj * out2); - - void amod_sss_disconnect(amod_sss_obj * obj); - - void * amod_sss_thread(void * ptr); - -#endif \ No newline at end of file diff --git a/src/amodule/amod_sst.c b/src/amodule/amod_sst.c index 1a839f2..250a170 100644 --- a/src/amodule/amod_sst.c +++ b/src/amodule/amod_sst.c @@ -21,7 +21,7 @@ * */ - #include "amod_sst.h" + #include amod_sst_obj * amod_sst_construct(const mod_sst_cfg * mod_sst_config, const mod_ssl_cfg * mod_ssl_config, const msg_pots_cfg * msg_pots_config, const msg_targets_cfg * msg_targets_config, const msg_tracks_cfg * msg_tracks_config) { @@ -96,4 +96,4 @@ } - } \ No newline at end of file + } diff --git a/src/amodule/amod_sst.h b/src/amodule/amod_sst.h deleted file mode 100644 index 329fb17..0000000 --- a/src/amodule/amod_sst.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef __ODAS_AMODULE_SST -#define __ODAS_AMODULE_SST - - /** - * \file amod_sst.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../module/mod_ssl.h" - #include "../module/mod_sst.h" - #include "../amessage/amsg_pots.h" - #include "../amessage/amsg_targets.h" - #include "../amessage/amsg_tracks.h" - #include "../general/thread.h" - - typedef struct amod_sst_obj { - - mod_sst_obj * mod_sst; - amsg_pots_obj * in1; - amsg_targets_obj * in2; - amsg_tracks_obj * out; - thread_obj * thread; - - } amod_sst_obj; - - amod_sst_obj * amod_sst_construct(const mod_sst_cfg * mod_sst_config, const mod_ssl_cfg * mod_ssl_config, const msg_pots_cfg * msg_pots_config, const msg_targets_cfg * msg_targets_config, const msg_tracks_cfg * msg_tracks_config); - - void amod_sst_destroy(amod_sst_obj * obj); - - void amod_sst_connect(amod_sst_obj * obj, amsg_pots_obj * in1, amsg_targets_obj * in2, amsg_tracks_obj * out); - - void amod_sst_disconnect(amod_sst_obj * obj); - - void * amod_sst_thread(void * ptr); - -#endif \ No newline at end of file diff --git a/src/amodule/amod_stft.c b/src/amodule/amod_stft.c index 0428a4e..83a13e3 100644 --- a/src/amodule/amod_stft.c +++ b/src/amodule/amod_stft.c @@ -21,7 +21,7 @@ * */ - #include "amod_stft.h" + #include amod_stft_obj * amod_stft_construct(const mod_stft_cfg * mod_stft_config, const msg_hops_cfg * msg_hops_config, const msg_spectra_cfg * msg_spectra_config) { @@ -90,4 +90,4 @@ } - } \ No newline at end of file + } diff --git a/src/amodule/amod_stft.h b/src/amodule/amod_stft.h deleted file mode 100644 index 29dc1c8..0000000 --- a/src/amodule/amod_stft.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef __ODAS_AMODULE_STFT -#define __ODAS_AMODULE_STFT - - /** - * \file amod_stft.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../module/mod_stft.h" - #include "../amessage/amsg_hops.h" - #include "../amessage/amsg_spectra.h" - #include "../general/thread.h" - - typedef struct amod_stft_obj { - - mod_stft_obj * mod_stft; - amsg_hops_obj * in; - amsg_spectra_obj * out; - thread_obj * thread; - - } amod_stft_obj; - - amod_stft_obj * amod_stft_construct(const mod_stft_cfg * mod_stft_config, const msg_hops_cfg * msg_hops_config, const msg_spectra_cfg * msg_spectra_config); - - void amod_stft_destroy(amod_stft_obj * obj); - - void amod_stft_connect(amod_stft_obj * obj, amsg_hops_obj * in, amsg_spectra_obj * out); - - void amod_stft_disconnect(amod_stft_obj * obj); - - void * amod_stft_thread(void * ptr); - -#endif \ No newline at end of file diff --git a/src/amodule/amod_volume.c b/src/amodule/amod_volume.c index 302d38d..35f67f4 100644 --- a/src/amodule/amod_volume.c +++ b/src/amodule/amod_volume.c @@ -21,7 +21,7 @@ * */ - #include "amod_volume.h" + #include amod_volume_obj * amod_volume_construct(const mod_volume_cfg * mod_volume_config, const msg_hops_cfg * msg_hops_config) { @@ -90,4 +90,4 @@ } - } \ No newline at end of file + } diff --git a/src/amodule/amod_volume.h b/src/amodule/amod_volume.h deleted file mode 100644 index a774757..0000000 --- a/src/amodule/amod_volume.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef __ODAS_AMODULE_VOLUME -#define __ODAS_AMODULE_VOLUME - - /** - * \file amod_volume.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../module/mod_volume.h" - #include "../amessage/amsg_hops.h" - #include "../general/thread.h" - - typedef struct amod_volume_obj { - - mod_volume_obj * mod_volume; - amsg_hops_obj * in; - amsg_hops_obj * out; - thread_obj * thread; - - } amod_volume_obj; - - amod_volume_obj * amod_volume_construct(const mod_volume_cfg * mod_volume_config, const msg_hops_cfg * msg_hops_config); - - void amod_volume_destroy(amod_volume_obj * obj); - - void amod_volume_connect(amod_volume_obj * obj, amsg_hops_obj * in, amsg_hops_obj * out); - - void amod_volume_disconnect(amod_volume_obj * obj); - - void * amod_volume_thread(void * ptr); - -#endif \ No newline at end of file diff --git a/src/asink/asnk_categories.c b/src/asink/asnk_categories.c index 2860e56..ebf9f36 100644 --- a/src/asink/asnk_categories.c +++ b/src/asink/asnk_categories.c @@ -21,7 +21,7 @@ * */ - #include "asnk_categories.h" + #include asnk_categories_obj * asnk_categories_construct(const snk_categories_cfg * snk_categories_config, const msg_categories_cfg * msg_categories_config) { @@ -89,4 +89,4 @@ // Close the sink snk_categories_close(obj->snk_categories); - } \ No newline at end of file + } diff --git a/src/asink/asnk_categories.h b/src/asink/asnk_categories.h deleted file mode 100644 index 6c22c2e..0000000 --- a/src/asink/asnk_categories.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef __ODAS_ASINK_CATEGORIES -#define __ODAS_ASINK_CATEGORIES - - /** - * \file asink_categories.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../amessage/amsg_categories.h" - #include "../sink/snk_categories.h" - #include "../general/thread.h" - - #include - - typedef struct asnk_categories_obj { - - snk_categories_obj * snk_categories; - amsg_categories_obj * in; - thread_obj * thread; - - } asnk_categories_obj; - - asnk_categories_obj * asnk_categories_construct(const snk_categories_cfg * snk_categories_config, const msg_categories_cfg * msg_categories_config); - - void asnk_categories_destroy(asnk_categories_obj * obj); - - void asnk_categories_connect(asnk_categories_obj * obj, amsg_categories_obj * in); - - void asnk_categories_disconnect(asnk_categories_obj * obj); - - void * asnk_categories_thread(void * ptr); - -#endif \ No newline at end of file diff --git a/src/asink/asnk_hops.c b/src/asink/asnk_hops.c index a46efb1..8a17275 100644 --- a/src/asink/asnk_hops.c +++ b/src/asink/asnk_hops.c @@ -21,7 +21,7 @@ * */ - #include "asnk_hops.h" + #include asnk_hops_obj * asnk_hops_construct(const snk_hops_cfg * snk_hops_config, const msg_hops_cfg * msg_hops_config) { @@ -89,4 +89,4 @@ // Close the sink snk_hops_close(obj->snk_hops); - } \ No newline at end of file + } diff --git a/src/asink/asnk_hops.h b/src/asink/asnk_hops.h deleted file mode 100644 index f4413d7..0000000 --- a/src/asink/asnk_hops.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef __ODAS_ASINK_HOPS -#define __ODAS_ASINK_HOPS - - /** - * \file asink_hops.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../amessage/amsg_hops.h" - #include "../sink/snk_hops.h" - #include "../general/thread.h" - - #include - - typedef struct asnk_hops_obj { - - snk_hops_obj * snk_hops; - amsg_hops_obj * in; - thread_obj * thread; - - } asnk_hops_obj; - - asnk_hops_obj * asnk_hops_construct(const snk_hops_cfg * snk_hops_config, const msg_hops_cfg * msg_hops_config); - - void asnk_hops_destroy(asnk_hops_obj * obj); - - void asnk_hops_connect(asnk_hops_obj * obj, amsg_hops_obj * in); - - void asnk_hops_disconnect(asnk_hops_obj * obj); - - void * asnk_hops_thread(void * ptr); - -#endif \ No newline at end of file diff --git a/src/asink/asnk_pots.c b/src/asink/asnk_pots.c index c3ca1ce..d0aa02b 100644 --- a/src/asink/asnk_pots.c +++ b/src/asink/asnk_pots.c @@ -21,7 +21,7 @@ * */ - #include "asnk_pots.h" + #include asnk_pots_obj * asnk_pots_construct(const snk_pots_cfg * snk_pots_config, const msg_pots_cfg * msg_pots_config) { @@ -89,4 +89,4 @@ // Close the sink snk_pots_close(obj->snk_pots); - } \ No newline at end of file + } diff --git a/src/asink/asnk_pots.h b/src/asink/asnk_pots.h deleted file mode 100644 index bf03af1..0000000 --- a/src/asink/asnk_pots.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef __ODAS_ASINK_POTS -#define __ODAS_ASINK_POTS - - /** - * \file asink_pots.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../amessage/amsg_pots.h" - #include "../sink/snk_pots.h" - #include "../general/thread.h" - - #include - - typedef struct asnk_pots_obj { - - snk_pots_obj * snk_pots; - amsg_pots_obj * in; - thread_obj * thread; - - } asnk_pots_obj; - - asnk_pots_obj * asnk_pots_construct(const snk_pots_cfg * snk_pots_config, const msg_pots_cfg * msg_pots_config); - - void asnk_pots_destroy(asnk_pots_obj * obj); - - void asnk_pots_connect(asnk_pots_obj * obj, amsg_pots_obj * in); - - void asnk_pots_disconnect(asnk_pots_obj * obj); - - void * asnk_pots_thread(void * ptr); - -#endif \ No newline at end of file diff --git a/src/asink/asnk_powers.c b/src/asink/asnk_powers.c index e8d196d..163b38b 100644 --- a/src/asink/asnk_powers.c +++ b/src/asink/asnk_powers.c @@ -21,7 +21,7 @@ * */ - #include "asnk_powers.h" + #include asnk_powers_obj * asnk_powers_construct(const snk_powers_cfg * snk_powers_config, const msg_powers_cfg * msg_powers_config) { @@ -89,4 +89,4 @@ // Close the sink snk_powers_close(obj->snk_powers); - } \ No newline at end of file + } diff --git a/src/asink/asnk_powers.h b/src/asink/asnk_powers.h deleted file mode 100644 index 104faf4..0000000 --- a/src/asink/asnk_powers.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef __ODAS_ASINK_POWERS -#define __ODAS_ASINK_POWERS - - /** - * \file asink_powers.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../amessage/amsg_powers.h" - #include "../sink/snk_powers.h" - #include "../general/thread.h" - - #include - - typedef struct asnk_powers_obj { - - snk_powers_obj * snk_powers; - amsg_powers_obj * in; - thread_obj * thread; - - } asnk_powers_obj; - - asnk_powers_obj * asnk_powers_construct(const snk_powers_cfg * snk_powers_config, const msg_powers_cfg * msg_powers_config); - - void asnk_powers_destroy(asnk_powers_obj * obj); - - void asnk_powers_connect(asnk_powers_obj * obj, amsg_powers_obj * in); - - void asnk_powers_disconnect(asnk_powers_obj * obj); - - void * asnk_powers_thread(void * ptr); - -#endif \ No newline at end of file diff --git a/src/asink/asnk_spectra.c b/src/asink/asnk_spectra.c index f1df860..fe41fd3 100644 --- a/src/asink/asnk_spectra.c +++ b/src/asink/asnk_spectra.c @@ -21,7 +21,7 @@ * */ - #include "asnk_spectra.h" + #include asnk_spectra_obj * asnk_spectra_construct(const snk_spectra_cfg * snk_spectra_config, const msg_spectra_cfg * msg_spectra_config) { @@ -89,4 +89,4 @@ // Close the sink snk_spectra_close(obj->snk_spectra); - } \ No newline at end of file + } diff --git a/src/asink/asnk_spectra.h b/src/asink/asnk_spectra.h deleted file mode 100644 index 38a7265..0000000 --- a/src/asink/asnk_spectra.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef __ODAS_ASINK_SPECTRA -#define __ODAS_ASINK_SPECTRA - - /** - * \file asink_spectra.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../amessage/amsg_spectra.h" - #include "../sink/snk_spectra.h" - #include "../general/thread.h" - - #include - - typedef struct asnk_spectra_obj { - - snk_spectra_obj * snk_spectra; - amsg_spectra_obj * in; - thread_obj * thread; - - } asnk_spectra_obj; - - asnk_spectra_obj * asnk_spectra_construct(const snk_spectra_cfg * snk_spectra_config, const msg_spectra_cfg * msg_spectra_config); - - void asnk_spectra_destroy(asnk_spectra_obj * obj); - - void asnk_spectra_connect(asnk_spectra_obj * obj, amsg_spectra_obj * in); - - void asnk_spectra_disconnect(asnk_spectra_obj * obj); - - void * asnk_spectra_thread(void * ptr); - -#endif \ No newline at end of file diff --git a/src/asink/asnk_tracks.c b/src/asink/asnk_tracks.c index 3a03a84..908d159 100644 --- a/src/asink/asnk_tracks.c +++ b/src/asink/asnk_tracks.c @@ -21,7 +21,7 @@ * */ - #include "asnk_tracks.h" + #include asnk_tracks_obj * asnk_tracks_construct(const snk_tracks_cfg * snk_tracks_config, const msg_tracks_cfg * msg_tracks_config) { @@ -89,4 +89,4 @@ // Close the sink snk_tracks_close(obj->snk_tracks); - } \ No newline at end of file + } diff --git a/src/asink/asnk_tracks.h b/src/asink/asnk_tracks.h deleted file mode 100644 index 6ec5c05..0000000 --- a/src/asink/asnk_tracks.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef __ODAS_ASINK_TRACKS -#define __ODAS_ASINK_TRACKS - - /** - * \file asink_tracks.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../amessage/amsg_tracks.h" - #include "../sink/snk_tracks.h" - #include "../general/thread.h" - - #include - - typedef struct asnk_tracks_obj { - - snk_tracks_obj * snk_tracks; - amsg_tracks_obj * in; - thread_obj * thread; - - } asnk_tracks_obj; - - asnk_tracks_obj * asnk_tracks_construct(const snk_tracks_cfg * snk_tracks_config, const msg_tracks_cfg * msg_tracks_config); - - void asnk_tracks_destroy(asnk_tracks_obj * obj); - - void asnk_tracks_connect(asnk_tracks_obj * obj, amsg_tracks_obj * in); - - void asnk_tracks_disconnect(asnk_tracks_obj * obj); - - void * asnk_tracks_thread(void * ptr); - -#endif \ No newline at end of file diff --git a/src/asource/asrc_hops.c b/src/asource/asrc_hops.c index 8235aa1..46bc2ea 100644 --- a/src/asource/asrc_hops.c +++ b/src/asource/asrc_hops.c @@ -21,7 +21,7 @@ * */ - #include "asrc_hops.h" + #include asrc_hops_obj * asrc_hops_construct(const src_hops_cfg * src_hops_config, const msg_hops_cfg * msg_hops_config) { @@ -100,4 +100,4 @@ msg_hops_zero(msg_hops_out); amsg_hops_filled_push(obj->out, msg_hops_out); - } \ No newline at end of file + } diff --git a/src/asource/asrc_hops.h b/src/asource/asrc_hops.h deleted file mode 100644 index b25b715..0000000 --- a/src/asource/asrc_hops.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef __ODAS_ASOURCE_HOPS -#define __ODAS_ASOURCE_HOPS - - /** - * \file asource_hops.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../amessage/amsg_hops.h" - #include "../source/src_hops.h" - #include "../general/thread.h" - - #include - - typedef struct asrc_hops_obj { - - src_hops_obj * src_hops; - amsg_hops_obj * out; - thread_obj * thread; - - } asrc_hops_obj; - - asrc_hops_obj * asrc_hops_construct(const src_hops_cfg * src_hops_config, const msg_hops_cfg * msg_hops_config); - - void asrc_hops_destroy(asrc_hops_obj * obj); - - void asrc_hops_connect(asrc_hops_obj * obj, amsg_hops_obj * out); - - void asrc_hops_disconnect(asrc_hops_obj * obj); - - void * asrc_hops_thread(void * ptr); - -#endif \ No newline at end of file diff --git a/src/connector/con_categories.c b/src/connector/con_categories.c index b14bd90..3cef1ef 100644 --- a/src/connector/con_categories.c +++ b/src/connector/con_categories.c @@ -21,7 +21,7 @@ * */ - #include "con_categories.h" + #include con_categories_obj * con_categories_construct(const unsigned int nOuts, const msg_categories_cfg * msg_categories_config) { @@ -76,4 +76,4 @@ return rtnValue; - } \ No newline at end of file + } diff --git a/src/connector/con_categories.h b/src/connector/con_categories.h deleted file mode 100644 index 09d8d55..0000000 --- a/src/connector/con_categories.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef __ODAS_CONNECTOR_CATEGORIES -#define __ODAS_CONNECTOR_CATEGORIES - - /** - * \file con_categories.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../message/msg_categories.h" - - #include - #include - - typedef struct con_categories_obj { - - msg_categories_obj * in; - msg_categories_obj ** outs; - - unsigned int nOuts; - - } con_categories_obj; - - con_categories_obj * con_categories_construct(const unsigned int nOuts, const msg_categories_cfg * msg_categories_config); - - void con_categories_destroy(con_categories_obj * obj); - - int con_categories_process(con_categories_obj * obj); - -#endif \ No newline at end of file diff --git a/src/connector/con_hops.c b/src/connector/con_hops.c index 85c9a72..2d0dc18 100644 --- a/src/connector/con_hops.c +++ b/src/connector/con_hops.c @@ -21,7 +21,7 @@ * */ - #include "con_hops.h" + #include con_hops_obj * con_hops_construct(const unsigned int nOuts, const msg_hops_cfg * msg_hops_config) { @@ -76,4 +76,4 @@ return rtnValue; - } \ No newline at end of file + } diff --git a/src/connector/con_hops.h b/src/connector/con_hops.h deleted file mode 100644 index 9b41173..0000000 --- a/src/connector/con_hops.h +++ /dev/null @@ -1,46 +0,0 @@ - /** - * \file con_hops.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#ifndef __ODAS_CONNECTOR_HOPS -#define __ODAS_CONNECTOR_HOPS - - #include "../message/msg_hops.h" - - #include - #include - - typedef struct con_hops_obj { - - msg_hops_obj * in; - msg_hops_obj ** outs; - - unsigned int nOuts; - - } con_hops_obj; - - con_hops_obj * con_hops_construct(const unsigned int nOuts, const msg_hops_cfg * msg_hops_config); - - void con_hops_destroy(con_hops_obj * obj); - - int con_hops_process(con_hops_obj * obj); - -#endif \ No newline at end of file diff --git a/src/connector/con_pots.c b/src/connector/con_pots.c index 3fff756..9165547 100644 --- a/src/connector/con_pots.c +++ b/src/connector/con_pots.c @@ -21,7 +21,7 @@ * */ - #include "con_pots.h" + #include con_pots_obj * con_pots_construct(const unsigned int nOuts, const msg_pots_cfg * msg_pots_config) { @@ -76,4 +76,4 @@ return rtnValue; - } \ No newline at end of file + } diff --git a/src/connector/con_pots.h b/src/connector/con_pots.h deleted file mode 100644 index ceac877..0000000 --- a/src/connector/con_pots.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef __ODAS_CONNECTOR_POTS -#define __ODAS_CONNECTOR_POTS - - /** - * \file con_pots.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../message/msg_pots.h" - - #include - #include - - typedef struct con_pots_obj { - - msg_pots_obj * in; - msg_pots_obj ** outs; - - unsigned int nOuts; - - } con_pots_obj; - - con_pots_obj * con_pots_construct(const unsigned int nOuts, const msg_pots_cfg * msg_pots_config); - - void con_pots_destroy(con_pots_obj * obj); - - int con_pots_process(con_pots_obj * obj); - -#endif \ No newline at end of file diff --git a/src/connector/con_powers.c b/src/connector/con_powers.c index a209f8a..4b254f8 100644 --- a/src/connector/con_powers.c +++ b/src/connector/con_powers.c @@ -21,7 +21,7 @@ * */ - #include "con_powers.h" + #include con_powers_obj * con_powers_construct(const unsigned int nOuts, const msg_powers_cfg * msg_powers_config) { @@ -76,4 +76,4 @@ return rtnValue; - } \ No newline at end of file + } diff --git a/src/connector/con_powers.h b/src/connector/con_powers.h deleted file mode 100644 index f038c65..0000000 --- a/src/connector/con_powers.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef __ODAS_CONNECTOR_POWERS -#define __ODAS_CONNECTOR_POWERS - - /** - * \file con_powers.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../message/msg_powers.h" - - #include - #include - - typedef struct con_powers_obj { - - msg_powers_obj * in; - msg_powers_obj ** outs; - - unsigned int nOuts; - - } con_powers_obj; - - con_powers_obj * con_powers_construct(const unsigned int nOuts, const msg_powers_cfg * msg_powers_config); - - void con_powers_destroy(con_powers_obj * obj); - - int con_powers_process(con_powers_obj * obj); - -#endif \ No newline at end of file diff --git a/src/connector/con_spectra.c b/src/connector/con_spectra.c index 4f67ef3..2fa3f08 100644 --- a/src/connector/con_spectra.c +++ b/src/connector/con_spectra.c @@ -20,7 +20,7 @@ * */ - #include "con_spectra.h" + #include con_spectra_obj * con_spectra_construct(const unsigned int nOuts, const msg_spectra_cfg * msg_spectra_config) { @@ -75,4 +75,4 @@ return rtnValue; - } \ No newline at end of file + } diff --git a/src/connector/con_spectra.h b/src/connector/con_spectra.h deleted file mode 100644 index a1a21e7..0000000 --- a/src/connector/con_spectra.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef __ODAS_CONNECTOR_SPECTRA -#define __ODAS_CONNECTOR_SPECTRA - - /** - * \file con_spectra.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../message/msg_spectra.h" - - #include - #include - - typedef struct con_spectra_obj { - - msg_spectra_obj * in; - msg_spectra_obj ** outs; - - unsigned int nOuts; - - } con_spectra_obj; - - con_spectra_obj * con_spectra_construct(const unsigned int nOuts, const msg_spectra_cfg * msg_spectra_config); - - void con_spectra_destroy(con_spectra_obj * obj); - - int con_spectra_process(con_spectra_obj * obj); - -#endif \ No newline at end of file diff --git a/src/connector/con_targets.c b/src/connector/con_targets.c index dee253e..a21cf3d 100644 --- a/src/connector/con_targets.c +++ b/src/connector/con_targets.c @@ -21,7 +21,7 @@ * */ - #include "con_targets.h" + #include con_targets_obj * con_targets_construct(const unsigned int nOuts, const msg_targets_cfg * msg_targets_config) { @@ -76,4 +76,4 @@ return rtnValue; - } \ No newline at end of file + } diff --git a/src/connector/con_targets.h b/src/connector/con_targets.h deleted file mode 100644 index 7ef4ffd..0000000 --- a/src/connector/con_targets.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef __ODAS_CONNECTOR_TARGETS -#define __ODAS_CONNECTOR_TARGETS - - /** - * \file con_targets.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../message/msg_targets.h" - - #include - #include - - typedef struct con_targets_obj { - - msg_targets_obj * in; - msg_targets_obj ** outs; - - unsigned int nOuts; - - } con_targets_obj; - - con_targets_obj * con_targets_construct(const unsigned int nOuts, const msg_targets_cfg * msg_targets_config); - - void con_targets_destroy(con_targets_obj * obj); - - int con_targets_process(con_targets_obj * obj); - -#endif \ No newline at end of file diff --git a/src/connector/con_tracks.c b/src/connector/con_tracks.c index 0858681..0c6839f 100644 --- a/src/connector/con_tracks.c +++ b/src/connector/con_tracks.c @@ -21,7 +21,7 @@ * */ - #include "con_tracks.h" + #include con_tracks_obj * con_tracks_construct(const unsigned int nOuts, const msg_tracks_cfg * msg_tracks_config) { @@ -76,4 +76,4 @@ return rtnValue; - } \ No newline at end of file + } diff --git a/src/connector/con_tracks.h b/src/connector/con_tracks.h deleted file mode 100644 index d4191d3..0000000 --- a/src/connector/con_tracks.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef __ODAS_CONNECTOR_TRACKS -#define __ODAS_CONNECTOR_TRACKS - - /** - * \file con_tracks.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../message/msg_tracks.h" - - #include - #include - - typedef struct con_tracks_obj { - - msg_tracks_obj * in; - msg_tracks_obj ** outs; - - unsigned int nOuts; - - } con_tracks_obj; - - con_tracks_obj * con_tracks_construct(const unsigned int nOuts, const msg_tracks_cfg * msg_tracks_config); - - void con_tracks_destroy(con_tracks_obj * obj); - - int con_tracks_process(con_tracks_obj * obj); - -#endif \ No newline at end of file diff --git a/src/general/format.c b/src/general/format.c index 0b7ea5a..ce5cd14 100644 --- a/src/general/format.c +++ b/src/general/format.c @@ -21,7 +21,7 @@ * */ - #include "format.h" + #include format_obj * format_construct() { @@ -171,4 +171,4 @@ printf("(null)\n"); } - } \ No newline at end of file + } diff --git a/src/general/format.h b/src/general/format.h deleted file mode 100644 index e584bcd..0000000 --- a/src/general/format.h +++ /dev/null @@ -1,63 +0,0 @@ -#ifndef __ODAS_GENERAL_FORMAT -#define __ODAS_GENERAL_FORMAT - - /** - * \file format.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - - typedef enum format_type { - - format_undefined = 0, - format_binary_int08 = 8, - format_binary_int16 = 16, - format_binary_int24 = 24, - format_binary_int32 = 32, - format_binary_float = 1, - format_text_json = 2, - - } format_type; - - typedef struct format_obj { - - format_type type; - - } format_obj; - - format_obj * format_construct(); - - format_obj * format_construct_undefined(); - - format_obj * format_construct_binary_int(const unsigned int nBits); - - format_obj * format_construct_binary_float(); - - format_obj * format_construct_text_json(); - - format_obj * format_clone(const format_obj * obj); - - void format_destroy(format_obj * obj); - - void format_printf(const format_obj * obj); - -#endif \ No newline at end of file diff --git a/src/general/interface.c b/src/general/interface.c index 535fdc3..ce180d0 100644 --- a/src/general/interface.c +++ b/src/general/interface.c @@ -21,7 +21,7 @@ * */ - #include "interface.h" + #include interface_obj * interface_construct() { @@ -438,4 +438,4 @@ } - } \ No newline at end of file + } diff --git a/src/general/interface.h b/src/general/interface.h deleted file mode 100644 index 552f620..0000000 --- a/src/general/interface.h +++ /dev/null @@ -1,73 +0,0 @@ -#ifndef __ODAS_GENERAL_INTERFACE -#define __ODAS_GENERAL_INTERFACE - - /** - * \file interface.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef enum interface_type { - - interface_undefined = 0, - interface_blackhole = 1, - interface_file = 2, - interface_socket = 3, - interface_soundcard = 4, - interface_terminal = 5, - - } interface_type; - - typedef struct interface_obj { - - interface_type type; - - char * fileName; - - char * ip; - unsigned int port; - - unsigned int card; - unsigned int device; - - } interface_obj; - - interface_obj * interface_construct(); - - interface_obj * interface_construct_blackhole(); - - interface_obj * interface_construct_file(const char * fileName); - - interface_obj * interface_construct_socket(const char * ip, const unsigned int port); - - interface_obj * interface_construct_soundcard(const unsigned int card, const unsigned int device); - - interface_obj * interface_construct_terminal(void); - - interface_obj * interface_clone(const interface_obj * obj); - - void interface_destroy(interface_obj * obj); - - void interface_printf(const interface_obj * obj); - -#endif \ No newline at end of file diff --git a/src/general/link.c b/src/general/link.c index 5d631f9..f3f16cd 100644 --- a/src/general/link.c +++ b/src/general/link.c @@ -21,7 +21,7 @@ * */ - #include "link.h" + #include links_obj * links_construct_zero(const unsigned int nLinks) { @@ -66,4 +66,4 @@ printf("(%u): %u\n",iLink,obj->array[iLink]); } - } \ No newline at end of file + } diff --git a/src/general/link.h b/src/general/link.h deleted file mode 100644 index 49d968a..0000000 --- a/src/general/link.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef __ODAS_GENERAL_LINK -#define __ODAS_GENERAL_LINK - - /** - * \file link.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct links_obj { - - unsigned int * array; - unsigned int nLinks; - - } links_obj; - - links_obj * links_construct_zero(const unsigned int nLinks); - - links_obj * links_clone(const links_obj * obj); - - void links_destroy(links_obj * obj); - - void links_printf(const links_obj * obj); - -#endif \ No newline at end of file diff --git a/src/general/mic.c b/src/general/mic.c index 0ea36f3..6555369 100644 --- a/src/general/mic.c +++ b/src/general/mic.c @@ -21,7 +21,7 @@ * */ - #include "mic.h" + #include mics_obj * mics_construct_zero(const unsigned int nChannels) { @@ -121,4 +121,4 @@ } - } \ No newline at end of file + } diff --git a/src/general/mic.h b/src/general/mic.h deleted file mode 100644 index 565f680..0000000 --- a/src/general/mic.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef __ODAS_GENERAL_MIC -#define __ODAS_GENERAL_MIC - - /** - * \file mic.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct mics_obj { - - unsigned int nChannels; - unsigned int nPairs; - float * mu; - float * sigma2; - float * direction; - float * thetaAllPass; - float * thetaNoPass; - - } mics_obj; - - mics_obj * mics_construct_zero(const unsigned int nChannels); - - mics_obj * mics_clone(const mics_obj * obj); - - void mics_destroy(mics_obj * obj); - - void mics_printf(const mics_obj * obj); - -#endif \ No newline at end of file diff --git a/src/general/samplerate.c b/src/general/samplerate.c index 1ec35ac..6307c72 100644 --- a/src/general/samplerate.c +++ b/src/general/samplerate.c @@ -21,7 +21,7 @@ * */ - #include "samplerate.h" + #include samplerate_obj * samplerate_construct_zero(void) { @@ -60,4 +60,4 @@ printf("mu = %u\n",obj->mu); printf("sigma2 = %f\n",obj->sigma2); - } \ No newline at end of file + } diff --git a/src/general/samplerate.h b/src/general/samplerate.h deleted file mode 100644 index b92e64e..0000000 --- a/src/general/samplerate.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef __ODAS_GENERAL_SAMPLERATE -#define __ODAS_GENERAL_SAMPLERATE - - /** - * \file samplerate.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - - typedef struct samplerate_obj { - - unsigned int mu; - float sigma2; - - } samplerate_obj; - - samplerate_obj * samplerate_construct_zero(void); - - samplerate_obj * samplerate_clone(const samplerate_obj * obj); - - void samplerate_destroy(samplerate_obj * obj); - - void samplerate_printf(const samplerate_obj * obj); - -#endif \ No newline at end of file diff --git a/src/general/soundspeed.c b/src/general/soundspeed.c index 6e81b5e..746ed90 100644 --- a/src/general/soundspeed.c +++ b/src/general/soundspeed.c @@ -21,7 +21,7 @@ * */ - #include "soundspeed.h" + #include soundspeed_obj * soundspeed_construct_zero(void) { @@ -60,4 +60,4 @@ printf("mu = %f\n",obj->mu); printf("sigma2 = %f\n",obj->sigma2); - } \ No newline at end of file + } diff --git a/src/general/soundspeed.h b/src/general/soundspeed.h deleted file mode 100644 index 3a9224e..0000000 --- a/src/general/soundspeed.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef __ODAS_GENERAL_SOUNDSPEED -#define __ODAS_GENERAL_SOUNDSPEED - - /** - * \file soundspeed.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - - typedef struct soundspeed_obj { - - float mu; - float sigma2; - - } soundspeed_obj; - - soundspeed_obj * soundspeed_construct_zero(void); - - soundspeed_obj * soundspeed_clone(const soundspeed_obj * obj); - - void soundspeed_destroy(soundspeed_obj * obj); - - void soundspeed_printf(const soundspeed_obj * obj); - -#endif \ No newline at end of file diff --git a/src/general/spatialfilter.c b/src/general/spatialfilter.c index 13f41a0..edc4332 100644 --- a/src/general/spatialfilter.c +++ b/src/general/spatialfilter.c @@ -21,7 +21,7 @@ * */ - #include "spatialfilter.h" + #include spatialfilter_obj * spatialfilter_construct_zero(void) { diff --git a/src/general/spatialfilter.h b/src/general/spatialfilter.h deleted file mode 100644 index 6d4910c..0000000 --- a/src/general/spatialfilter.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef __ODAS_SIGNAL_SPATIALFILTER -#define __ODAS_SIGNAL_SPATIALFILTER - - /** - * \file spatialfilter.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct spatialfilter_obj { - - float * direction; - float thetaAllPass; - float thetaNoPass; - - } spatialfilter_obj; - - spatialfilter_obj * spatialfilter_construct_zero(void); - - spatialfilter_obj * spatialfilter_clone(const spatialfilter_obj * obj); - - void spatialfilter_destroy(spatialfilter_obj * obj); - - void spatialfilter_printf(const spatialfilter_obj * obj); - -#endif \ No newline at end of file diff --git a/src/general/thread.c b/src/general/thread.c index 6d8542d..ba697fa 100644 --- a/src/general/thread.c +++ b/src/general/thread.c @@ -21,7 +21,7 @@ * */ - #include "thread.h" + #include thread_obj * thread_construct(void * (* start_routine) (void *), void * arg) { @@ -80,4 +80,4 @@ pthread_join(obj->thread, NULL); } - \ No newline at end of file + diff --git a/src/general/thread.h b/src/general/thread.h deleted file mode 100644 index 656c549..0000000 --- a/src/general/thread.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef __ODAS_GENERAL_THREAD -#define __ODAS_GENERAL_THREAD - - /** - * \file thread.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct thread_obj { - - pthread_mutex_t use; - char stop; - pthread_t thread; - void * (* start_routine) (void *); - void * arg; - - } thread_obj; - - thread_obj * thread_construct(void * (* start_routine) (void *), void * arg); - - void thread_destroy(thread_obj * obj); - - void thread_start(thread_obj * obj); - - void thread_stop(thread_obj * obj); - - char thread_askedToStop(thread_obj * obj); - - void thread_join(thread_obj * obj); - -#endif \ No newline at end of file diff --git a/src/init/combining.c b/src/init/combining.c index 646c474..769243c 100644 --- a/src/init/combining.c +++ b/src/init/combining.c @@ -21,7 +21,7 @@ * */ - #include "combining.h" + #include assignations_obj * combining_generate(const unsigned int nPots, const unsigned int nTracks) { diff --git a/src/init/combining.h b/src/init/combining.h deleted file mode 100644 index efec681..0000000 --- a/src/init/combining.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef __ODAS_INIT_COMBINING -#define __ODAS_INIT_COMBINING - - /** - * \file combining.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include "../signal/assignation.h" - - assignations_obj * combining_generate(const unsigned int nPots, const unsigned int nTracks); - -#endif \ No newline at end of file diff --git a/src/init/delay.c b/src/init/delay.c index 3c8bebd..baa8359 100644 --- a/src/init/delay.c +++ b/src/init/delay.c @@ -21,7 +21,7 @@ * */ - #include "delay.h" + #include tdoas_obj * delay_tdoas(const points_obj * points, const mics_obj * mics, const soundspeed_obj * soundspeed, const unsigned int fS, const unsigned int frameSize, const unsigned int interpRate) { @@ -167,4 +167,4 @@ return obj; - } \ No newline at end of file + } diff --git a/src/init/delay.h b/src/init/delay.h deleted file mode 100644 index 5131e59..0000000 --- a/src/init/delay.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef __ODAS_INIT_DELAY -#define __ODAS_INIT_DELAY - - /** - * \file delay.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - - #include "../general/mic.h" - #include "../general/soundspeed.h" - - #include "../signal/delta.h" - #include "../signal/point.h" - #include "../signal/tdoa.h" - #include "../signal/tau.h" - - tdoas_obj * delay_tdoas(const points_obj * points, const mics_obj * mics, const soundspeed_obj * soundspeed, const unsigned int fS, const unsigned int frameSize, const unsigned int interpRate); - - //tdoas_obj * delay_tdoas_minmax(const tdoas_obj * tdoas, const deltas_obj * deltas); - - //void delay_tdoas_allminmax(tdoas_obj * tdoas, const tdoas_obj * minmax); - - taus_obj * delay_taus(const points_obj * points, const mics_obj * mics, const soundspeed_obj * soundspeed, const unsigned int fS, const unsigned int frameSize, const unsigned int interpRate); - -#endif - - \ No newline at end of file diff --git a/src/init/directivity.c b/src/init/directivity.c index 3ebc347..01e4e95 100644 --- a/src/init/directivity.c +++ b/src/init/directivity.c @@ -21,7 +21,7 @@ * */ - #include "directivity.h" + #include beampatterns_obj * directivity_beampattern_mics(const mics_obj * mics, const unsigned int nThetas) { @@ -350,4 +350,4 @@ } - } \ No newline at end of file + } diff --git a/src/init/directivity.h b/src/init/directivity.h deleted file mode 100644 index 194b836..0000000 --- a/src/init/directivity.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef __ODAS_INIT_DIRECTIVITY -#define __ODAS_INIT_DIRECTIVITY - - /** - * \file directivity.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - - #include "../general/mic.h" - #include "../general/spatialfilter.h" - - #include "../signal/beampattern.h" - #include "../signal/pair.h" - #include "../signal/point.h" - #include "../signal/spatialgain.h" - #include "../signal/spatialindex.h" - #include "../signal/spatialmask.h" - - beampatterns_obj * directivity_beampattern_mics(const mics_obj * mics, const unsigned int nThetas); - - beampatterns_obj * directivity_beampattern_spatialfilter(const spatialfilter_obj * spatialfilter, const unsigned int nThetas); - - spatialgains_obj * directivity_spatialgains(const mics_obj * mics, const beampatterns_obj * beampatterns_mics, const spatialfilter_obj * spatialfilter, const beampatterns_obj * beampatterns_spatialfilter, const points_obj * points); - - spatialmasks_obj * directivity_spatialmasks(const spatialgains_obj * spatialgains, const float minGain); - - spatialindexes_obj * directivity_spatialindexes(const spatialmasks_obj * spatialmasks); - - pairs_obj * directivity_pairs(const spatialmasks_obj * spatialmasks); - - void directivity_pairsadd(pairs_obj * destPairs, const pairs_obj * srcPairs); - -#endif \ No newline at end of file diff --git a/src/init/hit.c b/src/init/hit.c index 4245a43..eddf6f7 100644 --- a/src/init/hit.c +++ b/src/init/hit.c @@ -21,7 +21,7 @@ * */ - #include "hit.h" + #include areas_obj * hit_areas_zero(const taus_obj * taus, const tdoas_obj * tdoas, const deltas_obj * deltas) { @@ -307,4 +307,4 @@ return deltas; - } \ No newline at end of file + } diff --git a/src/init/hit.h b/src/init/hit.h deleted file mode 100644 index 3209ada..0000000 --- a/src/init/hit.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef __ODAS_INIT_HIT -#define __ODAS_INIT_HIT - - /** - * \file hit.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - - #include "../signal/area.h" - #include "../signal/tau.h" - #include "../signal/tdoa.h" - #include "../signal/delta.h" - #include "../signal/spatialmask.h" - - areas_obj * hit_areas_zero(const taus_obj * taus, const tdoas_obj * tdoas, const deltas_obj * deltas); - - void hit_areas_pair(areas_obj * areas, const taus_obj * taus, const tdoas_obj * tdoas, const deltas_obj * deltas, const spatialmasks_obj * spatialmasks, const unsigned int iPair); - - float hit_areas_min(const areas_obj * areas, const spatialmasks_obj * spatialmasks); - - area_obj * hit_area_zero(const taus_obj * taus, const tdoas_obj * tdoas, const deltas_obj * deltas); - - void hit_area_pair(area_obj * area, const areas_obj * areas, const taus_obj * taus, const tdoas_obj * tdoas, const deltas_obj * deltas, const spatialmasks_obj * spatialmasks, const unsigned int iPair); - - deltas_obj * hit_train(const taus_obj * taus, const tdoas_obj * tdoas, const spatialmasks_obj * spatialmasks, const float probMin); - - deltas_obj * hit_constant(const tdoas_obj * tdoas, const unsigned int delta); - -#endif diff --git a/src/init/linking.c b/src/init/linking.c index e56b63b..bf868dd 100644 --- a/src/init/linking.c +++ b/src/init/linking.c @@ -21,7 +21,7 @@ * */ - #include "linking.h" + #include maps_obj * linking_maps(const tdoas_obj * tdoasCoarse, const tdoas_obj * tdoasFine, const deltas_obj * deltasCoarse, const deltas_obj * deltasFine, const spatialmasks_obj * spatialmasksCoarse, const spatialmasks_obj * spatialmasksFine, const unsigned int nMatches) { @@ -249,4 +249,4 @@ return overlap; - } \ No newline at end of file + } diff --git a/src/init/linking.h b/src/init/linking.h deleted file mode 100644 index b6effca..0000000 --- a/src/init/linking.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef __ODAS_INIT_LINKING -#define __ODAS_INIT_LINKING - - /** - * \file linking.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - #include "../signal/delta.h" - #include "../signal/index.h" - #include "../signal/map.h" - #include "../signal/tdoa.h" - #include "../signal/spatialmask.h" - - maps_obj * linking_maps(const tdoas_obj * tdoasCoarse, const tdoas_obj * tdoasFine, const deltas_obj * deltasCoarse, const deltas_obj * deltasFine, const spatialmasks_obj * spatialmasksCoarse, const spatialmasks_obj * spatialmasksFine, const unsigned int nMatches); - - indexes_obj * linking_indexes(const maps_obj * maps); - - float linking_overlap(const float lambdaCoarseLeft, const float lambdaCoarseRight, const float lambdaFineLeft, const float lambdaFineRight); - -#endif \ No newline at end of file diff --git a/src/init/scanning.c b/src/init/scanning.c index d32f2c3..f1bac15 100644 --- a/src/init/scanning.c +++ b/src/init/scanning.c @@ -21,7 +21,7 @@ * */ - #include "scanning.h" + #include scans_obj * scanning_init_scans(const mics_obj * mics, const spatialfilter_obj * spatialfilter, const unsigned int nLevels, const unsigned int * levels, const unsigned int fS, const soundspeed_obj * soundspeed, const unsigned int nMatches, const unsigned int frameSize, const signed int * deltas, const float probMin, const unsigned int nRefineLevels, const unsigned int nThetas, const float gainMin, const unsigned int interpRate) { diff --git a/src/init/scanning.h b/src/init/scanning.h deleted file mode 100644 index 0a5e9d2..0000000 --- a/src/init/scanning.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef __ODAS_INIT_SCANNING -#define __ODAS_INIT_SCANNING - - /** - * \file scanning.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../general/mic.h" - #include "../general/soundspeed.h" - #include "../general/spatialfilter.h" - - #include "../signal/beampattern.h" - #include "../signal/scan.h" - #include "../signal/spatialgain.h" - #include "../signal/spatialindex.h" - #include "../signal/spatialmask.h" - #include "../signal/map.h" - #include "../signal/pair.h" - #include "../signal/tau.h" - - #include "../init/delay.h" - #include "../init/directivity.h" - #include "../init/hit.h" - #include "../init/linking.h" - #include "../init/space.h" - - scans_obj * scanning_init_scans(const mics_obj * mics, const spatialfilter_obj * spatialfilter, const unsigned int nLevels, const unsigned int * levels, const unsigned int fS, const soundspeed_obj * soundspeed, const unsigned int nMatches, const unsigned int frameSize, const signed int * deltas, const float probMin, const unsigned int nRefineLevels, const unsigned int nThetas, const float gainMin, const unsigned int interpRate); - -#endif \ No newline at end of file diff --git a/src/init/space.c b/src/init/space.c index 82b284d..b0f7d1e 100644 --- a/src/init/space.c +++ b/src/init/space.c @@ -21,7 +21,7 @@ * */ - #include "space.h" + #include triangles_obj * space_triangles_level_zero(void) { @@ -869,4 +869,4 @@ return shortestDistance; - } \ No newline at end of file + } diff --git a/src/init/space.h b/src/init/space.h deleted file mode 100644 index 27b1d6c..0000000 --- a/src/init/space.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef __ODAS_INIT_SPACE -#define __ODAS_INIT_SPACE - - /** - * \file space.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - #include "../signal/triangle.h" - #include "../signal/point.h" - - triangles_obj * space_triangles_level_zero(void); - - triangles_obj * space_triangles_level_next(const triangles_obj * triangles); - - triangles_obj * space_triangles_level_level(const unsigned int level); - - triangles_obj * space_triangles_points(const points_obj * points, const unsigned int index); - - points_obj * space_points_triangles(const triangles_obj * triangles); - - points_obj * space_points_fine(const points_obj * points, const unsigned int level); - - points_obj * space_sphere(const unsigned int level); - - points_obj * space_halfsphere(const unsigned int level); - - float space_distances_shortest_triangles(const triangles_obj * triangles); - - float space_distances_shortest_points(const points_obj * points); - -#endif \ No newline at end of file diff --git a/src/init/windowing.c b/src/init/windowing.c index 69da4e0..efd6d91 100644 --- a/src/init/windowing.c +++ b/src/init/windowing.c @@ -21,7 +21,7 @@ * */ - #include "windowing.h" + #include window_obj * windowing_hann(const unsigned int frameSize) { diff --git a/src/init/windowing.h b/src/init/windowing.h deleted file mode 100644 index db25ee8..0000000 --- a/src/init/windowing.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef __ODAS_INIT_WINDOWING -#define __ODAS_INIT_WINDOWING - - /** - * \file windowing.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - - #include "../signal/window.h" - - window_obj * windowing_hann(const unsigned int frameSize); - - window_obj * windowing_roothann(const unsigned int frameSize); - -#endif - - \ No newline at end of file diff --git a/src/injector/inj_targets.c b/src/injector/inj_targets.c index 9aed12c..90633f6 100644 --- a/src/injector/inj_targets.c +++ b/src/injector/inj_targets.c @@ -21,7 +21,7 @@ * */ - #include "inj_targets.h" + #include inj_targets_obj * inj_targets_construct(const inj_targets_cfg * inj_targets_config, const msg_hops_cfg * msg_hops_config, const msg_targets_cfg * msg_targets_config) { @@ -129,4 +129,4 @@ - } \ No newline at end of file + } diff --git a/src/injector/inj_targets.h b/src/injector/inj_targets.h deleted file mode 100644 index 6dacfd7..0000000 --- a/src/injector/inj_targets.h +++ /dev/null @@ -1,73 +0,0 @@ -#ifndef __ODAS_INJECTOR_TARGETS -#define __ODAS_INJECTOR_TARGETS - - /** - * \file inj_targets.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../message/msg_hops.h" - #include "../message/msg_targets.h" - - #include "../general/format.h" - #include "../general/interface.h" - - #include - #include - #include - - typedef struct inj_targets_obj { - - unsigned long long timeStamp; - - unsigned int nTargets; - unsigned int fS; - - msg_hops_obj * in; - msg_targets_obj * out; - - targets_obj * targets; - - } inj_targets_obj; - - typedef struct inj_targets_cfg { - - unsigned int nTargets; - targets_obj * targets; - - } inj_targets_cfg; - - inj_targets_obj * inj_targets_construct(const inj_targets_cfg * inj_targets_config, const msg_hops_cfg * msg_hops_config, const msg_targets_cfg * msg_targets_config); - - void inj_targets_destroy(inj_targets_obj * obj); - - void inj_targets_connect(inj_targets_obj * obj, msg_hops_obj * in, msg_targets_obj * out); - - void inj_targets_disconnect(inj_targets_obj * obj); - - int inj_targets_process(inj_targets_obj * obj); - - inj_targets_cfg * inj_targets_cfg_construct(void); - - void inj_targets_cfg_destroy(inj_targets_cfg * cfg); - - void inj_targets_cfg_printf(const inj_targets_cfg * cfg); - -#endif \ No newline at end of file diff --git a/src/message/msg_categories.c b/src/message/msg_categories.c index 453d497..8e932ad 100644 --- a/src/message/msg_categories.c +++ b/src/message/msg_categories.c @@ -21,7 +21,7 @@ * */ - #include "msg_categories.h" + #include msg_categories_obj * msg_categories_construct(const msg_categories_cfg * msg_categories_config) { diff --git a/src/message/msg_categories.h b/src/message/msg_categories.h deleted file mode 100644 index f1271ed..0000000 --- a/src/message/msg_categories.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef __ODAS_MESSAGE_CATEGORIES -#define __ODAS_MESSAGE_CATEGORIES - - /** - * \file msg_categories.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include "../signal/category.h" - - typedef struct msg_categories_obj { - - unsigned long long timeStamp; - unsigned int fS; - categories_obj * categories; - - } msg_categories_obj; - - typedef struct msg_categories_cfg { - - unsigned int nChannels; - unsigned int fS; - - } msg_categories_cfg; - - msg_categories_obj * msg_categories_construct(const msg_categories_cfg * msg_categories_config); - - void msg_categories_destroy(msg_categories_obj * obj); - - void msg_categories_copy(msg_categories_obj * dest, const msg_categories_obj * src); - - void msg_categories_zero(msg_categories_obj * obj); - - unsigned int msg_categories_isZero(const msg_categories_obj * obj); - - msg_categories_cfg * msg_categories_cfg_construct(void); - - void msg_categories_cfg_destroy(msg_categories_cfg * msg_categories_config); - - void msg_categories_cfg_printf(const msg_categories_cfg * msg_categories_config); - -#endif \ No newline at end of file diff --git a/src/message/msg_hops.c b/src/message/msg_hops.c index 63f14bd..90edcfe 100644 --- a/src/message/msg_hops.c +++ b/src/message/msg_hops.c @@ -21,7 +21,7 @@ * */ - #include "msg_hops.h" + #include msg_hops_obj * msg_hops_construct(const msg_hops_cfg * msg_hops_config) { diff --git a/src/message/msg_hops.h b/src/message/msg_hops.h deleted file mode 100644 index 8deff09..0000000 --- a/src/message/msg_hops.h +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef __ODAS_MESSAGE_HOPS -#define __ODAS_MESSAGE_HOPS - - /** - * \file msg_hops.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include "../signal/hop.h" - #include "../utils/fifo.h" - - typedef struct msg_hops_obj { - - unsigned long long timeStamp; - unsigned int fS; - hops_obj * hops; - - } msg_hops_obj; - - typedef struct msg_hops_cfg { - - unsigned int hopSize; - unsigned int nChannels; - unsigned int fS; - - } msg_hops_cfg; - - msg_hops_obj * msg_hops_construct(const msg_hops_cfg * msg_hops_config); - - void msg_hops_destroy(msg_hops_obj * obj); - - void msg_hops_copy(msg_hops_obj * dest, const msg_hops_obj * src); - - void msg_hops_zero(msg_hops_obj * obj); - - unsigned int msg_hops_isZero(const msg_hops_obj * obj); - - msg_hops_cfg * msg_hops_cfg_construct(void); - - void msg_hops_cfg_destroy(msg_hops_cfg * msg_hops_config); - - void msg_hops_cfg_printf(const msg_hops_cfg * msg_hops_config); - -#endif \ No newline at end of file diff --git a/src/message/msg_pots.c b/src/message/msg_pots.c index bbaa8fc..baa5324 100644 --- a/src/message/msg_pots.c +++ b/src/message/msg_pots.c @@ -21,7 +21,7 @@ * */ - #include "msg_pots.h" + #include msg_pots_obj * msg_pots_construct(const msg_pots_cfg * cfg) { @@ -99,4 +99,4 @@ printf("nPots = %u\n", msg_pots_config->nPots); printf("fS = %u\n", msg_pots_config->fS); - } \ No newline at end of file + } diff --git a/src/message/msg_pots.h b/src/message/msg_pots.h deleted file mode 100644 index a4e6d14..0000000 --- a/src/message/msg_pots.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef __ODAS_MESSAGE_POTS -#define __ODAS_MESSAGE_POTS - - /** - * \file msg_pots.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include "../signal/pot.h" - - typedef struct msg_pots_obj { - - unsigned long long timeStamp; - unsigned int fS; - pots_obj * pots; - - } msg_pots_obj; - - typedef struct msg_pots_cfg { - - unsigned int nPots; - unsigned int fS; - - } msg_pots_cfg; - - msg_pots_obj * msg_pots_construct(const msg_pots_cfg * cfg); - - void msg_pots_destroy(msg_pots_obj * obj); - - void msg_pots_copy(msg_pots_obj * dest, const msg_pots_obj * src); - - void msg_pots_zero(msg_pots_obj * obj); - - unsigned int msg_pots_isZero(const msg_pots_obj * obj); - - msg_pots_cfg * msg_pots_cfg_construct(void); - - void msg_pots_cfg_destroy(msg_pots_cfg * cfg); - - void msg_pots_cfg_printf(const msg_pots_cfg * msg_pots_config); - -#endif \ No newline at end of file diff --git a/src/message/msg_powers.c b/src/message/msg_powers.c index b3796c5..0901bcb 100644 --- a/src/message/msg_powers.c +++ b/src/message/msg_powers.c @@ -21,7 +21,7 @@ * */ - #include "msg_powers.h" + #include msg_powers_obj * msg_powers_construct(const msg_powers_cfg * msg_powers_config) { @@ -110,4 +110,4 @@ } - } \ No newline at end of file + } diff --git a/src/message/msg_powers.h b/src/message/msg_powers.h deleted file mode 100644 index a8a1a54..0000000 --- a/src/message/msg_powers.h +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef __ODAS_MESSAGE_POWERS -#define __ODAS_MESSAGE_POWERS - - /** - * \file msg_powers.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - - #include "../signal/env.h" - - typedef struct msg_powers_obj { - - unsigned long long timeStamp; - unsigned int fS; - envs_obj * envs; - - } msg_powers_obj; - - typedef struct msg_powers_cfg { - - unsigned int halfFrameSize; - unsigned int nChannels; - unsigned int fS; - - } msg_powers_cfg; - - msg_powers_obj * msg_powers_construct(const msg_powers_cfg * msg_powers_config); - - void msg_powers_destroy(msg_powers_obj * obj); - - void msg_powers_copy(msg_powers_obj * dest, const msg_powers_obj * src); - - void msg_powers_zero(msg_powers_obj * obj); - - unsigned int msg_powers_isZero(const msg_powers_obj * obj); - - msg_powers_cfg * msg_powers_cfg_construct(void); - - void msg_powers_cfg_destroy(msg_powers_cfg * msg_powers_config); - - void msg_powers_cfg_printf(const msg_powers_cfg * msg_powers_config); - -#endif \ No newline at end of file diff --git a/src/message/msg_spectra.c b/src/message/msg_spectra.c index 60473f7..17b02eb 100644 --- a/src/message/msg_spectra.c +++ b/src/message/msg_spectra.c @@ -21,7 +21,7 @@ * */ - #include "msg_spectra.h" + #include msg_spectra_obj * msg_spectra_construct(const msg_spectra_cfg * msg_spectra_config) { @@ -110,4 +110,4 @@ } - } \ No newline at end of file + } diff --git a/src/message/msg_spectra.h b/src/message/msg_spectra.h deleted file mode 100644 index 1615786..0000000 --- a/src/message/msg_spectra.h +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef __ODAS_MESSAGE_SPECTRA -#define __ODAS_MESSAGE_SPECTRA - - /** - * \file msg_spectra.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - - #include "../signal/freq.h" - - typedef struct msg_spectra_obj { - - unsigned long long timeStamp; - unsigned int fS; - freqs_obj * freqs; - - } msg_spectra_obj; - - typedef struct msg_spectra_cfg { - - unsigned int halfFrameSize; - unsigned int nChannels; - unsigned int fS; - - } msg_spectra_cfg; - - msg_spectra_obj * msg_spectra_construct(const msg_spectra_cfg * msg_spectra_config); - - void msg_spectra_destroy(msg_spectra_obj * obj); - - void msg_spectra_copy(msg_spectra_obj * dest, const msg_spectra_obj * src); - - void msg_spectra_zero(msg_spectra_obj * obj); - - unsigned int msg_spectra_isZero(const msg_spectra_obj * obj); - - msg_spectra_cfg * msg_spectra_cfg_construct(void); - - void msg_spectra_cfg_destroy(msg_spectra_cfg * msg_spectra_config); - - void msg_spectra_cfg_printf(const msg_spectra_cfg * msg_spectra_config); - -#endif \ No newline at end of file diff --git a/src/message/msg_targets.c b/src/message/msg_targets.c index e4dd76a..d224082 100644 --- a/src/message/msg_targets.c +++ b/src/message/msg_targets.c @@ -21,7 +21,7 @@ * */ - #include "msg_targets.h" + #include msg_targets_obj * msg_targets_construct(const msg_targets_cfg * cfg) { @@ -99,4 +99,4 @@ printf("nTargets = %u\n", msg_targets_config->nTargets); printf("fS = %u\n", msg_targets_config->fS); - } \ No newline at end of file + } diff --git a/src/message/msg_targets.h b/src/message/msg_targets.h deleted file mode 100644 index d614d81..0000000 --- a/src/message/msg_targets.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef __ODAS_MESSAGE_TARGETS -#define __ODAS_MESSAGE_TARGETS - - /** - * \file msg_targets.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include "../signal/target.h" - - typedef struct msg_targets_obj { - - unsigned long long timeStamp; - unsigned int fS; - targets_obj * targets; - - } msg_targets_obj; - - typedef struct msg_targets_cfg { - - unsigned int nTargets; - unsigned int fS; - - } msg_targets_cfg; - - msg_targets_obj * msg_targets_construct(const msg_targets_cfg * cfg); - - void msg_targets_destroy(msg_targets_obj * obj); - - void msg_targets_copy(msg_targets_obj * dest, const msg_targets_obj * src); - - void msg_targets_zero(msg_targets_obj * obj); - - unsigned int msg_targets_isZero(const msg_targets_obj * obj); - - msg_targets_cfg * msg_targets_cfg_construct(void); - - void msg_targets_cfg_destroy(msg_targets_cfg * cfg); - - void msg_targets_cfg_printf(const msg_targets_cfg * msg_targets_config); - -#endif \ No newline at end of file diff --git a/src/message/msg_tracks.c b/src/message/msg_tracks.c index c4af61a..4d76689 100644 --- a/src/message/msg_tracks.c +++ b/src/message/msg_tracks.c @@ -21,7 +21,7 @@ * */ - #include "msg_tracks.h" + #include msg_tracks_obj * msg_tracks_construct(const msg_tracks_cfg * cfg) { @@ -98,4 +98,4 @@ printf("nTracks = %u\n", msg_tracks_config->nTracks); printf("fS = %u\n", msg_tracks_config->fS); - } \ No newline at end of file + } diff --git a/src/message/msg_tracks.h b/src/message/msg_tracks.h deleted file mode 100644 index fc54fe7..0000000 --- a/src/message/msg_tracks.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef __ODAS_MESSAGE_TRACKS -#define __ODAS_MESSAGE_TRACKS - - /** - * \file msg_tracks.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include "../signal/track.h" - - typedef struct msg_tracks_obj { - - unsigned long long timeStamp; - unsigned int fS; - tracks_obj * tracks; - - } msg_tracks_obj; - - typedef struct msg_tracks_cfg { - - unsigned int nTracks; - unsigned int fS; - - } msg_tracks_cfg; - - msg_tracks_obj * msg_tracks_construct(const msg_tracks_cfg * cfg); - - void msg_tracks_destroy(msg_tracks_obj * obj); - - void msg_tracks_copy(msg_tracks_obj * dest, const msg_tracks_obj * src); - - void msg_tracks_zero(msg_tracks_obj * obj); - - unsigned int msg_tracks_isZero(const msg_tracks_obj * obj); - - msg_tracks_cfg * msg_tracks_cfg_construct(void); - - void msg_tracks_cfg_destroy(msg_tracks_cfg * cfg); - - void msg_tracks_cfg_printf(const msg_tracks_cfg * msg_tracks_config); - -#endif \ No newline at end of file diff --git a/src/module/mod_classify.c b/src/module/mod_classify.c index 32efe6e..082ca67 100644 --- a/src/module/mod_classify.c +++ b/src/module/mod_classify.c @@ -21,7 +21,7 @@ * */ - #include "mod_classify.h" + #include mod_classify_obj * mod_classify_construct(const mod_classify_cfg * mod_classify_config, const msg_hops_cfg * msg_hops_config, const msg_tracks_cfg * msg_tracks_config, const msg_categories_cfg * msg_categories_config) { @@ -155,4 +155,4 @@ void mod_classify_cfg_printf(const mod_classify_cfg * cfg) { - } \ No newline at end of file + } diff --git a/src/module/mod_classify.h b/src/module/mod_classify.h deleted file mode 100644 index 9adda28..0000000 --- a/src/module/mod_classify.h +++ /dev/null @@ -1,96 +0,0 @@ -#ifndef __ODAS_MODULE_CLASSIFY -#define __ODAS_MODULE_CLASSIFY - - /** - * \file mod_classify.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - - #include "../message/msg_hops.h" - #include "../message/msg_tracks.h" - #include "../message/msg_categories.h" - - #include "../signal/acorr.h" - #include "../signal/category.h" - #include "../signal/frame.h" - #include "../signal/freq.h" - #include "../signal/hop.h" - #include "../signal/pitch.h" - - #include "../system/acorr2pitch.h" - #include "../system/frame2freq.h" - #include "../system/freq2acorr.h" - #include "../system/hop2frame.h" - #include "../system/pitch2category.h" - - typedef struct mod_classify_obj { - - frames_obj * frames; - freqs_obj * freqs; - acorrs_obj * acorrs; - pitches_obj * pitches; - - hop2frame_obj * hop2frame; - frame2freq_obj * frame2freq; - freq2acorr_obj * freq2acorr; - acorr2pitch_obj * acorr2pitch; - pitch2category_obj * pitch2category; - - msg_hops_obj * in1; - msg_tracks_obj * in2; - msg_categories_obj * out; - - } mod_classify_obj; - - typedef struct mod_classify_cfg { - - unsigned int frameSize; - unsigned int winSize; - - float tauMin; - float tauMax; - float deltaTauMax; - float alpha; - float gamma; - float phiMin; - float r0; - - } mod_classify_cfg; - - mod_classify_obj * mod_classify_construct(const mod_classify_cfg * mod_classify_config, const msg_hops_cfg * msg_hops_config, const msg_tracks_cfg * msg_tracks_config, const msg_categories_cfg * msg_categories_config); - - void mod_classify_destroy(mod_classify_obj * obj); - - int mod_classify_process(mod_classify_obj * obj); - - void mod_classify_connect(mod_classify_obj * obj, msg_hops_obj * in1, msg_tracks_obj * in2, msg_categories_obj * out); - - void mod_classify_disconnect(mod_classify_obj * obj); - - mod_classify_cfg * mod_classify_cfg_construct(void); - - void mod_classify_cfg_destroy(mod_classify_cfg * cfg); - - void mod_classify_cfg_printf(const mod_classify_cfg * cfg); - -#endif \ No newline at end of file diff --git a/src/module/mod_istft.c b/src/module/mod_istft.c index 33c0425..e5d97bf 100644 --- a/src/module/mod_istft.c +++ b/src/module/mod_istft.c @@ -21,7 +21,7 @@ * */ - #include "mod_istft.h" + #include mod_istft_obj * mod_istft_construct(const mod_istft_cfg * mod_istft_config, const msg_spectra_cfg * msg_spectra_config, const msg_hops_cfg * msg_hops_config) { @@ -108,4 +108,4 @@ void mod_istft_cfg_printf(const mod_istft_cfg * cfg) { - } \ No newline at end of file + } diff --git a/src/module/mod_istft.h b/src/module/mod_istft.h deleted file mode 100644 index 0d5e09b..0000000 --- a/src/module/mod_istft.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef __ODAS_MODULE_ISTFT -#define __ODAS_MODULE_ISTFT - - /** - * \file mod_istft.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../system/freq2frame.h" - #include "../signal/frame.h" - #include "../system/frame2hop.h" - - #include "../message/msg_hops.h" - #include "../message/msg_spectra.h" - - typedef struct mod_istft_obj { - - freq2frame_obj * freq2frame; - frames_obj * frames; - frame2hop_obj * frame2hop; - - msg_spectra_obj * in; - msg_hops_obj * out; - - } mod_istft_obj; - - typedef struct mod_istft_cfg { - - } mod_istft_cfg; - - mod_istft_obj * mod_istft_construct(const mod_istft_cfg * mod_istft_config, const msg_spectra_cfg * msg_spectra_config, const msg_hops_cfg * msg_hops_config); - - void mod_istft_destroy(mod_istft_obj * obj); - - int mod_istft_process(mod_istft_obj * obj); - - void mod_istft_connect(mod_istft_obj * obj, msg_spectra_obj * in, msg_hops_obj * out); - - void mod_istft_disconnect(mod_istft_obj * obj); - - mod_istft_cfg * mod_istft_cfg_construct(void); - - void mod_istft_cfg_destroy(mod_istft_cfg * cfg); - - void mod_istft_cfg_printf(const mod_istft_cfg * cfg); - -#endif \ No newline at end of file diff --git a/src/module/mod_mapping.c b/src/module/mod_mapping.c index 14f52b2..8e124c1 100644 --- a/src/module/mod_mapping.c +++ b/src/module/mod_mapping.c @@ -21,7 +21,7 @@ * */ - #include "mod_mapping.h" + #include mod_mapping_obj * mod_mapping_construct(const mod_mapping_cfg * mod_mapping_config, const msg_hops_cfg * msg_hops_config) { @@ -116,4 +116,4 @@ printf("links:"); links_printf(cfg->links); - } \ No newline at end of file + } diff --git a/src/module/mod_mapping.h b/src/module/mod_mapping.h deleted file mode 100644 index 318e217..0000000 --- a/src/module/mod_mapping.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef __ODAS_MODULE_MAPPING -#define __ODAS_MODULE_MAPPING - - /** - * \file mod_mapping.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../message/msg_hops.h" - #include "../message/msg_spectra.h" - - #include "../general/link.h" - #include "../system/hop2hop.h" - - typedef struct mod_mapping_obj { - - hop2hop_multiplex_obj * hop2hop_multiplex; - links_obj * links; - - msg_hops_obj * in; - msg_hops_obj * out; - - } mod_mapping_obj; - - typedef struct mod_mapping_cfg { - - links_obj * links; - - } mod_mapping_cfg; - - mod_mapping_obj * mod_mapping_construct(const mod_mapping_cfg * mod_mapping_config, const msg_hops_cfg * msg_hops_config); - - void mod_mapping_destroy(mod_mapping_obj * obj); - - int mod_mapping_process(mod_mapping_obj * obj); - - void mod_mapping_connect(mod_mapping_obj * obj, msg_hops_obj * in, msg_hops_obj * out); - - void mod_mapping_disconnect(mod_mapping_obj * obj); - - mod_mapping_cfg * mod_mapping_cfg_construct(void); - - void mod_mapping_cfg_destroy(mod_mapping_cfg * cfg); - - void mod_mapping_cfg_printf(const mod_mapping_cfg * cfg); - -#endif \ No newline at end of file diff --git a/src/module/mod_noise.c b/src/module/mod_noise.c index b6c806d..e820e70 100644 --- a/src/module/mod_noise.c +++ b/src/module/mod_noise.c @@ -21,7 +21,7 @@ * */ - #include "mod_noise.h" + #include mod_noise_obj * mod_noise_construct(const mod_noise_cfg * mod_noise_config, const msg_spectra_cfg * msg_spectra_config, const msg_powers_cfg * msg_powers_config) { @@ -126,4 +126,4 @@ - } \ No newline at end of file + } diff --git a/src/module/mod_noise.h b/src/module/mod_noise.h deleted file mode 100644 index 7a4dcfe..0000000 --- a/src/module/mod_noise.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef __ODAS_MODULE_NOISE -#define __ODAS_MODULE_NOISE - - /** - * \file mod_noise.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../system/freq2env.h" - #include "../system/env2env.h" - #include "../message/msg_spectra.h" - #include "../message/msg_powers.h" - - typedef struct mod_noise_obj { - - freq2env_obj * freq2env; - envs_obj * envs; - env2env_mcra_obj * env2env_mcra; - - msg_spectra_obj * in; - msg_powers_obj * out; - - } mod_noise_obj; - - typedef struct mod_noise_cfg { - - unsigned int bSize; - float alphaS; - unsigned int L; - float delta; - float alphaD; - - } mod_noise_cfg; - - mod_noise_obj * mod_noise_construct(const mod_noise_cfg * mod_noise_config, const msg_spectra_cfg * msg_spectra_config, const msg_powers_cfg * msg_powers_config); - - void mod_noise_destroy(mod_noise_obj * obj); - - int mod_noise_process(mod_noise_obj * obj); - - void mod_noise_connect(mod_noise_obj * obj, msg_spectra_obj * in, msg_powers_obj * out); - - void mod_noise_disconnect(mod_noise_obj * obj); - - mod_noise_cfg * mod_noise_cfg_construct(void); - - void mod_noise_cfg_destroy(mod_noise_cfg * cfg); - - void mod_noise_cfg_printf(const mod_noise_cfg * cfg); - -#endif \ No newline at end of file diff --git a/src/module/mod_resample.c b/src/module/mod_resample.c index f9789d2..960b725 100644 --- a/src/module/mod_resample.c +++ b/src/module/mod_resample.c @@ -21,7 +21,7 @@ * */ - #include "mod_resample.h" + #include mod_resample_obj * mod_resample_construct(const mod_resample_cfg * mod_resample_config, const msg_hops_cfg * msg_hops_in_config, const msg_hops_cfg * msg_hops_out_config) { diff --git a/src/module/mod_resample.h b/src/module/mod_resample.h deleted file mode 100644 index da22629..0000000 --- a/src/module/mod_resample.h +++ /dev/null @@ -1,117 +0,0 @@ -#ifndef __ODAS_MODULE_RS -#define __ODAS_MODULE_RS - - /** - * \file mod_rs.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - - #include "../message/msg_hops.h" - - #include "../signal/hop.h" - #include "../signal/frame.h" - #include "../signal/freq.h" - - #include "../system/hop2frame.h" - #include "../system/hop2hop.h" - #include "../system/frame2freq.h" - #include "../system/freq2freq.h" - #include "../system/freq2frame.h" - #include "../system/frame2hop.h" - - #include - #include - #include - - typedef struct mod_resample_obj { - - unsigned long long timeStamp; - char noMorePush; - - char type; - - unsigned int nChannels; - unsigned int fSin; - unsigned int fSout; - unsigned int hopSizeIn; - unsigned int hopSizeOut; - float ratio; - - unsigned int frameSize; - unsigned int halfFrameSize; - unsigned int lowPassCut; - - hop2hop_buffer_obj * hop2hop; - - hop2frame_obj * hop2frame; - frames_obj * framesAnalysis; - frame2freq_obj * frame2freq; - freqs_obj * freqsAnalysis; - freq2freq_lowpass_obj * freq2freq_lowpass; - freqs_obj * freqsSynthesis; - freq2frame_obj * freq2frame; - frames_obj * framesSynthesis; - frame2hop_obj * frame2hop; - hops_obj * hops; - - msg_hops_obj * in; - msg_hops_obj * out; - - } mod_resample_obj; - - typedef struct mod_resample_cfg { - - unsigned int fSin; - unsigned int fSout; - - } mod_resample_cfg; - - mod_resample_obj * mod_resample_construct(const mod_resample_cfg * mod_resample_config, const msg_hops_cfg * msg_hops_in_config, const msg_hops_cfg * msg_hops_out_config); - - void mod_resample_destroy(mod_resample_obj * obj); - - int mod_resample_process_push(mod_resample_obj * obj); - - int mod_resample_process_pop(mod_resample_obj * obj); - - int mod_resample_process_push_down(mod_resample_obj * obj); - - int mod_resample_process_push_up(mod_resample_obj * obj); - - int mod_resample_process_push_same(mod_resample_obj * obj); - - int mod_resample_process_pop_down(mod_resample_obj * obj); - - int mod_resample_process_pop_up(mod_resample_obj * obj); - - int mod_resample_process_pop_same(mod_resample_obj * obj); - - void mod_resample_connect(mod_resample_obj * obj, msg_hops_obj * in, msg_hops_obj * out); - - void mod_resample_disconnect(mod_resample_obj * obj); - - mod_resample_cfg * mod_resample_cfg_construct(void); - - void mod_resample_cfg_destroy(mod_resample_cfg * cfg); - - void mod_resample_cfg_printf(const mod_resample_cfg * cfg); - -#endif \ No newline at end of file diff --git a/src/module/mod_ssl.c b/src/module/mod_ssl.c index fc52fe8..eab119c 100644 --- a/src/module/mod_ssl.c +++ b/src/module/mod_ssl.c @@ -21,7 +21,7 @@ * */ - #include "mod_ssl.h" + #include mod_ssl_obj * mod_ssl_construct(const mod_ssl_cfg * mod_ssl_config, const msg_spectra_cfg * msg_spectra_config, const msg_pots_cfg * msg_pots_config) { @@ -355,4 +355,4 @@ printf("nThetas = %u\n", cfg->nThetas); printf("gainMin = %f\n", cfg->gainMin); - } \ No newline at end of file + } diff --git a/src/module/mod_ssl.h b/src/module/mod_ssl.h deleted file mode 100644 index d27fdce..0000000 --- a/src/module/mod_ssl.h +++ /dev/null @@ -1,126 +0,0 @@ -#ifndef __ODAS_MODULE_SSL -#define __ODAS_MODULE_SSL - - /** - * \file mod_ssl.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - - #include "../general/mic.h" - #include "../general/samplerate.h" - #include "../general/soundspeed.h" - #include "../general/spatialfilter.h" - - #include "../signal/aimg.h" - #include "../signal/env.h" - #include "../signal/freq.h" - #include "../signal/xcorr.h" - - #include "../system/env2env.h" - #include "../system/freq2env.h" - #include "../system/freq2freq.h" - #include "../system/freq2xcorr.h" - #include "../system/xcorr2aimg.h" - #include "../system/xcorr2xcorr.h" - - #include "../init/scanning.h" - - #include "../message/msg_spectra.h" - #include "../message/msg_powers.h" - #include "../message/msg_pots.h" - - - typedef struct mod_ssl_obj { - - unsigned int nChannels; - unsigned int nPairs; - unsigned int nPots; - unsigned int nLevels; - unsigned int frameSize; - unsigned int halfFrameSize; - unsigned int frameSizeInterp; - unsigned int halfFrameSizeInterp; - unsigned int interpRate; - - scans_obj * scans; - - freqs_obj * phasors; - freqs_obj * products; - freqs_obj * productsInterp; - xcorrs_obj * xcorrs; - xcorrs_obj * xcorrsMax; - - freq2env_obj * freq2env; - freq2freq_phasor_obj * freq2freq_phasor; - freq2freq_product_obj * freq2freq_product; - freq2freq_interpolate_obj * freq2freq_interpolate; - freq2xcorr_obj * freq2xcorr; - xcorr2xcorr_obj * xcorr2xcorr; - - aimg_obj ** aimgs; - xcorr2aimg_obj ** xcorr2aimg; - - pots_obj * pots; - - msg_spectra_obj * in; - msg_pots_obj * out; - - } mod_ssl_obj; - - typedef struct mod_ssl_cfg { - - mics_obj * mics; - samplerate_obj * samplerate; - soundspeed_obj * soundspeed; - spatialfilter_obj * spatialfilter; - - unsigned int interpRate; - float epsilon; - unsigned int nLevels; - unsigned int * levels; - signed int * deltas; - unsigned int nMatches; - float probMin; - unsigned int nRefinedLevels; - unsigned int nThetas; - float gainMin; - - } mod_ssl_cfg; - - mod_ssl_obj * mod_ssl_construct(const mod_ssl_cfg * mod_ssl_config, const msg_spectra_cfg * msg_spectra_config, const msg_pots_cfg * msg_pots_config); - - void mod_ssl_destroy(mod_ssl_obj * obj); - - int mod_ssl_process(mod_ssl_obj * obj); - - void mod_ssl_connect(mod_ssl_obj * obj, msg_spectra_obj * in, msg_pots_obj * out); - - void mod_ssl_disconnect(mod_ssl_obj * obj); - - mod_ssl_cfg * mod_ssl_cfg_construct(void); - - void mod_ssl_cfg_destroy(mod_ssl_cfg * cfg); - - void mod_ssl_cfg_printf(const mod_ssl_cfg * cfg); - -#endif \ No newline at end of file diff --git a/src/module/mod_sss.c b/src/module/mod_sss.c index c498ab6..69fd581 100644 --- a/src/module/mod_sss.c +++ b/src/module/mod_sss.c @@ -21,7 +21,7 @@ * */ - #include "mod_sss.h" + #include #include @@ -889,4 +889,4 @@ // Empty - } \ No newline at end of file + } diff --git a/src/module/mod_sss.h b/src/module/mod_sss.h deleted file mode 100644 index 4b3d5d0..0000000 --- a/src/module/mod_sss.h +++ /dev/null @@ -1,201 +0,0 @@ -#ifndef __ODAS_MODULE_SSS -#define __ODAS_MODULE_SSS - - /** - * \file mod_sss.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../general/mic.h" - #include "../general/samplerate.h" - #include "../general/soundspeed.h" - #include "../general/spatialfilter.h" - - #include "../init/directivity.h" - - #include "../message/msg_powers.h" - #include "../message/msg_spectra.h" - #include "../message/msg_tracks.h" - - #include "../signal/beampattern.h" - #include "../signal/steer.h" - #include "../signal/gain.h" - #include "../signal/demixing.h" - #include "../signal/env.h" - - #include "../system/demixing2env.h" - #include "../system/demixing2freq.h" - #include "../system/env2env.h" - #include "../system/freq2env.h" - #include "../system/freq2freq.h" - #include "../system/gain2mask.h" - #include "../system/track2steer.h" - #include "../system/track2gain.h" - #include "../system/steer2demixing.h" - - #include - #include - - typedef struct mod_sss_obj { - - unsigned int nSeps; - unsigned int nChannels; - unsigned int halfFrameSize; - - char mode_sep; - char mode_pf; - - beampatterns_obj * sep_ds_beampatterns_mics; - beampatterns_obj * sep_ds_beampatterns_spatialfilter; - steers_obj * sep_ds_steers; - gains_obj * sep_ds_gains; - masks_obj * sep_ds_masks; - tracks_obj * sep_ds_tracksPrev; - tracks_obj * sep_ds_tracksNow; - track2gain_obj * sep_ds_track2gain; - gain2mask_obj * sep_ds_gain2mask; - track2steer_obj * sep_ds_track2steer; - steer2demixing_ds_obj * sep_ds_steer2demixing; - demixings_obj * sep_ds_demixingsPrev; - demixings_obj * sep_ds_demixingsNow; - demixing2freq_obj * sep_ds_demixing2freq; - - beampatterns_obj * sep_gss_beampatterns_mics; - beampatterns_obj * sep_gss_beampatterns_spatialfilter; - steers_obj * sep_gss_steers; - gains_obj * sep_gss_gains; - masks_obj * sep_gss_masks; - tracks_obj * sep_gss_tracksPrev; - tracks_obj * sep_gss_tracksNow; - track2gain_obj * sep_gss_track2gain; - gain2mask_obj * sep_gss_gain2mask; - track2steer_obj * sep_gss_track2steer; - steer2demixing_gss_obj * sep_gss_steer2demixing; - demixings_obj * sep_gss_demixingsPrev; - demixings_obj * sep_gss_demixingsNow; - demixing2freq_obj * sep_gss_demixing2freq; - - masks_obj * sep_masks; - demixings_obj * sep_demixings; - - freq2env_obj * pf_ms_freq2env; - envs_obj * pf_ms_noisys; - demixing2env_obj * pf_ms_demixing2env; - envs_obj * pf_ms_noisesEst; - env2env_mcra_obj * pf_ms_env2env_mcra; - envs_obj * pf_ms_noisesSep; - env2env_interf_obj * pf_ms_env2env_interf; - envs_obj * pf_ms_interfs; - env2env_gainspeech_obj * pf_ms_env2env_gainspeech; - envs_obj * pf_ms_gainspeeches; - envs_obj * pf_ms_snrs; - envs_obj * pf_ms_vs; - env2env_probspeech_obj * pf_ms_env2env_probspeech; - envs_obj * pf_ms_probspeeches; - env2env_gainall_obj * pf_ms_env2env_gainall; - envs_obj * pf_ms_gainalls; - freq2freq_gain_obj * pf_ms_freq2freq_gain; - - freq2env_obj * pf_ss_freq2env_channels; - envs_obj * pf_ss_env_channels; - demixing2env_obj * pf_ss_demixing2env; - envs_obj * pf_ss_env_channelseps; - freq2env_obj * pf_ss_freq2env_seps; - envs_obj * pf_ss_env_seps; - env2env_gainratio_obj * pf_ss_env2env_gainratio; - envs_obj * pf_ss_gainratio; - freq2freq_gain_obj * pf_ss_freq2freq_gain; - - msg_spectra_obj * in1; - msg_powers_obj * in2; - msg_tracks_obj * in3; - msg_spectra_obj * out1; - msg_spectra_obj * out2; - - FILE * tmpFp; - - } mod_sss_obj; - - typedef struct mod_sss_cfg { - - char mode_sep; - char mode_pf; - - unsigned int nThetas; - float gainMin; - - float epsilon; - - mics_obj * mics; - samplerate_obj * samplerate; - soundspeed_obj * soundspeed; - spatialfilter_obj * spatialfilter; - - float sep_gss_lambda; - float sep_gss_mu; - - unsigned int pf_ms_bSize; - float pf_ms_alphaS; - unsigned int pf_ms_L; - float pf_ms_delta; - float pf_ms_alphaD; - - float pf_ms_eta; - float pf_ms_alphaZ; - float pf_ms_alphaPmin; - float pf_ms_thetaWin; - float pf_ms_alphaWin; - float pf_ms_maxAbsenceProb; - float pf_ms_Gmin; - unsigned int pf_ms_winSizeLocal; - unsigned int pf_ms_winSizeGlobal; - unsigned int pf_ms_winSizeFrame; - - float pf_ss_Gmin; - float pf_ss_Gmid; - float pf_ss_Gslope; - - } mod_sss_cfg; - - mod_sss_obj * mod_sss_construct(const mod_sss_cfg * mod_sss_config, const msg_tracks_cfg * msg_tracks_config, const msg_spectra_cfg * msg_spectra_config); - - void mod_sss_destroy(mod_sss_obj * obj); - - int mod_sss_process(mod_sss_obj * obj); - - int mod_sss_process_dds(mod_sss_obj * obj); - - int mod_sss_process_dgss(mod_sss_obj * obj); - - int mod_sss_process_sspf(mod_sss_obj * obj); - - int mod_sss_process_mspf(mod_sss_obj * obj); - - void mod_sss_connect(mod_sss_obj * obj, msg_spectra_obj * in1, msg_powers_obj * in2, msg_tracks_obj * in3, msg_spectra_obj * out1, msg_spectra_obj * out2); - - void mod_sss_disconnect(mod_sss_obj * obj); - - mod_sss_cfg * mod_sss_cfg_construct(void); - - void mod_sss_cfg_destroy(mod_sss_cfg * cfg); - - void mod_sss_cfg_printf(const mod_sss_cfg * cfg); - -#endif \ No newline at end of file diff --git a/src/module/mod_sst.c b/src/module/mod_sst.c index 8370acc..827211d 100644 --- a/src/module/mod_sst.c +++ b/src/module/mod_sst.c @@ -21,7 +21,7 @@ * */ - #include "mod_sst.h" + #include mod_sst_obj * mod_sst_construct(const mod_sst_cfg * mod_sst_config, const mod_ssl_cfg * mod_ssl_config, const msg_pots_cfg * msg_pots_config, const msg_targets_cfg * msg_targets_config, const msg_tracks_cfg * msg_tracks_config) { @@ -1288,4 +1288,4 @@ printf("theta_inactive = %f\n", cfg->theta_inactive); - } \ No newline at end of file + } diff --git a/src/module/mod_sst.h b/src/module/mod_sst.h deleted file mode 100644 index 3ba4a0b..0000000 --- a/src/module/mod_sst.h +++ /dev/null @@ -1,164 +0,0 @@ -#ifndef __ODAS_MODULE_SST -#define __ODAS_MODULE_SST - - /** - * \file mod_sst.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - #include - - #include "../general/mic.h" - - #include "../signal/coherence.h" - #include "../signal/kalman.h" - #include "../signal/mixture.h" - #include "../signal/particle.h" - - #include "../system/kalman2kalman.h" - #include "../system/particle2particle.h" - #include "../system/kalman2coherence.h" - #include "../system/particle2coherence.h" - #include "../system/mixture2mixture.h" - - #include "../message/msg_pots.h" - #include "../message/msg_targets.h" - #include "../message/msg_tracks.h" - #include "../module/mod_ssl.h" - - typedef struct mod_sst_obj { - - unsigned int nPots; - unsigned int nTracksMax; - unsigned int nTracks; - unsigned int nTargetsMax; - - char mode; - char add; - - mixture_obj ** mixtures; - coherences_obj ** coherences; - postprobs_obj ** postprobs; - - unsigned long long * ids; - unsigned long long * idsAdded; - unsigned long long * idsRemoved; - char ** tags; - - char * type; - - kalman_obj ** kalmans; - kalman2kalman_obj * kalman2kalman_prob; - kalman2kalman_obj * kalman2kalman_active; - kalman2kalman_obj * kalman2kalman_target; - kalman2coherence_obj * kalman2coherence_prob; - kalman2coherence_obj * kalman2coherence_active; - kalman2coherence_obj * kalman2coherence_target; - - particles_obj ** particles; - particle2particle_obj * particle2particle_prob; - particle2particle_obj * particle2particle_active; - particle2particle_obj * particle2particle_target; - particle2coherence_obj * particle2coherence_prob; - particle2coherence_obj * particle2coherence_active; - particle2coherence_obj * particle2coherence_target; - - mixture2mixture_obj * mixture2mixture; - - float * sourceActivities; - - float theta_new; - unsigned int N_prob; - float theta_prob; - unsigned int * N_inactive; - float theta_inactive; - - unsigned int * n_prob; - float * mean_prob; - unsigned int * n_inactive; - - unsigned long long id; - - msg_pots_obj * in1; - msg_targets_obj * in2; - msg_tracks_obj * out; - - } mod_sst_obj; - - typedef struct mod_sst_cfg { - - char mode; - char add; - - unsigned int nTracksMax; - unsigned int hopSize; - - float sigmaQ; - - unsigned int nParticles; - float st_alpha; - float st_beta; - float st_ratio; - float ve_alpha; - float ve_beta; - float ve_ratio; - float ac_alpha; - float ac_beta; - float ac_ratio; - float Nmin; - - float epsilon; - float sigmaR_active; - float sigmaR_prob; - float sigmaR_target; - gaussians_1d_obj * active_gmm; - gaussians_1d_obj * inactive_gmm; - float Pfalse; - float Pnew; - float Ptrack; - - float theta_new; - unsigned int N_prob; - float theta_prob; - unsigned int * N_inactive; - float theta_inactive; - - } mod_sst_cfg; - - mod_sst_obj * mod_sst_construct(const mod_sst_cfg * mod_sst_config, const mod_ssl_cfg * mod_ssl_config, const msg_pots_cfg * msg_pots_config, const msg_targets_cfg * msg_targets_config, const msg_tracks_cfg * msg_tracks_config); - - void mod_sst_destroy(mod_sst_obj * obj); - - int mod_sst_process(mod_sst_obj * obj); - - void mod_sst_connect(mod_sst_obj * obj, msg_pots_obj * in1, msg_targets_obj * in2, msg_tracks_obj * out); - - void mod_sst_disconnect(mod_sst_obj * obj); - - mod_sst_cfg * mod_sst_cfg_construct(void); - - void mod_sst_cfg_destroy(mod_sst_cfg * cfg); - - void mod_sst_cfg_printf(const mod_sst_cfg * cfg); - -#endif \ No newline at end of file diff --git a/src/module/mod_stft.c b/src/module/mod_stft.c index 4122b78..c8ccfad 100644 --- a/src/module/mod_stft.c +++ b/src/module/mod_stft.c @@ -21,7 +21,7 @@ * */ - #include "mod_stft.h" + #include mod_stft_obj * mod_stft_construct(const mod_stft_cfg * mod_stft_config, const msg_hops_cfg * msg_hops_config, const msg_spectra_cfg * msg_spectra_config) { @@ -109,4 +109,4 @@ void mod_stft_cfg_printf(const mod_stft_cfg * cfg) { - } \ No newline at end of file + } diff --git a/src/module/mod_stft.h b/src/module/mod_stft.h deleted file mode 100644 index 8543987..0000000 --- a/src/module/mod_stft.h +++ /dev/null @@ -1,63 +0,0 @@ -#ifndef __ODAS_MODULE_STFT -#define __ODAS_MODULE_STFT - - /** - * \file mod_stft.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../system/hop2frame.h" - #include "../signal/frame.h" - #include "../system/frame2freq.h" - #include "../message/msg_hops.h" - #include "../message/msg_spectra.h" - - typedef struct mod_stft_obj { - - hop2frame_obj * hop2frame; - frames_obj * frames; - frame2freq_obj * frame2freq; - - msg_hops_obj * in; - msg_spectra_obj * out; - - } mod_stft_obj; - - typedef struct mod_stft_cfg { - - } mod_stft_cfg; - - mod_stft_obj * mod_stft_construct(const mod_stft_cfg * mod_stft_config, const msg_hops_cfg * msg_hops_config, const msg_spectra_cfg * msg_spectra_config); - - void mod_stft_destroy(mod_stft_obj * obj); - - int mod_stft_process(mod_stft_obj * obj); - - void mod_stft_connect(mod_stft_obj * obj, msg_hops_obj * in, msg_spectra_obj * out); - - void mod_stft_disconnect(mod_stft_obj * obj); - - mod_stft_cfg * mod_stft_cfg_construct(void); - - void mod_stft_cfg_destroy(mod_stft_cfg * cfg); - - void mod_stft_cfg_printf(const mod_stft_cfg * cfg); - -#endif \ No newline at end of file diff --git a/src/module/mod_volume.c b/src/module/mod_volume.c index 7d07cae..3419fba 100644 --- a/src/module/mod_volume.c +++ b/src/module/mod_volume.c @@ -21,7 +21,7 @@ * */ - #include "mod_volume.h" + #include mod_volume_obj * mod_volume_construct(const mod_volume_cfg * mod_volume_config, const msg_hops_cfg * msg_hops_config) { @@ -100,4 +100,4 @@ void mod_volume_cfg_printf(const mod_volume_cfg * cfg) { - } \ No newline at end of file + } diff --git a/src/module/mod_volume.h b/src/module/mod_volume.h deleted file mode 100644 index 106baeb..0000000 --- a/src/module/mod_volume.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef __ODAS_MODULE_VOLUME -#define __ODAS_MODULE_VOLUME - - /** - * \file mod_volume.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../system/hop2hop.h" - #include "../message/msg_hops.h" - - typedef struct mod_volume_obj { - - hop2hop_gain_obj * hop2hop_gain; - - msg_hops_obj * in; - msg_hops_obj * out; - - } mod_volume_obj; - - typedef struct mod_volume_cfg { - - float gain; - - } mod_volume_cfg; - - mod_volume_obj * mod_volume_construct(const mod_volume_cfg * mod_volume_config, const msg_hops_cfg * msg_hops_config); - - void mod_volume_destroy(mod_volume_obj * obj); - - int mod_volume_process(mod_volume_obj * obj); - - void mod_volume_connect(mod_volume_obj * obj, msg_hops_obj * in, msg_hops_obj * out); - - void mod_volume_disconnect(mod_volume_obj * obj); - - mod_volume_cfg * mod_volume_cfg_construct(void); - - void mod_volume_cfg_destroy(mod_volume_cfg * cfg); - - void mod_volume_cfg_printf(const mod_volume_cfg * cfg); - -#endif \ No newline at end of file diff --git a/src/signal/acorr.c b/src/signal/acorr.c index 374fc1f..3eeb3d4 100644 --- a/src/signal/acorr.c +++ b/src/signal/acorr.c @@ -21,7 +21,7 @@ * */ - #include "acorr.h" + #include acorrs_obj * acorrs_construct_zero(const unsigned int nSignals, const unsigned int halfFrameSize) { diff --git a/src/signal/acorr.h b/src/signal/acorr.h deleted file mode 100644 index 614fe95..0000000 --- a/src/signal/acorr.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef __ODAS_SIGNAL_ACORR -#define __ODAS_SIGNAL_ACORR - - /** - * \file acorr.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct acorrs_obj { - - unsigned int nSignals; - unsigned int halfFrameSize; - float ** array; - - } acorrs_obj; - - acorrs_obj * acorrs_construct_zero(const unsigned int nSignals, const unsigned int halfFrameSize); - - void acorrs_destroy(acorrs_obj * obj); - - void acorrs_copy(acorrs_obj * dest, const acorrs_obj * src); - - void acorrs_zero(acorrs_obj * obj); - - void acorrs_printf(const acorrs_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/aimg.c b/src/signal/aimg.c index 8cc1b7a..f6ac850 100644 --- a/src/signal/aimg.c +++ b/src/signal/aimg.c @@ -21,7 +21,7 @@ * */ - #include "aimg.h" + #include aimg_obj * aimg_construct_zero(const unsigned int aimgSize) { @@ -61,4 +61,4 @@ printf("\n"); - } \ No newline at end of file + } diff --git a/src/signal/aimg.h b/src/signal/aimg.h deleted file mode 100644 index 1274cf2..0000000 --- a/src/signal/aimg.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef __ODAS_SIGNAL_AIMG -#define __ODAS_SIGNAL_AIMG - - /** - * \file aimg.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct aimg_obj { - - unsigned int aimgSize; - float * array; - - } aimg_obj; - - aimg_obj * aimg_construct_zero(const unsigned int aimgSize); - - void aimg_destroy(aimg_obj * obj); - - void aimg_printf(const aimg_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/area.c b/src/signal/area.c index 0914ee0..1dceb57 100644 --- a/src/signal/area.c +++ b/src/signal/area.c @@ -21,7 +21,7 @@ * */ - #include "area.h" + #include areas_obj * areas_construct_zero(const unsigned int nPointsDiscrete, const unsigned int nResolutionsPerDiscrete, const unsigned int nPairs) { diff --git a/src/signal/area.h b/src/signal/area.h deleted file mode 100644 index 3a3fbb8..0000000 --- a/src/signal/area.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef __ODAS_SIGNAL_AREA -#define __ODAS_SIGNAL_AREA - - /** - * \file area.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct areas_obj { - - unsigned int nPointsDiscrete; - unsigned int nResolutionsPerDiscrete; - unsigned int nPairs; - - float * array; - - } areas_obj; - - typedef struct area_obj { - - unsigned int nPairs; - - float * array; - - } area_obj; - - areas_obj * areas_construct_zero(const unsigned int nPointsDiscrete, const unsigned int nResolutionsPerDiscrete, const unsigned int nPairs); - - void areas_destroy(areas_obj * obj); - - void areas_printf(const areas_obj * obj); - - area_obj * area_construct_zero(const unsigned int nPairs); - - void area_destroy(area_obj * obj); - - void area_printf(const area_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/assignation.c b/src/signal/assignation.c index 7381c01..691d5a1 100644 --- a/src/signal/assignation.c +++ b/src/signal/assignation.c @@ -21,7 +21,7 @@ * */ - #include "assignation.h" + #include assignations_obj * assignations_construct_zero(const unsigned int nAssignations, const unsigned int nPots) { diff --git a/src/signal/assignation.h b/src/signal/assignation.h deleted file mode 100644 index 142102c..0000000 --- a/src/signal/assignation.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef __ODAS_SIGNAL_ASSIGNATION -#define __ODAS_SIGNAL_ASSIGNATION - - /** - * \file assignation.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct assignations_obj { - - unsigned int nAssignations; - unsigned int nPots; - signed int * array; - - } assignations_obj; - - assignations_obj * assignations_construct_zero(const unsigned int nAssignations, const unsigned int nPots); - - void assignations_destroy(assignations_obj * obj); - - void assignations_printf(const assignations_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/beampattern.c b/src/signal/beampattern.c index 4055130..a360f25 100644 --- a/src/signal/beampattern.c +++ b/src/signal/beampattern.c @@ -21,7 +21,7 @@ * */ - #include "beampattern.h" + #include beampatterns_obj * beampatterns_construct_zero(const unsigned int nChannels, const unsigned int nThetas) { @@ -73,4 +73,4 @@ } - } \ No newline at end of file + } diff --git a/src/signal/beampattern.h b/src/signal/beampattern.h deleted file mode 100644 index aa346c5..0000000 --- a/src/signal/beampattern.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef __ODAS_SIGNAL_BEAMPATTERN -#define __ODAS_SIGNAL_BEAMPATTERN - - /** - * \file beampattern.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct beampatterns_obj { - - unsigned int nChannels; - unsigned int nThetas; - - float * minThetas; - float * maxThetas; - float * deltaThetas; - - float * gains; - - } beampatterns_obj; - - beampatterns_obj * beampatterns_construct_zero(const unsigned int nChannels, const unsigned int nThetas); - - void beampatterns_destroy(beampatterns_obj * obj); - - void beampatterns_printf(const beampatterns_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/category.c b/src/signal/category.c index 9a5280d..ce6eaec 100644 --- a/src/signal/category.c +++ b/src/signal/category.c @@ -21,7 +21,7 @@ * */ - #include "category.h" + #include categories_obj * categories_construct_zero(const unsigned int nSignals) { @@ -66,4 +66,4 @@ } - } \ No newline at end of file + } diff --git a/src/signal/category.h b/src/signal/category.h deleted file mode 100644 index 23dd9a5..0000000 --- a/src/signal/category.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef __ODAS_SIGNAL_CATEGORY -#define __ODAS_SIGNAL_CATEGORY - - /** - * \file category.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct categories_obj { - - unsigned int nSignals; - char * array; - - } categories_obj; - - categories_obj * categories_construct_zero(const unsigned int nSignals); - - void categories_destroy(categories_obj * obj); - - void categories_copy(categories_obj * dest, const categories_obj * src); - - void categories_zero(categories_obj * obj); - - void categories_printf(const categories_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/coherence.c b/src/signal/coherence.c index dc8d5b3..7c0f06e 100644 --- a/src/signal/coherence.c +++ b/src/signal/coherence.c @@ -21,7 +21,7 @@ * */ - #include "coherence.h" + #include coherences_obj * coherences_construct_zero(const unsigned int nPots, const unsigned int nTracks) { diff --git a/src/signal/coherence.h b/src/signal/coherence.h deleted file mode 100644 index d008c9b..0000000 --- a/src/signal/coherence.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef __ODAS_SIGNAL_COHERENCE -#define __ODAS_SIGNAL_COHERENCE - - /** - * \file coherence.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct coherences_obj { - - unsigned int nTracks; - unsigned int nPots; - float * array; - - } coherences_obj; - - coherences_obj * coherences_construct_zero(const unsigned int nTracks, const unsigned int nPots); - - void coherences_destroy(coherences_obj * obj); - - void coherences_printf(coherences_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/delta.c b/src/signal/delta.c index f306de4..8ec44e9 100644 --- a/src/signal/delta.c +++ b/src/signal/delta.c @@ -21,7 +21,7 @@ * */ - #include "delta.h" + #include deltas_obj * deltas_construct_zero(const unsigned int nPairs) { @@ -68,4 +68,4 @@ } - } \ No newline at end of file + } diff --git a/src/signal/delta.h b/src/signal/delta.h deleted file mode 100644 index 803db3b..0000000 --- a/src/signal/delta.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef __ODAS_SIGNAL_DELTA -#define __ODAS_SIGNAL_DELTA - - /** - * \file delta.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct deltas_obj { - - unsigned int nPairs; - unsigned int * array; - - } deltas_obj; - - deltas_obj * deltas_construct_zero(const unsigned int nPairs); - - deltas_obj * deltas_clone(const deltas_obj * obj); - - void deltas_destroy(deltas_obj * obj); - - void deltas_printf(const deltas_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/demixing.c b/src/signal/demixing.c index ba8ddc8..b101808 100644 --- a/src/signal/demixing.c +++ b/src/signal/demixing.c @@ -21,7 +21,7 @@ * */ - #include "demixing.h" + #include demixings_obj * demixings_construct_zero(const unsigned int halfFrameSize, const unsigned int nSeps, const unsigned int nChannels) { @@ -114,4 +114,4 @@ } - } \ No newline at end of file + } diff --git a/src/signal/demixing.h b/src/signal/demixing.h deleted file mode 100644 index dc09641..0000000 --- a/src/signal/demixing.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef __ODAS_SIGNAL_DEMIXING -#define __ODAS_SIGNAL_DEMIXING - - /** - * \file demixing.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct demixings_obj { - - unsigned int nSeps; - unsigned int nChannels; - unsigned int halfFrameSize; - - float ** array; - - } demixings_obj; - - demixings_obj * demixings_construct_zero(const unsigned int halfFrameSize, const unsigned int nSeps, const unsigned int nChannels); - - void demixings_destroy(demixings_obj * obj); - - void demixings_copy(demixings_obj * dest, const demixings_obj * src); - - void demixings_zero(demixings_obj * obj); - - void demixings_printf(const demixings_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/env.c b/src/signal/env.c index b674e6a..3d433fd 100644 --- a/src/signal/env.c +++ b/src/signal/env.c @@ -21,7 +21,7 @@ * */ - #include "env.h" + #include envs_obj * envs_construct_zero(const unsigned int nSignals, const unsigned int halfFrameSize) { @@ -120,4 +120,4 @@ } - } \ No newline at end of file + } diff --git a/src/signal/env.h b/src/signal/env.h deleted file mode 100644 index ae0d22f..0000000 --- a/src/signal/env.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef __ODAS_SIGNAL_ENV -#define __ODAS_SIGNAL_ENV - - /** - * \file env.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct envs_obj { - - unsigned int nSignals; - unsigned int halfFrameSize; - float ** array; - - } envs_obj; - - envs_obj * envs_construct_zero(const unsigned int nSignals, const unsigned int halfFrameSize); - - envs_obj * envs_clone(const envs_obj * obj); - - void envs_copy(envs_obj * dest, const envs_obj * src); - - void envs_zero(envs_obj * obj); - - void envs_destroy(envs_obj * obj); - - void envs_printf(const envs_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/frame.c b/src/signal/frame.c index 4b402ee..fb73f51 100644 --- a/src/signal/frame.c +++ b/src/signal/frame.c @@ -21,7 +21,7 @@ * */ - #include "frame.h" + #include frames_obj * frames_construct_zero(const unsigned int nSignals, const unsigned int frameSize) { @@ -99,4 +99,4 @@ } - } \ No newline at end of file + } diff --git a/src/signal/frame.h b/src/signal/frame.h deleted file mode 100644 index 7551c94..0000000 --- a/src/signal/frame.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef __ODAS_SIGNAL_FRAME -#define __ODAS_SIGNAL_FRAME - - /** - * \file frame.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct frames_obj { - - unsigned int nSignals; - unsigned int frameSize; - float ** array; - - } frames_obj; - - frames_obj * frames_construct_zero(const unsigned int nSignals, const unsigned int frameSize); - - frames_obj * frames_clone(const frames_obj * obj); - - void frames_destroy(frames_obj * obj); - - void frames_printf(const frames_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/freq.c b/src/signal/freq.c index 8e59d19..7ec2f87 100644 --- a/src/signal/freq.c +++ b/src/signal/freq.c @@ -21,7 +21,7 @@ * */ - #include "freq.h" + #include freqs_obj * freqs_construct_zero(const unsigned int nSignals, const unsigned int halfFrameSize) { @@ -121,4 +121,4 @@ } - } \ No newline at end of file + } diff --git a/src/signal/freq.h b/src/signal/freq.h deleted file mode 100644 index 08f8242..0000000 --- a/src/signal/freq.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef __ODAS_SIGNAL_FREQ -#define __ODAS_SIGNAL_FREQ - - /** - * \file freq.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct freqs_obj { - - unsigned int nSignals; - unsigned int halfFrameSize; - float ** array; - - } freqs_obj; - - freqs_obj * freqs_construct_zero(const unsigned int nSignals, const unsigned int halfFrameSize); - - freqs_obj * freqs_clone(const freqs_obj * obj); - - void freqs_copy(freqs_obj * dest, const freqs_obj * src); - - void freqs_zero(freqs_obj * obj); - - void freqs_destroy(freqs_obj * obj); - - void freqs_printf(const freqs_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/gain.c b/src/signal/gain.c index f229f6a..8eeb1ef 100644 --- a/src/signal/gain.c +++ b/src/signal/gain.c @@ -21,7 +21,7 @@ * */ - #include "gain.h" + #include gains_obj * gains_construct_zero(const unsigned int nSeps, const unsigned int nChannels) { @@ -65,4 +65,4 @@ } - } \ No newline at end of file + } diff --git a/src/signal/gain.h b/src/signal/gain.h deleted file mode 100644 index 33e929e..0000000 --- a/src/signal/gain.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef __ODAS_SIGNAL_GAIN -#define __ODAS_SIGNAL_GAIN - - /** - * \file gain.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct gains_obj { - - unsigned int nSeps; - unsigned int nChannels; - float * array; - - } gains_obj; - - gains_obj * gains_construct_zero(const unsigned int nSeps, const unsigned int nChannels); - - void gains_destroy(gains_obj * obj); - - void gains_printf(const gains_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/hop.c b/src/signal/hop.c index af20831..0c4b79b 100644 --- a/src/signal/hop.c +++ b/src/signal/hop.c @@ -21,7 +21,7 @@ * */ - #include "hop.h" + #include hops_obj * hops_construct_zero(const unsigned int nSignals, const unsigned int hopSize) { @@ -119,4 +119,4 @@ } - } \ No newline at end of file + } diff --git a/src/signal/hop.h b/src/signal/hop.h deleted file mode 100644 index 5ec9e0d..0000000 --- a/src/signal/hop.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef __ODAS_SIGNAL_HOP -#define __ODAS_SIGNAL_HOP - - /** - * \file hop.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct hops_obj { - - unsigned int nSignals; - unsigned int hopSize; - float ** array; - - } hops_obj; - - hops_obj * hops_construct_zero(const unsigned int nSignals, const unsigned int hopSize); - - hops_obj * hops_clone(const hops_obj * obj); - - void hops_copy(hops_obj * dest, const hops_obj * src); - - void hops_zero(hops_obj * obj); - - void hops_destroy(hops_obj * obj); - - void hops_printf(const hops_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/impulse.h b/src/signal/impulse.h deleted file mode 100644 index babdbf0..0000000 --- a/src/signal/impulse.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef __ODAS_SIGNAL_IMPULSE -#define __ODAS_SIGNAL_IMPULSE - - /** - * \file impulse.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - - typedef struct impulse_obj { - - float * array; - unsigned int nCoefficients; - - } impulse_obj; - - impulse_obj * impulse_construct(const unsigned int nCoefficients); - - void impulse_destroy(impulse_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/index.c b/src/signal/index.c index 1fe79bd..daa520a 100644 --- a/src/signal/index.c +++ b/src/signal/index.c @@ -21,7 +21,7 @@ * */ - #include "index.h" + #include indexes_obj * indexes_construct_zero(const unsigned int nCoarses, const unsigned int nFines) { @@ -76,4 +76,4 @@ } - } \ No newline at end of file + } diff --git a/src/signal/index.h b/src/signal/index.h deleted file mode 100644 index 1cf6b37..0000000 --- a/src/signal/index.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef __ODAS_SIGNAL_INDEX -#define __ODAS_SIGNAL_INDEX - - /** - * \file index.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct indexes_obj { - - unsigned int nCoarses; - unsigned int nFines; - unsigned int * array; - unsigned int * count; - - } indexes_obj; - - indexes_obj * indexes_construct_zero(const unsigned int nCoarses, const unsigned int nFines); - - void indexes_destroy(indexes_obj * obj); - - void indexes_printf(const indexes_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/kalman.c b/src/signal/kalman.c index e36696b..a587ab2 100644 --- a/src/signal/kalman.c +++ b/src/signal/kalman.c @@ -21,7 +21,7 @@ * */ - #include "kalman.h" + #include kalman_obj * kalman_construct_zero(void) { diff --git a/src/signal/kalman.h b/src/signal/kalman.h deleted file mode 100644 index d8b2060..0000000 --- a/src/signal/kalman.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef __ODAS_SIGNAL_KALMAN -#define __ODAS_SIGNAL_KALMAN - - /** - * \file kalman.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - - #include "../utils/matrix.h" - - typedef struct kalman_obj { - - matrix_obj * x_lm1lm1; - matrix_obj * x_llm1; - matrix_obj * P_lm1lm1; - matrix_obj * P_llm1; - - } kalman_obj; - - kalman_obj * kalman_construct_zero(void); - - void kalman_destroy(kalman_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/map.c b/src/signal/map.c index da4c211..a4cda19 100644 --- a/src/signal/map.c +++ b/src/signal/map.c @@ -21,7 +21,7 @@ * */ - #include "map.h" + #include maps_obj * maps_construct_zero(const unsigned int nCoarses, const unsigned int nFines) { @@ -65,4 +65,4 @@ } - } \ No newline at end of file + } diff --git a/src/signal/map.h b/src/signal/map.h deleted file mode 100644 index e6fbe24..0000000 --- a/src/signal/map.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef __ODAS_SIGNAL_MAP -#define __ODAS_SIGNAL_MAP - - /** - * \file map.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct maps_obj { - - unsigned int nCoarses; - unsigned int nFines; - char * array; - - } maps_obj; - - maps_obj * maps_construct_zero(const unsigned int nCoarses, const unsigned int nFines); - - void maps_destroy(maps_obj * obj); - - void maps_printf(const maps_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/mask.c b/src/signal/mask.c index edf1fc0..50c1c0d 100644 --- a/src/signal/mask.c +++ b/src/signal/mask.c @@ -21,7 +21,7 @@ * */ - #include "mask.h" + #include masks_obj * masks_construct_zero(const unsigned int nSeps, const unsigned int nChannels) { @@ -71,4 +71,4 @@ } - } \ No newline at end of file + } diff --git a/src/signal/mask.h b/src/signal/mask.h deleted file mode 100644 index 92e01bc..0000000 --- a/src/signal/mask.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef __ODAS_SIGNAL_MASK -#define __ODAS_SIGNAL_MASK - - /** - * \file mask.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct masks_obj { - - unsigned int nSeps; - unsigned int nChannels; - char * array; - - } masks_obj; - - masks_obj * masks_construct_zero(const unsigned int nSeps, const unsigned int nChannels); - - void masks_destroy(masks_obj * obj); - - void masks_copy(masks_obj * dest, const masks_obj * src); - - void masks_printf(const masks_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/mixture.c b/src/signal/mixture.c index 346fa8d..61392de 100644 --- a/src/signal/mixture.c +++ b/src/signal/mixture.c @@ -21,7 +21,7 @@ * */ - #include "mixture.h" + #include mixture_obj * mixture_construct_zero(const unsigned int nPots, const unsigned int nTracks) { @@ -147,4 +147,4 @@ } - } \ No newline at end of file + } diff --git a/src/signal/mixture.h b/src/signal/mixture.h deleted file mode 100644 index 60efd53..0000000 --- a/src/signal/mixture.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef __ODAS_SIGNAL_MIXTURE -#define __ODAS_SIGNAL_MIXTURE - - /** - * \file mixture.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - #include "../signal/assignation.h" - #include "../init/combining.h" - - typedef struct mixture_obj { - - unsigned int nPots; - unsigned int nTracks; - unsigned int nTracksNewFalse; - unsigned int nCombinations; - - assignations_obj * assignations; - - float * p_Ez_AICD; - float * p_Eszs_phics; - float * p_phics; - float * p_Ez_phic; - float * p_phic; - float * p_phic_Ez; - - } mixture_obj; - - mixture_obj * mixture_construct_zero(const unsigned int nPots, const unsigned int nTracks); - - void mixture_destroy(mixture_obj * obj); - - void mixture_printf(const mixture_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/pair.c b/src/signal/pair.c index 17f7a92..0bfe0d5 100644 --- a/src/signal/pair.c +++ b/src/signal/pair.c @@ -21,7 +21,7 @@ * */ - #include "pair.h" + #include pairs_obj * pairs_construct_zero(const unsigned int nPairs) { @@ -68,4 +68,4 @@ printf("(%02u): %d\n", iPair, obj->array[iPair]); } - } \ No newline at end of file + } diff --git a/src/signal/pair.h b/src/signal/pair.h deleted file mode 100644 index 3112837..0000000 --- a/src/signal/pair.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef __ODAS_SIGNAL_PAIR -#define __ODAS_SIGNAL_PAIR - - /** - * \file pair.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct pairs_obj { - - unsigned int nPairs; - char * array; - - } pairs_obj; - - pairs_obj * pairs_construct_zero(const unsigned int nPairs); - - pairs_obj * pairs_clone(const pairs_obj * obj); - - void pairs_destroy(pairs_obj * obj); - - void pairs_printf(const pairs_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/particle.c b/src/signal/particle.c index 68e031b..c99fbcd 100644 --- a/src/signal/particle.c +++ b/src/signal/particle.c @@ -21,7 +21,7 @@ * */ - #include "particle.h" + #include particles_obj * particles_construct_zero(const unsigned int nParticles) { @@ -68,4 +68,4 @@ } - } \ No newline at end of file + } diff --git a/src/signal/particle.h b/src/signal/particle.h deleted file mode 100644 index 68b10c9..0000000 --- a/src/signal/particle.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef __ODAS_SIGNAL_PARTICLE -#define __ODAS_SIGNAL_PARTICLE - - /** - * \file particle.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct particles_obj { - - unsigned int nParticles; - float * array; - unsigned char * state; - - } particles_obj; - - particles_obj * particles_construct_zero(const unsigned int nParticles); - - void particles_destroy(particles_obj * obj); - - void particles_printf(const particles_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/pitch.c b/src/signal/pitch.c index 24e9a18..52e1cb7 100644 --- a/src/signal/pitch.c +++ b/src/signal/pitch.c @@ -21,7 +21,7 @@ * */ - #include "pitch.h" + #include pitches_obj * pitches_construct_zero(const unsigned int nSignals) { @@ -66,4 +66,4 @@ } - } \ No newline at end of file + } diff --git a/src/signal/pitch.h b/src/signal/pitch.h deleted file mode 100644 index a6da009..0000000 --- a/src/signal/pitch.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef __ODAS_SIGNAL_PITCH -#define __ODAS_SIGNAL_PITCH - - /** - * \file pitch.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct pitches_obj { - - unsigned int nSignals; - float * array; - - } pitches_obj; - - pitches_obj * pitches_construct_zero(const unsigned int nSignals); - - void pitches_destroy(pitches_obj * obj); - - void pitches_copy(pitches_obj * dest, const pitches_obj * src); - - void pitches_zero(pitches_obj * obj); - - void pitches_printf(const pitches_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/point.c b/src/signal/point.c index 99ece11..e946343 100644 --- a/src/signal/point.c +++ b/src/signal/point.c @@ -21,7 +21,7 @@ * */ - #include "point.h" + #include points_obj * points_construct_zero(const unsigned int nPoints) { @@ -72,4 +72,4 @@ } - } \ No newline at end of file + } diff --git a/src/signal/point.h b/src/signal/point.h deleted file mode 100644 index eefeea1..0000000 --- a/src/signal/point.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef __ODAS_SIGNAL_POINT -#define __ODAS_SIGNAL_POINT - - /** - * \file point.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct points_obj { - - unsigned int nPoints; - float * array; - - } points_obj; - - points_obj * points_construct_zero(const unsigned int nPoints); - - points_obj * points_clone(const points_obj * obj); - - void points_destroy(points_obj * obj); - - void points_printf(const points_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/postprob.c b/src/signal/postprob.c index a965bde..c3428ff 100644 --- a/src/signal/postprob.c +++ b/src/signal/postprob.c @@ -21,7 +21,7 @@ * */ - #include "postprob.h" + #include postprobs_obj * postprobs_construct_zero(const unsigned int nPots, const unsigned int nTracks) { @@ -83,4 +83,4 @@ } - } \ No newline at end of file + } diff --git a/src/signal/postprob.h b/src/signal/postprob.h deleted file mode 100644 index ac21d7f..0000000 --- a/src/signal/postprob.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef __ODAS_SIGNAL_POSTPROB -#define __ODAS_SIGNAL_POSTPROB - - /** - * \file postprob.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct postprobs_obj { - - unsigned int nTracks; - unsigned int nPots; - - float * arrayNew; - float * arrayTrack; - float * arrayTrackTotal; - - } postprobs_obj; - - postprobs_obj * postprobs_construct_zero(const unsigned int nPots, const unsigned int nTracks); - - void postprobs_destroy(postprobs_obj * obj); - - void postprobs_printf(const postprobs_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/pot.c b/src/signal/pot.c index f06ec82..46b3593 100644 --- a/src/signal/pot.c +++ b/src/signal/pot.c @@ -21,7 +21,7 @@ * */ - #include "pot.h" + #include pots_obj * pots_construct_zero(const unsigned int nPots) { diff --git a/src/signal/pot.h b/src/signal/pot.h deleted file mode 100644 index c2fc576..0000000 --- a/src/signal/pot.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef __ODAS_SIGNAL_POT -#define __ODAS_SIGNAL_POT - - /** - * \file pot.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct pots_obj { - - unsigned int nPots; - float * array; - - } pots_obj; - - pots_obj * pots_construct_zero(const unsigned int nPots); - - pots_obj * pots_clone(const pots_obj * obj); - - void pots_copy(pots_obj * dest, const pots_obj * src); - - void pots_zero(pots_obj * obj); - - void pots_destroy(pots_obj * obj); - - void pots_printf(const pots_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/scan.c b/src/signal/scan.c index f85a836..eeb26cf 100644 --- a/src/signal/scan.c +++ b/src/signal/scan.c @@ -21,7 +21,7 @@ * */ - #include "scan.h" + #include scans_obj * scans_construct_null(const unsigned int nLevels) { diff --git a/src/signal/scan.h b/src/signal/scan.h deleted file mode 100644 index da73e74..0000000 --- a/src/signal/scan.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef __ODAS_SIGNAL_SCAN -#define __ODAS_SIGNAL_SCAN - - /** - * \file scan.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - - #include "pair.h" - #include "point.h" - #include "tdoa.h" - #include "delta.h" - #include "index.h" - #include "spatialindex.h" - - //! Scan setup - typedef struct scans_obj { - - unsigned int nLevels; - - points_obj ** points; - tdoas_obj ** tdoas; - deltas_obj ** deltas; - spatialindexes_obj ** spatialindexes; - pairs_obj * pairs; - - indexes_obj ** indexes; - - } scans_obj; - - scans_obj * scans_construct_null(const unsigned int nLevels); - - void scans_destroy(scans_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/spatialgain.c b/src/signal/spatialgain.c index 7f2ea7e..b014753 100644 --- a/src/signal/spatialgain.c +++ b/src/signal/spatialgain.c @@ -21,7 +21,7 @@ * */ - #include "spatialgain.h" + #include spatialgains_obj * spatialgains_construct_zero(const unsigned int nChannels, const unsigned int nPoints) { @@ -81,4 +81,4 @@ } - } \ No newline at end of file + } diff --git a/src/signal/spatialgain.h b/src/signal/spatialgain.h deleted file mode 100644 index 3bcf7f9..0000000 --- a/src/signal/spatialgain.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef __ODAS_SIGNAL_SPATIALGAIN -#define __ODAS_SIGNAL_SPATIALGAIN - - /** - * \file spatialgain.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct spatialgains_obj { - - unsigned int nChannels; - unsigned int nPoints; - - float * array; - - } spatialgains_obj; - - spatialgains_obj * spatialgains_construct_zero(const unsigned int nChannels, const unsigned int nPoints); - - spatialgains_obj * spatialgains_clone(const spatialgains_obj * obj); - - void spatialgains_destroy(spatialgains_obj * obj); - - void spatialgains_printf(const spatialgains_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/spatialindex.c b/src/signal/spatialindex.c index bd19a5b..0eb1c04 100644 --- a/src/signal/spatialindex.c +++ b/src/signal/spatialindex.c @@ -21,7 +21,7 @@ * */ - #include "spatialindex.h" + #include spatialindexes_obj * spatialindexes_construct_zero(const unsigned int nPoints, const unsigned int nPairs) { @@ -98,4 +98,4 @@ } - } \ No newline at end of file + } diff --git a/src/signal/spatialindex.h b/src/signal/spatialindex.h deleted file mode 100644 index 0b72a84..0000000 --- a/src/signal/spatialindex.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef __ODAS_SIGNAL_SPATIALINDEX -#define __ODAS_SIGNAL_SPATIALINDEX - - /** - * \file spatialindex.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct spatialindexes_obj { - - unsigned int nPoints; - unsigned int nPairs; - - unsigned int * array; - unsigned int * count; - - } spatialindexes_obj; - - spatialindexes_obj * spatialindexes_construct_zero(const unsigned int nPoints, const unsigned int nPairs); - - spatialindexes_obj * spatialindexes_clone(const spatialindexes_obj * obj); - - void spatialindexes_destroy(spatialindexes_obj * obj); - - void spatialindexes_printf(const spatialindexes_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/spatialmask.c b/src/signal/spatialmask.c index 67c8f7e..b1d9fe5 100644 --- a/src/signal/spatialmask.c +++ b/src/signal/spatialmask.c @@ -21,7 +21,7 @@ * */ - #include "spatialmask.h" + #include spatialmasks_obj * spatialmasks_construct_zero(const unsigned int nPoints, const unsigned int nPairs) { @@ -90,4 +90,4 @@ } - } \ No newline at end of file + } diff --git a/src/signal/spatialmask.h b/src/signal/spatialmask.h deleted file mode 100644 index 478051e..0000000 --- a/src/signal/spatialmask.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef __ODAS_SIGNAL_SPATIALMASK -#define __ODAS_SIGNAL_SPATIALMASK - - /** - * \file spatialmask.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct spatialmasks_obj { - - unsigned int nPoints; - unsigned int nPairs; - - char * array; - - } spatialmasks_obj; - - spatialmasks_obj * spatialmasks_construct_zero(const unsigned int nPoints, const unsigned int nPairs); - - spatialmasks_obj * spatialmasks_clone(const spatialmasks_obj * obj); - - void spatialmasks_destroy(spatialmasks_obj * obj); - - void spatialmasks_printf(const spatialmasks_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/steer.c b/src/signal/steer.c index 9ee02f2..58a179c 100644 --- a/src/signal/steer.c +++ b/src/signal/steer.c @@ -21,7 +21,7 @@ * */ - #include "steer.h" + #include steers_obj * steers_construct_zero(const unsigned int halfFrameSize, const unsigned int nSeps, const unsigned int nChannels) { @@ -104,4 +104,4 @@ } - } \ No newline at end of file + } diff --git a/src/signal/steer.h b/src/signal/steer.h deleted file mode 100644 index f3b2c6e..0000000 --- a/src/signal/steer.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef __ODAS_SIGNAL_STEER -#define __ODAS_SIGNAL_STEER - - /** - * \file steer.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct steers_obj { - - unsigned int nSeps; - unsigned int nChannels; - unsigned int halfFrameSize; - - float ** array; - - } steers_obj; - - steers_obj * steers_construct_zero(const unsigned int halfFrameSize, const unsigned int nSeps, const unsigned int nChannels); - - void steers_destroy(steers_obj * obj); - - void steers_copy(steers_obj * dest, const steers_obj * src); - - void steers_printf(const steers_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/target.c b/src/signal/target.c index 6ecbde0..d56c0e5 100644 --- a/src/signal/target.c +++ b/src/signal/target.c @@ -21,7 +21,7 @@ * */ - #include "target.h" + #include targets_obj * targets_construct_zero(const unsigned int nTargets) { @@ -129,4 +129,4 @@ } - } \ No newline at end of file + } diff --git a/src/signal/target.h b/src/signal/target.h deleted file mode 100644 index f003ed2..0000000 --- a/src/signal/target.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef __ODAS_SIGNAL_TARGET -#define __ODAS_SIGNAL_TARGET - - /** - * \file target.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct targets_obj { - - unsigned int nTargets; - char ** tags; - float * array; - - } targets_obj; - - targets_obj * targets_construct_zero(const unsigned int nTargets); - - void targets_destroy(targets_obj * obj); - - targets_obj * targets_clone(const targets_obj * obj); - - void targets_copy(targets_obj * dest, const targets_obj * src); - - void targets_zero(targets_obj * obj); - - void targets_printf(const targets_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/tau.c b/src/signal/tau.c index 4f3da59..92e404d 100644 --- a/src/signal/tau.c +++ b/src/signal/tau.c @@ -21,7 +21,7 @@ * */ - #include "tau.h" + #include taus_obj * taus_construct_zero(const unsigned int nPoints, const unsigned int nPairs) { @@ -70,4 +70,4 @@ } - } \ No newline at end of file + } diff --git a/src/signal/tau.h b/src/signal/tau.h deleted file mode 100644 index 3dc6067..0000000 --- a/src/signal/tau.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef __ODAS_SIGNAL_TAU -#define __ODAS_SIGNAL_TAU - - /** - * \file tau.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct taus_obj { - - unsigned int nPoints; - unsigned int nPairs; - float * mu; - float * sigma2; - - } taus_obj; - - taus_obj * taus_construct_zero(const unsigned int nPoints, const unsigned int nPairs); - - void taus_destroy(taus_obj * obj); - - void taus_printf(const taus_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/tdoa.c b/src/signal/tdoa.c index a364e7a..29003ba 100644 --- a/src/signal/tdoa.c +++ b/src/signal/tdoa.c @@ -21,7 +21,7 @@ * */ - #include "tdoa.h" + #include tdoas_obj * tdoas_construct_zero(const unsigned int nPoints, const unsigned int nPairs) { diff --git a/src/signal/tdoa.h b/src/signal/tdoa.h deleted file mode 100644 index 62a8b21..0000000 --- a/src/signal/tdoa.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef __ODAS_SIGNAL_TDOA -#define __ODAS_SIGNAL_TDOA - - /** - * \file tdoa.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct tdoas_obj { - - unsigned int nPoints; - unsigned int nPairs; - unsigned int * array; - unsigned int * min; - unsigned int * max; - - } tdoas_obj; - - tdoas_obj * tdoas_construct_zero(const unsigned int nPoints, const unsigned int nPairs); - - void tdoas_destroy(tdoas_obj * obj); - - void tdoas_printf(const tdoas_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/track.c b/src/signal/track.c index 3229adb..7499963 100644 --- a/src/signal/track.c +++ b/src/signal/track.c @@ -21,7 +21,7 @@ * */ - #include "track.h" + #include tracks_obj * tracks_construct_zero(const unsigned int nTracks) { @@ -149,4 +149,4 @@ } - } \ No newline at end of file + } diff --git a/src/signal/track.h b/src/signal/track.h deleted file mode 100644 index 82437bf..0000000 --- a/src/signal/track.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef __ODAS_SIGNAL_TRACK -#define __ODAS_SIGNAL_TRACK - - /** - * \file track.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct tracks_obj { - - unsigned int nTracks; - unsigned long long * ids; - char ** tags; - float * array; - float * activity; - - } tracks_obj; - - tracks_obj * tracks_construct_zero(const unsigned int nTracks); - - void tracks_destroy(tracks_obj * obj); - - tracks_obj * tracks_clone(const tracks_obj * obj); - - void tracks_copy(tracks_obj * dest, const tracks_obj * src); - - void tracks_zero(tracks_obj * obj); - - void tracks_printf(const tracks_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/triangle.c b/src/signal/triangle.c index f8d887b..38658fa 100644 --- a/src/signal/triangle.c +++ b/src/signal/triangle.c @@ -21,7 +21,7 @@ * */ - #include "triangle.h" + #include triangles_obj * triangles_construct_zero(const unsigned int nTriangles) { @@ -64,4 +64,4 @@ } - } \ No newline at end of file + } diff --git a/src/signal/triangle.h b/src/signal/triangle.h deleted file mode 100644 index a3b2d2e..0000000 --- a/src/signal/triangle.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef __ODAS_SIGNAL_TRIANGLE -#define __ODAS_SIGNAL_TRIANGLE - - /** - * \file triangle.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct triangles_obj { - - unsigned nTriangles; - float * array; - - } triangles_obj; - - triangles_obj * triangles_construct_zero(const unsigned int nTriangles); - - void triangles_destroy(triangles_obj * obj); - - void triangles_printf(const triangles_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/window.c b/src/signal/window.c index 7a6a0e3..b159571 100644 --- a/src/signal/window.c +++ b/src/signal/window.c @@ -21,7 +21,7 @@ * */ - #include "window.h" + #include window_obj * window_construct_zero(const unsigned int frameSize) { @@ -42,4 +42,4 @@ free((void *) obj->array); free((void *) obj); - } \ No newline at end of file + } diff --git a/src/signal/window.h b/src/signal/window.h deleted file mode 100644 index 12bfce4..0000000 --- a/src/signal/window.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef __ODAS_SIGNAL_WINDOW -#define __ODAS_SIGNAL_WINDOW - - /** - * \file window.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - - typedef struct window_obj { - - unsigned int frameSize; - float * array; - - } window_obj; - - window_obj * window_construct_zero(const unsigned int frameSize); - - void window_destroy(window_obj * obj); - -#endif \ No newline at end of file diff --git a/src/signal/xcorr.c b/src/signal/xcorr.c index 52f418e..12da4ee 100644 --- a/src/signal/xcorr.c +++ b/src/signal/xcorr.c @@ -21,7 +21,7 @@ * */ - #include "xcorr.h" + #include xcorrs_obj * xcorrs_construct_zero(const unsigned int nSignals, const unsigned int frameSize) { @@ -119,4 +119,4 @@ printf("\n"); - } \ No newline at end of file + } diff --git a/src/signal/xcorr.h b/src/signal/xcorr.h deleted file mode 100644 index 55fa534..0000000 --- a/src/signal/xcorr.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef __ODAS_SIGNAL_XCORR -#define __ODAS_SIGNAL_XCORR - - /** - * \file xcorr.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct xcorrs_obj { - - unsigned int nSignals; - unsigned int frameSize; - float ** array; - - } xcorrs_obj; - - xcorrs_obj * xcorrs_construct_zero(const unsigned int nSignals, const unsigned int frameSize); - - void xcorrs_destroy(xcorrs_obj * obj); - - void xcorrs_copy(xcorrs_obj * dest, const xcorrs_obj * src); - - void xcorrs_zero(xcorrs_obj * obj); - - void xcorrs_printf(const xcorrs_obj * obj); - - void xcorrs_printf_signal(const xcorrs_obj * obj, const unsigned int iSignal); - -#endif \ No newline at end of file diff --git a/src/sink/snk_categories.c b/src/sink/snk_categories.c index 6586553..b5da588 100644 --- a/src/sink/snk_categories.c +++ b/src/sink/snk_categories.c @@ -21,7 +21,7 @@ * */ - #include "snk_categories.h" + #include snk_categories_obj * snk_categories_construct(const snk_categories_cfg * snk_categories_config, const msg_categories_cfg * msg_categories_config) { @@ -410,4 +410,4 @@ free((void *) snk_categories_config); - } \ No newline at end of file + } diff --git a/src/sink/snk_categories.h b/src/sink/snk_categories.h deleted file mode 100644 index 38dd9ae..0000000 --- a/src/sink/snk_categories.h +++ /dev/null @@ -1,115 +0,0 @@ -#ifndef __ODAS_SINK_CATEGORIES -#define __ODAS_SINK_CATEGORIES - - /** - * \file snk_categories.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - #include - #include - #include - #include - - #include "../general/format.h" - #include "../general/interface.h" - #include "../message/msg_categories.h" - #include "../utils/pcm.h" - - typedef struct snk_categories_obj { - - unsigned long long timeStamp; - - unsigned int nChannels; - unsigned int fS; - - format_obj * format; - interface_obj * interface; - - char * buffer; - unsigned int bufferSize; - - FILE * fp; - - struct sockaddr_in sserver; - int sid; - - msg_categories_obj * in; - - } snk_categories_obj; - - typedef struct snk_categories_cfg { - - unsigned int fS; - format_obj * format; - interface_obj * interface; - - } snk_categories_cfg; - - snk_categories_obj * snk_categories_construct(const snk_categories_cfg * snk_categories_config, const msg_categories_cfg * msg_categories_config); - - void snk_categories_destroy(snk_categories_obj * obj); - - void snk_categories_connect(snk_categories_obj * obj, msg_categories_obj * in); - - void snk_categories_disconnect(snk_categories_obj * obj); - - void snk_categories_open(snk_categories_obj * obj); - - void snk_categories_open_interface_blackhole(snk_categories_obj * obj); - - void snk_categories_open_interface_file(snk_categories_obj * obj); - - void snk_categories_open_interface_socket(snk_categories_obj * obj); - - void snk_categories_open_interface_terminal(snk_categories_obj * obj); - - void snk_categories_close(snk_categories_obj * obj); - - void snk_categories_close_interface_blackhole(snk_categories_obj * obj); - - void snk_categories_close_interface_file(snk_categories_obj * obj); - - void snk_categories_close_interface_socket(snk_categories_obj * obj); - - void snk_categories_close_interface_terminal(snk_categories_obj * obj); - - int snk_categories_process(snk_categories_obj * obj); - - void snk_categories_process_interface_blackhole(snk_categories_obj * obj); - - void snk_categories_process_interface_file(snk_categories_obj * obj); - - void snk_categories_process_interface_socket(snk_categories_obj * obj); - - void snk_categories_process_interface_terminal(snk_categories_obj * obj); - - void snk_categories_process_format_text_json(snk_categories_obj * obj); - - void snk_categories_process_format_undefined(snk_categories_obj * obj); - - snk_categories_cfg * snk_categories_cfg_construct(void); - - void snk_categories_cfg_destroy(snk_categories_cfg * snk_categories_config); - -#endif \ No newline at end of file diff --git a/src/sink/snk_hops.c b/src/sink/snk_hops.c index ff58648..406ad13 100644 --- a/src/sink/snk_hops.c +++ b/src/sink/snk_hops.c @@ -21,7 +21,7 @@ * */ - #include "snk_hops.h" + #include snk_hops_obj * snk_hops_construct(const snk_hops_cfg * snk_hops_config, const msg_hops_cfg * msg_hops_config) { @@ -465,4 +465,4 @@ free((void *) snk_hops_config); - } \ No newline at end of file + } diff --git a/src/sink/snk_hops.h b/src/sink/snk_hops.h deleted file mode 100644 index 677f225..0000000 --- a/src/sink/snk_hops.h +++ /dev/null @@ -1,118 +0,0 @@ -#ifndef __ODAS_SINK_HOPS -#define __ODAS_SINK_HOPS - - /** - * \file snk_hops.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - #include - #include - #include - #include - - #include "../general/format.h" - #include "../general/interface.h" - #include "../message/msg_hops.h" - #include "../utils/pcm.h" - - typedef struct snk_hops_obj { - - unsigned long long timeStamp; - - unsigned int hopSize; - unsigned int nChannels; - unsigned int fS; - - format_obj * format; - interface_obj * interface; - - char * buffer; - unsigned int bufferSize; - - FILE * fp; - - struct sockaddr_in sserver; - int sid; - - char bytes[4]; - - msg_hops_obj * in; - - } snk_hops_obj; - - typedef struct snk_hops_cfg { - - unsigned int fS; - format_obj * format; - interface_obj * interface; - - } snk_hops_cfg; - - snk_hops_obj * snk_hops_construct(const snk_hops_cfg * snk_hops_config, const msg_hops_cfg * msg_hops_config); - - void snk_hops_destroy(snk_hops_obj * obj); - - void snk_hops_connect(snk_hops_obj * obj, msg_hops_obj * in); - - void snk_hops_disconnect(snk_hops_obj * obj); - - void snk_hops_open(snk_hops_obj * obj); - - void snk_hops_open_interface_blackhole(snk_hops_obj * obj); - - void snk_hops_open_interface_file(snk_hops_obj * obj); - - void snk_hops_open_interface_socket(snk_hops_obj * obj); - - void snk_hops_close(snk_hops_obj * obj); - - void snk_hops_close_interface_blackhole(snk_hops_obj * obj); - - void snk_hops_close_interface_file(snk_hops_obj * obj); - - void snk_hops_close_interface_socket(snk_hops_obj * obj); - - int snk_hops_process(snk_hops_obj * obj); - - void snk_hops_process_interface_blackhole(snk_hops_obj * obj); - - void snk_hops_process_interface_file(snk_hops_obj * obj); - - void snk_hops_process_interface_socket(snk_hops_obj * obj); - - void snk_hops_process_format_binary_int08(snk_hops_obj * obj); - - void snk_hops_process_format_binary_int16(snk_hops_obj * obj); - - void snk_hops_process_format_binary_int24(snk_hops_obj * obj); - - void snk_hops_process_format_binary_int32(snk_hops_obj * obj); - - void snk_hops_process_format_undefined(snk_hops_obj * obj); - - snk_hops_cfg * snk_hops_cfg_construct(void); - - void snk_hops_cfg_destroy(snk_hops_cfg * snk_hops_config); - -#endif \ No newline at end of file diff --git a/src/sink/snk_pots.c b/src/sink/snk_pots.c index 07af0c7..a18c13d 100644 --- a/src/sink/snk_pots.c +++ b/src/sink/snk_pots.c @@ -21,7 +21,7 @@ * */ - #include "snk_pots.h" + #include snk_pots_obj * snk_pots_construct(const snk_pots_cfg * snk_pots_config, const msg_pots_cfg * msg_pots_config) { @@ -407,4 +407,4 @@ free((void *) snk_pots_config); - } \ No newline at end of file + } diff --git a/src/sink/snk_pots.h b/src/sink/snk_pots.h deleted file mode 100644 index bc9bc9b..0000000 --- a/src/sink/snk_pots.h +++ /dev/null @@ -1,116 +0,0 @@ -#ifndef __ODAS_SINK_POTS -#define __ODAS_SINK_POTS - - /** - * \file snk_pots.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - #include - #include - #include - #include - - #include "../general/format.h" - #include "../general/interface.h" - #include "../message/msg_pots.h" - - typedef struct snk_pots_obj { - - unsigned long long timeStamp; - - unsigned int nPots; - unsigned int fS; - - format_obj * format; - interface_obj * interface; - - char * buffer; - unsigned int bufferSize; - - FILE * fp; - - struct sockaddr_in sserver; - int sid; - - msg_pots_obj * in; - - } snk_pots_obj; - - typedef struct snk_pots_cfg { - - unsigned int fS; - format_obj * format; - interface_obj * interface; - - } snk_pots_cfg; - - snk_pots_obj * snk_pots_construct(const snk_pots_cfg * snk_pots_config, const msg_pots_cfg * msg_pots_config); - - void snk_pots_destroy(snk_pots_obj * obj); - - void snk_pots_connect(snk_pots_obj * obj, msg_pots_obj * in); - - void snk_pots_disconnect(snk_pots_obj * obj); - - void snk_pots_open(snk_pots_obj * obj); - - void snk_pots_open_interface_blackhole(snk_pots_obj * obj); - - void snk_pots_open_interface_file(snk_pots_obj * obj); - - void snk_pots_open_interface_socket(snk_pots_obj * obj); - - void snk_pots_open_interface_terminal(snk_pots_obj * obj); - - void snk_pots_close(snk_pots_obj * obj); - - void snk_pots_close_interface_blackhole(snk_pots_obj * obj); - - void snk_pots_close_interface_file(snk_pots_obj * obj); - - void snk_pots_close_interface_socket(snk_pots_obj * obj); - - void snk_pots_close_interface_terminal(snk_pots_obj * obj); - - int snk_pots_process(snk_pots_obj * obj); - - void snk_pots_process_interface_blackhole(snk_pots_obj * obj); - - void snk_pots_process_interface_file(snk_pots_obj * obj); - - void snk_pots_process_interface_socket(snk_pots_obj * obj); - - void snk_pots_process_interface_terminal(snk_pots_obj * obj); - - void snk_pots_process_format_binary_float(snk_pots_obj * obj); - - void snk_pots_process_format_text_json(snk_pots_obj * obj); - - void snk_pots_process_format_undefined(snk_pots_obj * obj); - - snk_pots_cfg * snk_pots_cfg_construct(void); - - void snk_pots_cfg_destroy(snk_pots_cfg * snk_pots_config); - -#endif \ No newline at end of file diff --git a/src/sink/snk_powers.c b/src/sink/snk_powers.c index bd7dd6e..17db926 100644 --- a/src/sink/snk_powers.c +++ b/src/sink/snk_powers.c @@ -21,7 +21,7 @@ * */ - #include "snk_powers.h" + #include snk_powers_obj * snk_powers_construct(const snk_powers_cfg * snk_powers_config, const msg_powers_cfg * msg_powers_config) { @@ -214,4 +214,4 @@ free((void *) snk_powers_config); - } \ No newline at end of file + } diff --git a/src/sink/snk_powers.h b/src/sink/snk_powers.h deleted file mode 100644 index 423d0ba..0000000 --- a/src/sink/snk_powers.h +++ /dev/null @@ -1,88 +0,0 @@ -#ifndef __ODAS_SINK_POWERS -#define __ODAS_SINK_POWERS - - /** - * \file snk_powers.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - #include "../general/format.h" - #include "../general/interface.h" - #include "../message/msg_powers.h" - - typedef struct snk_powers_obj { - - unsigned long long timeStamp; - - unsigned int halfFrameSize; - unsigned int nChannels; - unsigned int fS; - - format_obj * format; - interface_obj * interface; - - char * buffer; - unsigned int bufferSize; - - FILE * fp; - - msg_powers_obj * in; - - } snk_powers_obj; - - typedef struct snk_powers_cfg { - - unsigned int fS; - format_obj * format; - interface_obj * interface; - - } snk_powers_cfg; - - snk_powers_obj * snk_powers_construct(const snk_powers_cfg * snk_powers_config, const msg_powers_cfg * msg_powers_config); - - void snk_powers_destroy(snk_powers_obj * obj); - - void snk_powers_connect(snk_powers_obj * obj, msg_powers_obj * in); - - void snk_powers_disconnect(snk_powers_obj * obj); - - void snk_powers_open(snk_powers_obj * obj); - - void snk_powers_open_interface_blackhole(snk_powers_obj * obj); - - void snk_powers_close(snk_powers_obj * obj); - - void snk_powers_close_interface_blackhole(snk_powers_obj * obj); - - int snk_powers_process(snk_powers_obj * obj); - - void snk_powers_process_interface_blackhole(snk_powers_obj * obj); - - void snk_powers_process_format_undefined(snk_powers_obj * obj); - - snk_powers_cfg * snk_powers_cfg_construct(void); - - void snk_powers_cfg_destroy(snk_powers_cfg * snk_powers_config); - -#endif \ No newline at end of file diff --git a/src/sink/snk_spectra.c b/src/sink/snk_spectra.c index fd64a8a..710443f 100644 --- a/src/sink/snk_spectra.c +++ b/src/sink/snk_spectra.c @@ -21,7 +21,7 @@ * */ - #include "snk_spectra.h" + #include snk_spectra_obj * snk_spectra_construct(const snk_spectra_cfg * snk_spectra_config, const msg_spectra_cfg * msg_spectra_config) { @@ -219,4 +219,4 @@ free((void *) snk_spectra_config); - } \ No newline at end of file + } diff --git a/src/sink/snk_spectra.h b/src/sink/snk_spectra.h deleted file mode 100644 index 302ea19..0000000 --- a/src/sink/snk_spectra.h +++ /dev/null @@ -1,85 +0,0 @@ -#ifndef __ODAS_SINK_SPECTRA -#define __ODAS_SINK_SPECTRA - - /** - * \file snk_spectra.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - #include "../general/format.h" - #include "../general/interface.h" - #include "../message/msg_spectra.h" - - typedef struct snk_spectra_obj { - - unsigned long long timeStamp; - - unsigned int halfFrameSize; - unsigned int nChannels; - unsigned int fS; - - format_obj * format; - interface_obj * interface; - - FILE * fp; - - msg_spectra_obj * in; - - } snk_spectra_obj; - - typedef struct snk_spectra_cfg { - - unsigned int fS; - format_obj * format; - interface_obj * interface; - - } snk_spectra_cfg; - - snk_spectra_obj * snk_spectra_construct(const snk_spectra_cfg * snk_spectra_config, const msg_spectra_cfg * msg_spectra_config); - - void snk_spectra_destroy(snk_spectra_obj * obj); - - void snk_spectra_connect(snk_spectra_obj * obj, msg_spectra_obj * in); - - void snk_spectra_disconnect(snk_spectra_obj * obj); - - void snk_spectra_open(snk_spectra_obj * obj); - - void snk_spectra_open_interface_blackhole(snk_spectra_obj * obj); - - void snk_spectra_close(snk_spectra_obj * obj); - - void snk_spectra_close_interface_blackhole(snk_spectra_obj * obj); - - int snk_spectra_process(snk_spectra_obj * obj); - - void snk_spectra_process_interface_blackhole(snk_spectra_obj * obj); - - void snk_spectra_process_format_undefined(snk_spectra_obj * obj); - - snk_spectra_cfg * snk_spectra_cfg_construct(void); - - void snk_spectra_cfg_destroy(snk_spectra_cfg * snk_spectra_config); - -#endif \ No newline at end of file diff --git a/src/sink/snk_tracks.c b/src/sink/snk_tracks.c index 061d946..bc24fa2 100644 --- a/src/sink/snk_tracks.c +++ b/src/sink/snk_tracks.c @@ -21,7 +21,7 @@ * */ - #include "snk_tracks.h" + #include snk_tracks_obj * snk_tracks_construct(const snk_tracks_cfg * snk_tracks_config, const msg_tracks_cfg * msg_tracks_config) { diff --git a/src/sink/snk_tracks.h b/src/sink/snk_tracks.h deleted file mode 100644 index 98049cf..0000000 --- a/src/sink/snk_tracks.h +++ /dev/null @@ -1,114 +0,0 @@ -#ifndef __ODAS_SINK_TRACKS -#define __ODAS_SINK_TRACKS - - /** - * \file snk_tracks.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - #include - #include - #include - #include - - #include "../general/format.h" - #include "../general/interface.h" - #include "../message/msg_tracks.h" - - typedef struct snk_tracks_obj { - - unsigned long long timeStamp; - - unsigned int nTracks; - unsigned int fS; - - format_obj * format; - interface_obj * interface; - - char * buffer; - unsigned int bufferSize; - - FILE * fp; - - struct sockaddr_in sserver; - int sid; - - msg_tracks_obj * in; - - } snk_tracks_obj; - - typedef struct snk_tracks_cfg { - - unsigned int fS; - format_obj * format; - interface_obj * interface; - - } snk_tracks_cfg; - - snk_tracks_obj * snk_tracks_construct(const snk_tracks_cfg * snk_tracks_config, const msg_tracks_cfg * msg_tracks_config); - - void snk_tracks_destroy(snk_tracks_obj * obj); - - void snk_tracks_connect(snk_tracks_obj * obj, msg_tracks_obj * in); - - void snk_tracks_disconnect(snk_tracks_obj * obj); - - void snk_tracks_open(snk_tracks_obj * obj); - - void snk_tracks_open_interface_blackhole(snk_tracks_obj * obj); - - void snk_tracks_open_interface_file(snk_tracks_obj * obj); - - void snk_tracks_open_interface_socket(snk_tracks_obj * obj); - - void snk_tracks_open_interface_terminal(snk_tracks_obj * obj); - - void snk_tracks_close(snk_tracks_obj * obj); - - void snk_tracks_close_interface_blackhole(snk_tracks_obj * obj); - - void snk_tracks_close_interface_file(snk_tracks_obj * obj); - - void snk_tracks_close_interface_socket(snk_tracks_obj * obj); - - void snk_tracks_close_interface_terminal(snk_tracks_obj * obj); - - int snk_tracks_process(snk_tracks_obj * obj); - - void snk_tracks_process_interface_blackhole(snk_tracks_obj * obj); - - void snk_tracks_process_interface_file(snk_tracks_obj * obj); - - void snk_tracks_process_interface_socket(snk_tracks_obj * obj); - - void snk_tracks_process_interface_terminal(snk_tracks_obj * obj); - - void snk_tracks_process_format_text_json(snk_tracks_obj * obj); - - void snk_tracks_process_format_undefined(snk_tracks_obj * obj); - - snk_tracks_cfg * snk_tracks_cfg_construct(void); - - void snk_tracks_cfg_destroy(snk_tracks_cfg * snk_tracks_config); - -#endif \ No newline at end of file diff --git a/src/source/src_hops.c b/src/source/src_hops.c index 0769423..b2d9461 100644 --- a/src/source/src_hops.c +++ b/src/source/src_hops.c @@ -21,7 +21,7 @@ * */ - #include "src_hops.h" + #include src_hops_obj * src_hops_construct(const src_hops_cfg * src_hops_config, const msg_hops_cfg * msg_hops_config) { diff --git a/src/source/src_hops.h b/src/source/src_hops.h deleted file mode 100644 index b0a32b9..0000000 --- a/src/source/src_hops.h +++ /dev/null @@ -1,105 +0,0 @@ -#ifndef __ODAS_SOURCE_HOPS -#define __ODAS_SOURCE_HOPS - - /** - * \file src_hops.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - #include - - #include "../general/format.h" - #include "../general/interface.h" - #include "../message/msg_hops.h" - #include "../signal/hop.h" - #include "../utils/pcm.h" - - typedef struct src_hops_obj { - - unsigned long long timeStamp; - - unsigned int hopSize; - unsigned int nChannels; - unsigned int fS; - - format_obj * format; - interface_obj * interface; - - FILE * fp; - snd_pcm_t * ch; - - char * buffer; - unsigned int bufferSize; - - char bytes[4]; - - msg_hops_obj * out; - - } src_hops_obj; - - typedef struct src_hops_cfg { - - format_obj * format; - interface_obj * interface; - - } src_hops_cfg; - - src_hops_obj * src_hops_construct(const src_hops_cfg * src_hops_config, const msg_hops_cfg * msg_hops_config); - - void src_hops_destroy(src_hops_obj * obj); - - void src_hops_connect(src_hops_obj * obj, msg_hops_obj * out); - - void src_hops_disconnect(src_hops_obj * obj); - - void src_hops_open(src_hops_obj * obj); - - void src_hops_open_interface_file(src_hops_obj * obj); - - void src_hops_open_interface_soundcard(src_hops_obj * obj); - - void src_hops_close(src_hops_obj * obj); - - void src_hops_close_interface_file(src_hops_obj * obj); - - void src_hops_close_interface_soundcard(src_hops_obj * obj); - - int src_hops_process(src_hops_obj * obj); - - int src_hops_process_interface_file(src_hops_obj * obj); - - int src_hops_process_interface_soundcard(src_hops_obj * obj); - - void src_hops_process_format_binary_int08(src_hops_obj * obj); - - void src_hops_process_format_binary_int16(src_hops_obj * obj); - - void src_hops_process_format_binary_int24(src_hops_obj * obj); - - void src_hops_process_format_binary_int32(src_hops_obj * obj); - - src_hops_cfg * src_hops_cfg_construct(void); - - void src_hops_cfg_destroy(src_hops_cfg * src_hops_config); - -#endif \ No newline at end of file diff --git a/src/system/acorr2pitch.c b/src/system/acorr2pitch.c index 1fa32c0..c8074ed 100644 --- a/src/system/acorr2pitch.c +++ b/src/system/acorr2pitch.c @@ -21,7 +21,7 @@ * */ - #include "acorr2pitch.h" + #include acorr2pitch_obj * acorr2pitch_construct_zero(const unsigned int nSignals, const unsigned int halfFrameSize, const unsigned int winSize) { @@ -125,4 +125,4 @@ } - } \ No newline at end of file + } diff --git a/src/system/acorr2pitch.h b/src/system/acorr2pitch.h deleted file mode 100644 index ec08ab8..0000000 --- a/src/system/acorr2pitch.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef __ODAS_SYSTEM_ACORR2PITCH -#define __ODAS_SYSTEM_ACORR2PITCH - - /** - * \file acorr2pitch.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../signal/acorr.h" - #include "../signal/pitch.h" - - #include - - typedef struct acorr2pitch_obj { - - unsigned int nSignals; - unsigned int halfFrameSize; - unsigned int frameSize; - unsigned int winSize; - - } acorr2pitch_obj; - - acorr2pitch_obj * acorr2pitch_construct_zero(const unsigned int nSignals, const unsigned int halfFrameSize, const unsigned int winSize); - - void acorr2pitch_destroy(acorr2pitch_obj * obj); - - void acorr2pitch_process(acorr2pitch_obj * obj, const acorrs_obj * acorrs, pitches_obj * pitches); - -#endif \ No newline at end of file diff --git a/src/system/demixing2env.c b/src/system/demixing2env.c index e7b563b..5b36970 100644 --- a/src/system/demixing2env.c +++ b/src/system/demixing2env.c @@ -21,7 +21,7 @@ * */ - #include "demixing2env.h" + #include demixing2env_obj * demixing2env_construct_zero(const unsigned int nSeps, const unsigned int nChannels, const unsigned int halfFrameSize) { @@ -101,4 +101,4 @@ } - } \ No newline at end of file + } diff --git a/src/system/demixing2env.h b/src/system/demixing2env.h deleted file mode 100644 index bc71a7b..0000000 --- a/src/system/demixing2env.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef __ODAS_SYSTEM_DEMIXING2ENV -#define __ODAS_SYSTEM_DEMIXING2ENV - - /** - * \file demixing2env.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - #include - - #include "../signal/demixing.h" - #include "../signal/env.h" - #include "../signal/mask.h" - #include "../signal/track.h" - - typedef struct demixing2env_obj { - - unsigned int nSeps; - unsigned int nChannels; - unsigned int halfFrameSize; - - } demixing2env_obj; - - demixing2env_obj * demixing2env_construct_zero(const unsigned int nSeps, const unsigned int nChannels, const unsigned int halfFrameSize); - - void demixing2env_destroy(demixing2env_obj * obj); - - void demixing2env_process(demixing2env_obj * obj, const tracks_obj * tracks, const demixings_obj * demixings, const masks_obj * masks, const envs_obj * envsChannel, envs_obj * envsSeparated); - -#endif \ No newline at end of file diff --git a/src/system/demixing2freq.c b/src/system/demixing2freq.c index 2d1a96d..4f71084 100644 --- a/src/system/demixing2freq.c +++ b/src/system/demixing2freq.c @@ -21,7 +21,7 @@ * */ - #include "demixing2freq.h" + #include demixing2freq_obj * demixing2freq_construct_zero(const unsigned int nSeps, const unsigned int nChannels, const unsigned int halfFrameSize) { @@ -104,4 +104,4 @@ } - } \ No newline at end of file + } diff --git a/src/system/demixing2freq.h b/src/system/demixing2freq.h deleted file mode 100644 index c06209f..0000000 --- a/src/system/demixing2freq.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef __ODAS_SYSTEM_DEMIXING2FREQ -#define __ODAS_SYSTEM_DEMIXING2FREQ - - /** - * \file demixing2freq.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - #include - - #include "../signal/demixing.h" - #include "../signal/freq.h" - #include "../signal/mask.h" - #include "../signal/track.h" - - typedef struct demixing2freq_obj { - - unsigned int nSeps; - unsigned int nChannels; - unsigned int halfFrameSize; - - } demixing2freq_obj; - - demixing2freq_obj * demixing2freq_construct_zero(const unsigned int nSeps, const unsigned int nChannels, const unsigned int halfFrameSize); - - void demixing2freq_destroy(demixing2freq_obj * obj); - - void demixing2freq_process(demixing2freq_obj * obj, const tracks_obj * tracks, const demixings_obj * demixings, const masks_obj * masks, const freqs_obj * freqsChannel, freqs_obj * freqsSeparated); - -#endif \ No newline at end of file diff --git a/src/system/env2env.c b/src/system/env2env.c index 2c58313..3f0a3ee 100644 --- a/src/system/env2env.c +++ b/src/system/env2env.c @@ -21,7 +21,7 @@ * */ - #include "env2env.h" + #include env2env_mcra_obj * env2env_mcra_construct_zero(const unsigned int nChannels, const unsigned int halfFrameSize, const unsigned int bSize, const float alphaS, const unsigned int L, const float delta, const float alphaD) { @@ -1343,4 +1343,4 @@ } - } \ No newline at end of file + } diff --git a/src/system/env2env.h b/src/system/env2env.h deleted file mode 100644 index 828670c..0000000 --- a/src/system/env2env.h +++ /dev/null @@ -1,230 +0,0 @@ -#ifndef __ODAS_SYSTEM_ENV2ENV -#define __ODAS_SYSTEM_ENV2ENV - - /** - * \file env2env.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - #include "../signal/env.h" - #include "../signal/track.h" - #include "../utils/fft.h" - #include "../utils/transcendental.h" - - typedef struct env2env_mcra_obj { - - unsigned int nChannels; - unsigned int halfFrameSize; - - unsigned int bSize; - float alphaS; - unsigned int L; - float delta; - float alphaD; - - unsigned long long * idsPrev; - unsigned int * l; - - float * b; - float ** S; - float ** Smin; - float ** SminPrev; - float ** SPrev; - float ** Stmp; - float ** StmpPrev; - float ** Sf; - float ** lambdaD; - float ** lambdaDnext; - - } env2env_mcra_obj; - - typedef struct env2env_weight_obj { - - unsigned int nChannels; - unsigned int halfFrameSize; - - float alphaD; - float epsilon; - - float ** XPrev; - float ** xi; - float ** zetaPrev; - - } env2env_weight_obj; - - typedef struct env2env_interf_obj { - - unsigned int nChannels; - unsigned int halfFrameSize; - - float eta; - float alphaZ; - - float ** Zs; - float ** ZsPrev; - - } env2env_interf_obj; - - typedef struct env2env_gainspeech_obj { - - unsigned int nChannels; - unsigned int halfFrameSize; - - float alphaPmin; - float epsilon; - - float ** gamma; - float ** alphaP; - float ** xi; - float ** GH1; - float ** v; - - transcendental_obj * transcendental; - - } env2env_gainspeech_obj; - - typedef struct env2env_probspeech_obj { - - unsigned int nChannels; - unsigned int halfFrameSize; - unsigned int frameSize; - - float theta; - float alpha; - float maxAbsenceProb; - float Gmin; - - unsigned int winSizeLocal; - unsigned int winSizeGlobal; - unsigned int winSizeFrame; - - fft_obj * fft; - - float * winLocal; - float * winGlobal; - float * winFrame; - - float * winLocalShifted; - float * winGlobalShifted; - float * winFrameShifted; - - float * winLocalShiftedFreq; - float * winGlobalShiftedFreq; - float * winFrameShiftedFreq; - - float ** xiTime; - float ** xiFreq; - - float ** xiSmoothedLocalFreq; - float ** xiSmoothedGlobalFreq; - float ** xiSmoothedFrameFreq; - float ** xiSmoothedLocalTime; - float ** xiSmoothedGlobalTime; - float ** xiSmoothedFrameTime; - float ** xiSmoothedLocal; - float ** xiSmoothedGlobal; - float ** xiSmoothedFrame; - - float ** zetaLocal; - float ** zetaLocalPrev; - float ** zetaGlobal; - float ** zetaGlobalPrev; - float ** zetaFrame; - float ** zetaFramePrev; - - float ** PLocal; - float ** PGlobal; - float ** PFrame; - - float ** q; - float ** p; - - } env2env_probspeech_obj; - - typedef struct env2env_gainall_obj { - - unsigned int nChannels; - unsigned int halfFrameSize; - - float Gmin; - - } env2env_gainall_obj; - - typedef struct env2env_gainratio_obj { - - unsigned int nInitChannels; - unsigned int nChannels; - unsigned int halfFrameSize; - - float Gmin; - float Gmid; - float Gslope; - - float epsilon; - - } env2env_gainratio_obj; - - env2env_mcra_obj * env2env_mcra_construct_zero(const unsigned int nChannels, const unsigned int halfFrameSize, const unsigned int bSize, const float alphaS, const unsigned int L, const float delta, const float alphaD); - - void env2env_mcra_destroy(env2env_mcra_obj * obj); - - void env2env_mcra_process(env2env_mcra_obj * obj, const tracks_obj * tracks, const envs_obj * noisys, const envs_obj * estNoises, envs_obj * noises); - - env2env_weight_obj * env2env_weight_construct_zero(const unsigned int nChannels, const unsigned int halfFrameSize, const float alphaD, const float epsilon); - - void env2env_weight_destroy(env2env_weight_obj * obj); - - void env2env_weight_process(env2env_weight_obj * obj, const tracks_obj * tracks, const envs_obj * noisys, const envs_obj * noises, envs_obj * weights); - - env2env_interf_obj * env2env_interf_construct_zero(const unsigned int nChannels, const unsigned int halfFrameSize, const float eta, const float alphaZ); - - void env2env_interf_destroy(env2env_interf_obj * obj); - - void env2env_interf_process(env2env_interf_obj * obj, const tracks_obj * tracks, const envs_obj * seps, const envs_obj * noises, envs_obj * interfs); - - env2env_gainspeech_obj * env2env_gainspeech_construct_zero(const unsigned int nChannels, const unsigned int halfFrameSize, const float alphaPmin, const float epsilon); - - void env2env_gainspeech_destroy(env2env_gainspeech_obj * obj); - - void env2env_gainspeech_process(env2env_gainspeech_obj * obj, const tracks_obj * tracks, const envs_obj * seps, const envs_obj * noises, envs_obj * gains, envs_obj * snrs, envs_obj * vs); - - env2env_probspeech_obj * env2env_probspeech_construct_zero(const unsigned int nChannels, const unsigned int halfFrameSize, const float theta, const float alpha, const float maxAbsenceProb, const float Gmin, const unsigned int winSizeLocal, const unsigned int winSizeGlobal, const unsigned int winSizeFrame); - - void env2env_probspeech_destroy(env2env_probspeech_obj * obj); - - void env2env_probspeech_process(env2env_probspeech_obj * obj, const tracks_obj * tracks, const envs_obj * snrs, const envs_obj * vs, envs_obj * probspeechs); - - env2env_gainall_obj * env2env_gainall_construct_zero(const unsigned int nChannels, const unsigned int halfFrameSize, const float Gmin); - - void env2env_gainall_destroy(env2env_gainall_obj * obj); - - void env2env_gainall_process(env2env_gainall_obj * obj, const tracks_obj * tracks, const envs_obj * gainspeeches, const envs_obj * probspeeches, envs_obj * gainalls); - - env2env_gainratio_obj * env2env_gainratio_construct_zero(const unsigned int nInitChannels, const unsigned int nChannels, const unsigned int halfFrameSize, const float Gmin, const float Gmid, const float Gslope, const float epsilon); - - void env2env_gainratio_destroy(env2env_gainratio_obj * obj); - - void env2env_gainratio_process(env2env_gainratio_obj * obj, const tracks_obj * tracks, const envs_obj * seps, const envs_obj * diffuse, envs_obj * gainratio); - -#endif \ No newline at end of file diff --git a/src/system/frame2freq.c b/src/system/frame2freq.c index 640b509..fb579c8 100644 --- a/src/system/frame2freq.c +++ b/src/system/frame2freq.c @@ -21,7 +21,7 @@ * */ - #include "frame2freq.h" + #include frame2freq_obj * frame2freq_construct_zero(const unsigned int frameSize, const unsigned int halfFrameSize) { @@ -70,4 +70,4 @@ } - } \ No newline at end of file + } diff --git a/src/system/frame2freq.h b/src/system/frame2freq.h deleted file mode 100644 index 458ff06..0000000 --- a/src/system/frame2freq.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef __ODAS_SYSTEM_FRAME2FREQ -#define __ODAS_SYSTEM_FRAME2FREQ - - /** - * \file frame2freq.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - - #include "../init/windowing.h" - #include "../signal/frame.h" - #include "../signal/freq.h" - #include "../signal/window.h" - #include "../utils/fft.h" - - typedef struct frame2freq_obj { - - unsigned int frameSize; - unsigned int halfFrameSize; - - window_obj * win; - float * frame; - - fft_obj * fft; - - } frame2freq_obj; - - frame2freq_obj * frame2freq_construct_zero(const unsigned int frameSize, const unsigned int halfFrameSize); - - void frame2freq_destroy(frame2freq_obj * obj); - - void frame2freq_process(frame2freq_obj * obj, const frames_obj * frames, freqs_obj * freqs); - -#endif \ No newline at end of file diff --git a/src/system/frame2hop.c b/src/system/frame2hop.c index 0e3b25d..06afc4d 100644 --- a/src/system/frame2hop.c +++ b/src/system/frame2hop.c @@ -21,7 +21,7 @@ * */ - #include "frame2hop.h" + #include frame2hop_obj * frame2hop_construct_zero(const unsigned int hopSize, const unsigned int frameSize, const unsigned int nSignals) { @@ -86,4 +86,4 @@ } - } \ No newline at end of file + } diff --git a/src/system/frame2hop.h b/src/system/frame2hop.h deleted file mode 100644 index 15095b2..0000000 --- a/src/system/frame2hop.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef __ODAS_SYSTEM_FRAME2HOP -#define __ODAS_SYSTEM_FRAME2HOP - - /** - * \file frame2hop.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - - #include "../signal/hop.h" - #include "../signal/frame.h" - - typedef struct frame2hop_obj { - - unsigned int hopSize; - unsigned int frameSize; - unsigned int nSignals; - - float ** array; - - } frame2hop_obj; - - frame2hop_obj * frame2hop_construct_zero(const unsigned int hopSize, const unsigned int frameSize, const unsigned int nSignals); - - void frame2hop_destroy(frame2hop_obj * obj); - - void frame2hop_process(frame2hop_obj * obj, const frames_obj * frames, hops_obj * hops); - -#endif \ No newline at end of file diff --git a/src/system/freq2acorr.c b/src/system/freq2acorr.c index 2ae1f2e..f70986f 100644 --- a/src/system/freq2acorr.c +++ b/src/system/freq2acorr.c @@ -21,7 +21,7 @@ * */ - #include "freq2acorr.h" + #include freq2acorr_obj * freq2acorr_construct_zero(const unsigned int nSignals, const unsigned int halfFrameSize) { @@ -81,4 +81,4 @@ } - } \ No newline at end of file + } diff --git a/src/system/freq2acorr.h b/src/system/freq2acorr.h deleted file mode 100644 index 7406566..0000000 --- a/src/system/freq2acorr.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef __ODAS_SYSTEM_FREQ2ACORR -#define __ODAS_SYSTEM_FREQ2ACORR - - /** - * \file freq2acorr.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - #include "../signal/acorr.h" - #include "../signal/freq.h" - #include "../utils/fft.h" - - typedef struct freq2acorr_obj { - - unsigned int nSignals; - unsigned int halfFrameSize; - unsigned int frameSize; - - float * arrayIn; - float * arrayOut; - - fft_obj * fft; - - } freq2acorr_obj; - - freq2acorr_obj * freq2acorr_construct_zero(const unsigned int nSignals, const unsigned int halfFrameSize); - - void freq2acorr_destroy(freq2acorr_obj * obj); - - void freq2acorr_process(freq2acorr_obj * obj, const freqs_obj * freqs, acorrs_obj * acorrs); - -#endif \ No newline at end of file diff --git a/src/system/freq2env.c b/src/system/freq2env.c index 7818c5f..0dd058a 100644 --- a/src/system/freq2env.c +++ b/src/system/freq2env.c @@ -21,7 +21,7 @@ * */ - #include "freq2env.h" + #include freq2env_obj * freq2env_construct_zero(const unsigned int halfFrameSize) { @@ -65,4 +65,4 @@ } - } \ No newline at end of file + } diff --git a/src/system/freq2env.h b/src/system/freq2env.h deleted file mode 100644 index 3211c7c..0000000 --- a/src/system/freq2env.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef __ODAS_SYSTEM_FREQ2ENV -#define __ODAS_SYSTEM_FREQ2ENV - - /** - * \file freq2env.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - - #include "../signal/freq.h" - #include "../signal/env.h" - - typedef struct freq2env_obj { - - unsigned int halfFrameSize; - - } freq2env_obj; - - freq2env_obj * freq2env_construct_zero(const unsigned int halfFrameSize); - - void freq2env_destroy(freq2env_obj * obj); - - void freq2env_process(freq2env_obj * obj, const freqs_obj * freqs, envs_obj * envs); - -#endif \ No newline at end of file diff --git a/src/system/freq2frame.c b/src/system/freq2frame.c index 5344c8e..16cece5 100644 --- a/src/system/freq2frame.c +++ b/src/system/freq2frame.c @@ -21,7 +21,7 @@ * */ - #include "freq2frame.h" + #include freq2frame_obj * freq2frame_construct_zero(const unsigned int frameSize, const unsigned int halfFrameSize) { @@ -70,4 +70,4 @@ } - } \ No newline at end of file + } diff --git a/src/system/freq2frame.h b/src/system/freq2frame.h deleted file mode 100644 index 81d71b2..0000000 --- a/src/system/freq2frame.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef __ODAS_SYSTEM_FREQ2FRAME -#define __ODAS_SYSTEM_FREQ2FRAME - - /** - * \file freq2frame.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - - #include "../init/windowing.h" - #include "../signal/frame.h" - #include "../signal/freq.h" - #include "../signal/window.h" - #include "../utils/fft.h" - - typedef struct freq2frame_obj { - - unsigned int frameSize; - unsigned int halfFrameSize; - - window_obj * win; - float * frame; - - fft_obj * fft; - - } freq2frame_obj; - - freq2frame_obj * freq2frame_construct_zero(const unsigned int frameSize, const unsigned int halfFrameSize); - - void freq2frame_destroy(freq2frame_obj * obj); - - void freq2frame_process(freq2frame_obj * obj, const freqs_obj * freqs, frames_obj * frames); - -#endif \ No newline at end of file diff --git a/src/system/freq2freq.c b/src/system/freq2freq.c index e5076a2..bb61215 100644 --- a/src/system/freq2freq.c +++ b/src/system/freq2freq.c @@ -21,7 +21,7 @@ * */ - #include "freq2freq.h" + #include freq2freq_phasor_obj * freq2freq_phasor_construct_zero(const unsigned int halfFrameSize, const float epsilon) { diff --git a/src/system/freq2freq.h b/src/system/freq2freq.h deleted file mode 100644 index 640d45e..0000000 --- a/src/system/freq2freq.h +++ /dev/null @@ -1,110 +0,0 @@ -#ifndef __ODAS_SYSTEM_FREQ2FREQ -#define __ODAS_SYSTEM_FREQ2FREQ - - /** - * \file freq2freq.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - - #include "../signal/freq.h" - #include "../signal/env.h" - #include "../signal/pair.h" - #include "../signal/track.h" - - typedef struct freq2freq_phasor_obj { - - unsigned int halfFrameSize; - float epsilon; - - } freq2freq_phasor_obj; - - typedef struct freq2freq_weightedphasor_obj { - - unsigned int halfFrameSize; - float epsilon; - - } freq2freq_weightedphasor_obj; - - typedef struct freq2freq_product_obj { - - unsigned int halfFrameSize; - - } freq2freq_product_obj; - - typedef struct freq2freq_lowpass_obj { - - unsigned int halfFrameSize; - unsigned int lowPassCut; - - } freq2freq_lowpass_obj; - - typedef struct freq2freq_interpolate_obj { - - unsigned halfFrameSize; - unsigned halfFrameSizeInterp; - - } freq2freq_interpolate_obj; - - typedef struct freq2freq_gain_obj { - - unsigned int halfFrameSize; - - } freq2freq_gain_obj; - - freq2freq_phasor_obj * freq2freq_phasor_construct_zero(const unsigned int halfFrameSize, const float epsilon); - - void freq2freq_phasor_destroy(freq2freq_phasor_obj * obj); - - void freq2freq_phasor_process(freq2freq_phasor_obj * obj, const freqs_obj * freqs, freqs_obj * phasors); - - freq2freq_weightedphasor_obj * freq2freq_weightedphasor_construct_zero(const unsigned int halfFrameSize, const float epsilon); - - void freq2freq_weightedphasor_destroy(freq2freq_weightedphasor_obj * obj); - - void freq2freq_weightedphasor_process(freq2freq_weightedphasor_obj * obj, const freqs_obj * freqs, const envs_obj * weights, freqs_obj * weightedphasors); - - freq2freq_product_obj * freq2freq_product_construct_zero(const unsigned int halfFrameSize); - - void freq2freq_product_destroy(freq2freq_product_obj * obj); - - void freq2freq_product_process(freq2freq_product_obj * obj, const freqs_obj * freqs1, const freqs_obj * freqs2, const pairs_obj * pairs, freqs_obj * freqs12); - - freq2freq_lowpass_obj * freq2freq_lowpass_construct_zero(const unsigned int halfFrameSize, const unsigned int lowPassCut); - - void freq2freq_lowpass_destroy(freq2freq_lowpass_obj * obj); - - void freq2freq_lowpass_process(freq2freq_lowpass_obj * obj, const freqs_obj * freqsAllPass, freqs_obj * freqsLowPass); - - freq2freq_interpolate_obj * freq2freq_interpolate_construct_zero(const unsigned int halfFrameSize, const unsigned int halfFrameSizeInterp); - - void freq2freq_interpolate_destroy(freq2freq_interpolate_obj * obj); - - void freq2freq_interpolate_process(freq2freq_interpolate_obj * obj, const freqs_obj * freqs, const freqs_obj * freqsInterp); - - freq2freq_gain_obj * freq2freq_gain_construct_zero(const unsigned int halfFrameSize); - - void freq2freq_gain_destroy(freq2freq_gain_obj * obj); - - void freq2freq_gain_process(freq2freq_gain_obj * obj, const freqs_obj * freqsIn, const envs_obj * envsIn, freqs_obj * freqsOut); - -#endif \ No newline at end of file diff --git a/src/system/freq2xcorr.c b/src/system/freq2xcorr.c index 5efcbe3..d592a09 100644 --- a/src/system/freq2xcorr.c +++ b/src/system/freq2xcorr.c @@ -21,7 +21,7 @@ * */ - #include "freq2xcorr.h" + #include freq2xcorr_obj * freq2xcorr_construct_zero(const unsigned int frameSize, const unsigned int halfFrameSize) { @@ -72,4 +72,4 @@ } - } \ No newline at end of file + } diff --git a/src/system/freq2xcorr.h b/src/system/freq2xcorr.h deleted file mode 100644 index 2cb95c7..0000000 --- a/src/system/freq2xcorr.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef __ODAS_SYSTEM_FREQ2XCORR -#define __ODAS_SYSTEM_FREQ2XCORR - - /** - * \file freq2xcorr.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../signal/frame.h" - #include "../signal/freq.h" - #include "../signal/pair.h" - #include "../signal/tdoa.h" - #include "../signal/xcorr.h" - #include "../utils/fft.h" - - typedef struct freq2xcorr_obj { - - unsigned int frameSize; - unsigned int halfFrameSize; - - float * frame; - - fft_obj * fft; - - } freq2xcorr_obj; - - freq2xcorr_obj * freq2xcorr_construct_zero(const unsigned int frameSize, const unsigned int halfFrameSize); - - void freq2xcorr_destroy(freq2xcorr_obj * obj); - - void freq2xcorr_process(freq2xcorr_obj * obj, const freqs_obj * freqs, const pairs_obj * pairs, xcorrs_obj * xcorrs); - -#endif \ No newline at end of file diff --git a/src/system/gain2mask.c b/src/system/gain2mask.c index 6819b82..e4b91f9 100644 --- a/src/system/gain2mask.c +++ b/src/system/gain2mask.c @@ -21,7 +21,7 @@ * */ - #include "gain2mask.h" + #include gain2mask_obj * gain2mask_construct_zero(const unsigned int nSeps, const unsigned int nChannels, const float gainMin) { diff --git a/src/system/gain2mask.h b/src/system/gain2mask.h deleted file mode 100644 index 8dcc02d..0000000 --- a/src/system/gain2mask.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef __ODAS_SYSTEM_GAIN2MASK -#define __ODAS_SYSTEM_GAIN2MASK - - /** - * \file gain2mask.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../signal/gain.h" - #include "../signal/mask.h" - - #include - #include - - typedef struct gain2mask_obj { - - unsigned int nSeps; - unsigned int nChannels; - float gainMin; - - } gain2mask_obj; - - gain2mask_obj * gain2mask_construct_zero(const unsigned int nSeps, const unsigned int nChannels, const float gainMin); - - void gain2mask_destroy(gain2mask_obj * obj); - - void gain2mask_process(gain2mask_obj * obj, const gains_obj * gains, masks_obj * masks); - -#endif \ No newline at end of file diff --git a/src/system/hop2frame.c b/src/system/hop2frame.c index 1794c88..88a98a7 100644 --- a/src/system/hop2frame.c +++ b/src/system/hop2frame.c @@ -21,7 +21,7 @@ * */ - #include "hop2frame.h" + #include hop2frame_obj * hop2frame_construct_zero(const unsigned int hopSize, const unsigned int frameSize, const unsigned int nSignals) { @@ -78,4 +78,4 @@ } - } \ No newline at end of file + } diff --git a/src/system/hop2frame.h b/src/system/hop2frame.h deleted file mode 100644 index a384056..0000000 --- a/src/system/hop2frame.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef __ODAS_SYSTEM_HOP2FRAME -#define __ODAS_SYSTEM_HOP2FRAME - - /** - * \file hop2frame.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - - #include "../signal/hop.h" - #include "../signal/frame.h" - - typedef struct hop2frame_obj { - - unsigned int hopSize; - unsigned int frameSize; - unsigned int nSignals; - - float ** array; - - } hop2frame_obj; - - hop2frame_obj * hop2frame_construct_zero(const unsigned int hopSize, const unsigned int frameSize, const unsigned int nSignals); - - void hop2frame_destroy(hop2frame_obj * obj); - - void hop2frame_process(hop2frame_obj * obj, const hops_obj * hops, frames_obj * frames); - -#endif \ No newline at end of file diff --git a/src/system/hop2hop.c b/src/system/hop2hop.c index 5df48dc..74a87d4 100644 --- a/src/system/hop2hop.c +++ b/src/system/hop2hop.c @@ -21,7 +21,7 @@ * */ - #include "hop2hop.h" + #include hop2hop_multiplex_obj * hop2hop_multiplex_construct_zero(const unsigned int hopSize) { @@ -287,4 +287,4 @@ } - } \ No newline at end of file + } diff --git a/src/system/hop2hop.h b/src/system/hop2hop.h deleted file mode 100644 index 7ea3028..0000000 --- a/src/system/hop2hop.h +++ /dev/null @@ -1,89 +0,0 @@ -#ifndef __ODAS_SYSTEM_HOP2HOP -#define __ODAS_SYSTEM_HOP2HOP - - /** - * \file hop2hop.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - #include "../signal/hop.h" - #include "../general/link.h" - - typedef struct hop2hop_multiplex_obj { - - unsigned int hopSize; - - } hop2hop_multiplex_obj; - - typedef struct hop2hop_buffer_obj { - - unsigned int nSignals; - unsigned int hopSizeIn; - unsigned int hopSizeOut; - float intervalIn; - float intervalOut; - float intervalSize; - unsigned int bufferSize; - float ratio; - float delta; - - float iWrite; - float iRead; - - float ** array; - - } hop2hop_buffer_obj; - - typedef struct hop2hop_gain_obj { - - unsigned int hopSize; - float gain; - - } hop2hop_gain_obj; - - hop2hop_multiplex_obj * hop2hop_multiplex_construct_zero(const unsigned int hopSize); - - void hop2hop_multiplex_destroy(hop2hop_multiplex_obj * obj); - - void hop2hop_multiplex_process(hop2hop_multiplex_obj * obj, const links_obj * links, const hops_obj * src, hops_obj * dest); - - hop2hop_buffer_obj * hop2hop_buffer_construct_zero(const unsigned int nSignals, const unsigned int hopSizeIn, const unsigned int hopSizeOut, const float ratio); - - void hop2hop_buffer_destroy(hop2hop_buffer_obj * obj); - - void hop2hop_buffer_push(hop2hop_buffer_obj * obj, const hops_obj * hops); - - void hop2hop_buffer_pop(hop2hop_buffer_obj * obj, hops_obj * hops); - - char hop2hop_buffer_isFull(hop2hop_buffer_obj * obj); - - char hop2hop_buffer_isEmpty(hop2hop_buffer_obj * obj); - - hop2hop_gain_obj * hop2hop_gain_construct_zero(const unsigned int hopSize, const float gain); - - void hop2hop_gain_destroy(hop2hop_gain_obj * obj); - - void hop2hop_gain_process(hop2hop_gain_obj * obj, const hops_obj * src, hops_obj * dest); - -#endif \ No newline at end of file diff --git a/src/system/kalman2coherence.c b/src/system/kalman2coherence.c index fdb464c..27b2a61 100644 --- a/src/system/kalman2coherence.c +++ b/src/system/kalman2coherence.c @@ -21,7 +21,7 @@ * */ - #include "kalman2coherence.h" + #include kalman2coherence_obj * kalman2coherence_construct(const float epsilon, const float sigmaR) { @@ -190,4 +190,4 @@ } - } \ No newline at end of file + } diff --git a/src/system/kalman2coherence.h b/src/system/kalman2coherence.h deleted file mode 100644 index 1eb25cc..0000000 --- a/src/system/kalman2coherence.h +++ /dev/null @@ -1,79 +0,0 @@ -#ifndef __ODAS_SYSTEM_KALMAN2PRIOR -#define __ODAS_SYSTEM_KALMAN2PRIOR - - /** - * \file kalman2prior.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - - #include "../signal/coherence.h" - #include "../signal/kalman.h" - #include "../signal/pot.h" - #include "../utils/matrix.h" - - typedef struct kalman2coherence_obj { - - float epsilon; - - matrix_obj * H; - matrix_obj * Ht; - - matrix_obj * mu_t; - matrix_obj * mu_t_t; - matrix_obj * mu_s; - matrix_obj * mu_s_t; - matrix_obj * mu_st; - matrix_obj * mu_st_t; - - matrix_obj * HP; - matrix_obj * sigma_epsilon; - - matrix_obj * sigma_t; - matrix_obj * sigma_s; - matrix_obj * sigma_st; - - matrix_obj * sigma_t_epsilon; - matrix_obj * sigma_t_inv; - matrix_obj * sigma_s_inv; - matrix_obj * sigma_st_inv; - - matrix_obj * sigma_t_inv_mu_t; - matrix_obj * sigma_s_inv_mu_s; - matrix_obj * sigma_st_inv_mu_st; - - matrix_obj * mu_t_t_sigma_t_inv_mu_t; - matrix_obj * mu_s_t_sigma_s_inv_mu_s; - matrix_obj * mu_st_t_sigma_st_inv_mu_st; - - matrix_obj * sigma_t_inv_mu_t_sigma_s_inv_mu_s; - - } kalman2coherence_obj; - - kalman2coherence_obj * kalman2coherence_construct(const float epsilon, const float sigmaR); - - void kalman2coherence_destroy(kalman2coherence_obj * obj); - - void kalman2coherence_process(kalman2coherence_obj * obj, const kalman_obj * kalman, const pots_obj * pots, const unsigned int iTrack, coherences_obj * coherences); - - -#endif \ No newline at end of file diff --git a/src/system/kalman2kalman.c b/src/system/kalman2kalman.c index 7ed47e0..a55dd38 100644 --- a/src/system/kalman2kalman.c +++ b/src/system/kalman2kalman.c @@ -21,7 +21,7 @@ * */ - #include "kalman2kalman.h" + #include kalman2kalman_obj * kalman2kalman_construct(const float deltaT, const float sigmaQ, const float sigmaR, const float epsilon) { @@ -268,4 +268,4 @@ *y = kalman->x_lm1lm1->array[1*(kalman->x_lm1lm1->nCols)+0]; *z = kalman->x_lm1lm1->array[2*(kalman->x_lm1lm1->nCols)+0]; - } \ No newline at end of file + } diff --git a/src/system/kalman2kalman.h b/src/system/kalman2kalman.h deleted file mode 100644 index 3ee7fb9..0000000 --- a/src/system/kalman2kalman.h +++ /dev/null @@ -1,88 +0,0 @@ -#ifndef __ODAS_SYSTEM_KALMAN2KALMAN -#define __ODAS_SYSTEM_KALMAN2KALMAN - - /** - * \file kalman2kalman.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - #include "../signal/postprob.h" - #include "../signal/kalman.h" - #include "../signal/pot.h" - #include "../signal/target.h" - #include "../utils/matrix.h" - - typedef struct kalman2kalman_obj { - - float epsilon; - - float deltaT; - float sigmaQ; - float sigmaR; - - matrix_obj * F; - matrix_obj * Ft; - matrix_obj * Q; - matrix_obj * H; - matrix_obj * Ht; - matrix_obj * R; - - matrix_obj * FP; - matrix_obj * FPFt; - - matrix_obj * K; - matrix_obj * PHt; - matrix_obj * HP; - matrix_obj * HPHt; - matrix_obj * HPHt_R; - matrix_obj * HPHt_Rinv; - matrix_obj * Hx; - matrix_obj * z; - matrix_obj * z_Hx; - matrix_obj * Kz_Hx; - matrix_obj * pKz_Hx; - matrix_obj * KHP; - matrix_obj * pKHP; - - } kalman2kalman_obj; - - kalman2kalman_obj * kalman2kalman_construct(const float deltaT, const float sigmaQ, const float sigmaR, const float epsilon); - - void kalman2kalman_destroy(kalman2kalman_obj * obj); - - void kalman2kalman_init_pots(kalman2kalman_obj * obj, const pots_obj * pots, const unsigned int iPot, kalman_obj * kalman); - - void kalman2kalman_init_targets(kalman2kalman_obj * obj, const targets_obj * targets, const unsigned int iTarget, kalman_obj * kalman); - - void kalman2kalman_predict(kalman2kalman_obj * obj, kalman_obj * kalman); - - void kalman2kalman_predict_static(kalman2kalman_obj * obj, kalman_obj * kalman); - - void kalman2kalman_update(kalman2kalman_obj * obj, const postprobs_obj * postprobs, const unsigned int iTrack, const pots_obj * pots, kalman_obj * kalman); - - void kalman2kalman_update_static(kalman2kalman_obj * obj, const postprobs_obj * postprobs, const unsigned int iTrack, const pots_obj * pots, kalman_obj * kalman); - - void kalman2kalman_estimate(kalman2kalman_obj * obj, const kalman_obj * kalman, float * x, float * y, float * z); - -#endif \ No newline at end of file diff --git a/src/system/mixture2mixture.c b/src/system/mixture2mixture.c index 32a9a6e..ad40a70 100644 --- a/src/system/mixture2mixture.c +++ b/src/system/mixture2mixture.c @@ -21,7 +21,7 @@ * */ - #include "mixture2mixture.h" + #include mixture2mixture_obj * mixture2mixture_construct(const gaussians_1d_obj * active_gmm, const gaussians_1d_obj * inactive_gmm, const float diffuse_cst, const float Pfalse, const float Pnew, const float Ptrack, const float epsilon) { @@ -249,4 +249,4 @@ } - } \ No newline at end of file + } diff --git a/src/system/mixture2mixture.h b/src/system/mixture2mixture.h deleted file mode 100644 index c2482fd..0000000 --- a/src/system/mixture2mixture.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef __ODAS_SYSTEM_MIXTURE2MIXTURE -#define __ODAS_SYSTEM_MIXTURE2MIXTURE - - /** - * \file mixture2mixture.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - #include "../utils/gaussian.h" - #include "../signal/coherence.h" - #include "../signal/mixture.h" - #include "../signal/pot.h" - #include "../signal/postprob.h" - - typedef struct mixture2mixture_obj { - - gaussians_1d_obj * active; - gaussians_1d_obj * inactive; - float diffuse; - - float Pfalse; - float Pnew; - float Ptrack; - float epsilon; - - } mixture2mixture_obj; - - mixture2mixture_obj * mixture2mixture_construct(const gaussians_1d_obj * active_gmm, const gaussians_1d_obj * inactive_gmm, const float diffuse_cst, const float Pfalse, const float Pnew, const float Ptrack, const float epsilon); - - void mixture2mixture_destroy(mixture2mixture_obj * obj); - - void mixture2mixture_process(mixture2mixture_obj * obj, mixture_obj * mixture, const pots_obj * pots, const coherences_obj * coherences, postprobs_obj * postprobs); - -#endif \ No newline at end of file diff --git a/src/system/particle2coherence.c b/src/system/particle2coherence.c index 6a217b8..48c5956 100644 --- a/src/system/particle2coherence.c +++ b/src/system/particle2coherence.c @@ -21,7 +21,7 @@ * */ - #include "particle2coherence.h" + #include particle2coherence_obj * particle2coherence_construct(const float sigmaR) { @@ -87,4 +87,4 @@ } - } \ No newline at end of file + } diff --git a/src/system/particle2coherence.h b/src/system/particle2coherence.h deleted file mode 100644 index 3795692..0000000 --- a/src/system/particle2coherence.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef __ODAS_SYSTEM_PARTICLE2COHERENCE -#define __ODAS_SYSTEM_PARTICLE2COHERENCE - - /** - * \file particle2coherence.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../utils/gaussian.h" - #include "../signal/particle.h" - #include "../signal/coherence.h" - #include "../signal/pot.h" - - typedef struct particle2coherence_obj { - - float sigmaR; - float expScale; - float expFactor; - - } particle2coherence_obj; - - particle2coherence_obj * particle2coherence_construct(const float sigmaR); - - void particle2coherence_destroy(particle2coherence_obj * obj); - - void particle2coherence_process(particle2coherence_obj * obj, const particles_obj * particles, const pots_obj * pots, const unsigned int iTrack, coherences_obj * coherences); - -#endif \ No newline at end of file diff --git a/src/system/particle2particle.c b/src/system/particle2particle.c index 3dfae05..1c09555 100644 --- a/src/system/particle2particle.c +++ b/src/system/particle2particle.c @@ -21,7 +21,7 @@ * */ - #include "particle2particle.h" + #include particle2particle_obj * particle2particle_construct(const unsigned int nParticles, const float deltaT, const float st_alpha, const float st_beta, const float st_ratio, const float ve_alpha, const float ve_beta, const float ve_ratio, const float ac_alpha, const float ac_beta, const float ac_ratio, const double epsilon, const float sigmaR, const float Nmin) { @@ -312,4 +312,4 @@ *y = yTotal; *z = zTotal; - } \ No newline at end of file + } diff --git a/src/system/particle2particle.h b/src/system/particle2particle.h deleted file mode 100644 index 740ce52..0000000 --- a/src/system/particle2particle.h +++ /dev/null @@ -1,85 +0,0 @@ -#ifndef __ODAS_SYSTEM_PARTICLE2PARTICLE -#define __ODAS_SYSTEM_PARTICLE2PARTICLE - - /** - * \file particle2particle.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../utils/gaussian.h" - #include "../utils/random.h" - #include "../signal/particle.h" - #include "../signal/postprob.h" - #include "../signal/pot.h" - #include "../signal/target.h" - - typedef struct particle2particle_obj { - - unsigned int nParticles; - float deltaT; - - float alphas[3]; - float betas[3]; - float as[3]; - float bs[3]; - float ratios[3]; - - float sigmaR; - float expScale; - float expFactor; - - float * pdf_ratio; - unsigned int * indexes_ratio; - random_obj * rnd_ratio; - - float * pdf_weight; - unsigned int * indexes_weight; - random_obj * rnd_weight; - - float * realisation_normal; - double epsilon; - normaloff_obj * normaloff; - - float * sum_P_p_x_O; - particles_obj * particles; - - float Nmin; - - } particle2particle_obj; - - particle2particle_obj * particle2particle_construct(const unsigned int nParticles, const float deltaT, const float st_alpha, const float st_beta, const float st_ratio, const float ve_alpha, const float ve_beta, const float ve_ratio, const float ac_alpha, const float ac_beta, const float ac_ratio, const double epsilon, const float sigmaR, const float Nmin); - - void particle2particle_destroy(particle2particle_obj * obj); - - void particle2particle_init_pots(particle2particle_obj * obj, const pots_obj * pots, const unsigned int iPot, particles_obj * particles); - - void particle2particle_init_targets(particle2particle_obj * obj, const targets_obj * targets, const unsigned int iTarget, particles_obj * particles); - - void particle2particle_predict(particle2particle_obj * obj, particles_obj * particles); - - void particle2particle_predict_static(particle2particle_obj * obj, particles_obj * particles); - - void particle2particle_update(particle2particle_obj * obj, const postprobs_obj * postprobs, const unsigned int iTrack, const pots_obj * pots, particles_obj * particles); - - void particle2particle_update_static(particle2particle_obj * obj, const postprobs_obj * postprobs, const unsigned int iTrack, const pots_obj * pots, particles_obj * particles); - - void particle2particle_estimate(const particle2particle_obj * obj, const particles_obj * particles, float * x, float * y, float * z); - -#endif \ No newline at end of file diff --git a/src/system/pitch2category.c b/src/system/pitch2category.c index b86691d..13aa10b 100644 --- a/src/system/pitch2category.c +++ b/src/system/pitch2category.c @@ -21,7 +21,7 @@ * */ - #include "pitch2category.h" + #include pitch2category_obj * pitch2category_construct_zero(const unsigned int nSeps, const float tauMin, const float tauMax, const float deltaTauMax, const float alpha, const float gamma, const float phiMin, const float r0) { @@ -177,4 +177,4 @@ } - } \ No newline at end of file + } diff --git a/src/system/pitch2category.h b/src/system/pitch2category.h deleted file mode 100644 index 67c3580..0000000 --- a/src/system/pitch2category.h +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef __ODAS_SYSTEM_PITCH2CATEGORY -#define __ODAS_SYSTEM_PITCH2CATEGORY - - /** - * \file pitch2category.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - #include - - #include "../signal/category.h" - #include "../signal/pitch.h" - #include "../signal/track.h" - - typedef struct pitch2category_obj { - - unsigned int nSeps; - - float tauMin; - float tauMax; - float deltaTauMax; - float alpha; - float gamma; - float phiMin; - float r0; - - float * tausNow; - float * tausPrev; - float * deltaTausNow; - float * deltaTausPrev; - float * phisNow; - float * phisPrev; - float * vs; - float * rs; - char * categories; - - } pitch2category_obj; - - pitch2category_obj * pitch2category_construct_zero(const unsigned int nSeps, const float tauMin, const float tauMax, const float deltaTauMax, const float alpha, const float gamma, const float phiMin, const float r0); - - void pitch2category_destroy(pitch2category_obj * obj); - - void pitch2category_process(pitch2category_obj * obj, const pitches_obj * pitches, const tracks_obj * tracks, categories_obj * categories); - -#endif \ No newline at end of file diff --git a/src/system/steer2demixing.c b/src/system/steer2demixing.c index 71a9bb2..dc8a4b2 100644 --- a/src/system/steer2demixing.c +++ b/src/system/steer2demixing.c @@ -21,7 +21,7 @@ * */ - #include "steer2demixing.h" + #include int count = 0; diff --git a/src/system/steer2demixing.h b/src/system/steer2demixing.h deleted file mode 100644 index e147906..0000000 --- a/src/system/steer2demixing.h +++ /dev/null @@ -1,117 +0,0 @@ -#ifndef __ODAS_SYSTEM_STEER2DEMIXING -#define __ODAS_SYSTEM_STEER2DEMIXING - - /** - * \file steer2demixing.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - #include - - #include "../signal/demixing.h" - #include "../signal/freq.h" - #include "../signal/mask.h" - #include "../signal/steer.h" - #include "../signal/track.h" - - #include "../utils/cmatrix.h" - - typedef struct steer2demixing_ds_obj { - - unsigned int nSeps; - unsigned int nChannels; - unsigned int halfFrameSize; - float epsilon; - - float * gains2; - - } steer2demixing_ds_obj; - - typedef struct steer2demixing_gss_obj { - - unsigned int nSeps; - unsigned int nChannels; - unsigned int halfFrameSize; - float epsilon; - - float mu; - float lambda; - - cmatrix_obj * X; - cmatrix_obj * XH; - - cmatrix_obj ** Y; - cmatrix_obj ** YH; - cmatrix_obj ** Ryy; - cmatrix_obj ** E; - cmatrix_obj ** A; - cmatrix_obj ** AH; - cmatrix_obj ** Wn; - cmatrix_obj ** Wnp1; - cmatrix_obj ** dJ1; - cmatrix_obj ** dJ2; - - cmatrix_obj ** dJ1_EY; - cmatrix_obj ** dJ1_4EY; - cmatrix_obj ** dJ1_4EYXH; - - cmatrix_obj ** dJ2_WA; - cmatrix_obj ** dJ2_WAmI; - cmatrix_obj ** dJ2_2WAmI; - cmatrix_obj ** dJ2_2WAmIAH; - - cmatrix_obj ** alpha_dJ1; - cmatrix_obj ** alpha_dJ1_p_dJ2; - cmatrix_obj ** mu_alpha_dJ1_p_dJ2; - cmatrix_obj ** one_m_lambda_mu_Wn; - cmatrix_obj ** one_m_lambda_mu_Wn_m_mu_alpha_dJ1_p_dJ2; - - } steer2demixing_gss_obj; - - typedef struct steer2demixing_mvdr_obj { - - } steer2demixing_mvdr_obj; - - - steer2demixing_ds_obj * steer2demixing_ds_construct_zero(const unsigned int nSeps, const unsigned int nChannels, const unsigned int halfFrameSize, const float epsilon); - - void steer2demixing_ds_destroy(steer2demixing_ds_obj * obj); - - void steer2demixing_ds_process(steer2demixing_ds_obj * obj, const tracks_obj * tracks, const steers_obj * steers, const masks_obj * masks, demixings_obj * demixings); - - - steer2demixing_gss_obj * steer2demixing_gss_construct_zero(const unsigned int nSeps, const unsigned int nChannels, const unsigned int halfFrameSize, const float mu, const float lambda, const float epsilon); - - void steer2demixing_gss_destroy(steer2demixing_gss_obj * obj); - - void steer2demixing_gss_process(steer2demixing_gss_obj * obj, const tracks_obj * tracksPrev, const tracks_obj * tracks, const steers_obj * steers, const masks_obj * masks, const freqs_obj * freqs, const demixings_obj * demixingsPrev, demixings_obj * demixings); - - - steer2demixing_mvdr_obj * steer2demixing_mvdr_construct_zero(const unsigned int nSeps, const unsigned int nChannels, const unsigned int halfFrameSize, const float alpha, const float sigma, const unsigned int deltaK); - - void steer2demixing_mvdr_destroy(steer2demixing_mvdr_obj * obj); - - void steer2demixing_mvdr_process(steer2demixing_mvdr_obj * obj, const tracks_obj * tracks, const steers_obj * steers, const masks_obj * masks, const freqs_obj * freqs, demixings_obj * demixings); - - -#endif \ No newline at end of file diff --git a/src/system/track2gain.c b/src/system/track2gain.c index 0cfae8a..cd308b1 100644 --- a/src/system/track2gain.c +++ b/src/system/track2gain.c @@ -21,7 +21,7 @@ * */ - #include "track2gain.h" + #include track2gain_obj * track2gain_construct_zero(const unsigned int nSeps, const unsigned int nChannels, const float * directions, const float * direction) { @@ -135,4 +135,4 @@ } - } \ No newline at end of file + } diff --git a/src/system/track2gain.h b/src/system/track2gain.h deleted file mode 100644 index d1d8850..0000000 --- a/src/system/track2gain.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef __ODAS_SYSTEM_TRACK2GAIN -#define __ODAS_SYSTEM_TRACK2GAIN - - /** - * \file track2gain.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "../signal/beampattern.h" - #include "../signal/track.h" - #include "../signal/gain.h" - - #include - #include - #include - - typedef struct track2gain_obj { - - unsigned int nSeps; - unsigned int nChannels; - float * directions; - float * direction; - - } track2gain_obj; - - track2gain_obj * track2gain_construct_zero(const unsigned int nSeps, const unsigned int nChannels, const float * directions, const float * direction); - - void track2gain_destroy(track2gain_obj * obj); - - void track2gain_process(track2gain_obj * obj, const beampatterns_obj * beampatterns_mics, const beampatterns_obj * beampatterns_spatialfilter, const tracks_obj * tracks, gains_obj * gains); - - -#endif \ No newline at end of file diff --git a/src/system/track2steer.c b/src/system/track2steer.c index 166f297..0bbb61d 100644 --- a/src/system/track2steer.c +++ b/src/system/track2steer.c @@ -21,7 +21,7 @@ * */ - #include "track2steer.h" + #include track2steer_obj * track2steer_construct_zero(const unsigned int nSeps, const unsigned int nChannels, const unsigned int halfFrameSize, const float c, const unsigned int fS, const float * mics) { @@ -125,4 +125,4 @@ } - } \ No newline at end of file + } diff --git a/src/system/track2steer.h b/src/system/track2steer.h deleted file mode 100644 index 54db2b0..0000000 --- a/src/system/track2steer.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef __ODAS_SYSTEM_TRACK2STEER -#define __ODAS_SYSTEM_TRACK2STEER - - /** - * \file track2steer.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - #include - - #include "../signal/gain.h" - #include "../signal/mask.h" - #include "../signal/track.h" - #include "../signal/steer.h" - - typedef struct track2steer_obj { - - unsigned int nSeps; - unsigned int nChannels; - unsigned int halfFrameSize; - float c; - unsigned int fS; - float * mics; - - float * factor; - float speed; - - } track2steer_obj; - - track2steer_obj * track2steer_construct_zero(const unsigned int nSeps, const unsigned int nChannels, const unsigned int halfFrameSize, const float c, const unsigned int fS, const float * mics); - - void track2steer_destroy(track2steer_obj * obj); - - void track2steer_process(track2steer_obj * obj, const tracks_obj * tracks, const gains_obj * gains, const masks_obj * masks, steers_obj * steers); - -#endif \ No newline at end of file diff --git a/src/system/xcorr2aimg.c b/src/system/xcorr2aimg.c index d1226f9..6561a56 100644 --- a/src/system/xcorr2aimg.c +++ b/src/system/xcorr2aimg.c @@ -21,7 +21,7 @@ * */ - #include "xcorr2aimg.h" + #include xcorr2aimg_obj * xcorr2aimg_construct_zero(const unsigned int aimgSize) { @@ -71,4 +71,4 @@ - } \ No newline at end of file + } diff --git a/src/system/xcorr2aimg.h b/src/system/xcorr2aimg.h deleted file mode 100644 index bc53d75..0000000 --- a/src/system/xcorr2aimg.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef __ODAS_SYSTEM_XCORR2AIMG -#define __ODAS_SYSTEM_XCORR2AIMG - - /** - * \file xcorr2aimg.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - - #include "../signal/tdoa.h" - #include "../signal/index.h" - #include "../signal/xcorr.h" - #include "../signal/aimg.h" - #include "../signal/spatialindex.h" - - //! Update the states of the particle filter - typedef struct xcorr2aimg_obj { - - unsigned int aimgSize; ///< Number of points scanned. - - } xcorr2aimg_obj; - - xcorr2aimg_obj * xcorr2aimg_construct_zero(const unsigned int aimgSize); - - void xcorr2aimg_destroy(xcorr2aimg_obj * obj); - - void xcorr2aimg_process(xcorr2aimg_obj * obj, const tdoas_obj * tdoas, const indexes_obj * indexes, const spatialindexes_obj * spatialindexes, const unsigned int iCoarse, const xcorrs_obj * xcorrs, aimg_obj * aimg); - -#endif \ No newline at end of file diff --git a/src/system/xcorr2xcorr.c b/src/system/xcorr2xcorr.c index 60261da..51ac33d 100644 --- a/src/system/xcorr2xcorr.c +++ b/src/system/xcorr2xcorr.c @@ -21,7 +21,7 @@ * */ - #include "xcorr2xcorr.h" + #include xcorr2xcorr_obj * xcorr2xcorr_construct_zero(const unsigned int frameSize) { diff --git a/src/system/xcorr2xcorr.h b/src/system/xcorr2xcorr.h deleted file mode 100644 index 5d9c998..0000000 --- a/src/system/xcorr2xcorr.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef __ODAS_SYSTEM_XCORR -#define __ODAS_SYSTEM_XCORR - - /** - * \file xcorr2xcorr.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - - #include "../signal/delta.h" - #include "../signal/xcorr.h" - #include "../signal/tdoa.h" - #include "../signal/pair.h" - - typedef struct xcorr2xcorr_obj { - - unsigned int frameSize; ///< Number of samples per frame. - - } xcorr2xcorr_obj; - - xcorr2xcorr_obj * xcorr2xcorr_construct_zero(const unsigned int frameSize); - - void xcorr2xcorr_destroy(xcorr2xcorr_obj * obj); - - void xcorr2xcorr_process_max(xcorr2xcorr_obj * obj, const xcorrs_obj * xcorrs, const tdoas_obj * tdoas, const deltas_obj * deltas, const pairs_obj * pairs, xcorrs_obj * xcorrsMax); - - void xcorr2xcorr_process_reset(xcorr2xcorr_obj * obj, const tdoas_obj * tdoas, const deltas_obj * deltas, const pairs_obj * pairs, const unsigned int iPoint, xcorrs_obj * xcorrs); - -#endif \ No newline at end of file diff --git a/src/utils/cmatrix.c b/src/utils/cmatrix.c index 11143cd..1ec1253 100644 --- a/src/utils/cmatrix.c +++ b/src/utils/cmatrix.c @@ -21,7 +21,7 @@ * */ - #include "cmatrix.h" + #include cmatrix_obj * cmatrix_construct_zero(const unsigned int nRows, const unsigned int nCols) { @@ -233,4 +233,4 @@ } - } \ No newline at end of file + } diff --git a/src/utils/cmatrix.h b/src/utils/cmatrix.h deleted file mode 100644 index 03eab97..0000000 --- a/src/utils/cmatrix.h +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef __ODAS_UTILS_CMATRIX -#define __ODAS_UTILS_CMATRIX - - /** - * \file cmatrix.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - #include - - typedef struct cmatrix_obj { - - float * real; - float * imag; - unsigned int nRows; - unsigned int nCols; - - } cmatrix_obj; - - cmatrix_obj * cmatrix_construct_zero(const unsigned int nRows, const unsigned int nCols); - - cmatrix_obj * cmatrix_construct_matrix(const cmatrix_obj * cmatrix); - - void cmatrix_copy_zero(cmatrix_obj * obj); - - void cmatrix_copy_cmatrix(cmatrix_obj * obj, const cmatrix_obj * cmatrix); - - void cmatrix_destroy(cmatrix_obj * obj); - - void cmatrix_transpose(cmatrix_obj * obj, const cmatrix_obj * src); - - void cmatrix_hermitian(cmatrix_obj * obj, const cmatrix_obj * src); - - void cmatrix_add(cmatrix_obj * obj, const cmatrix_obj * src1, const cmatrix_obj * src2); - - void cmatrix_sub(cmatrix_obj * obj, const cmatrix_obj * src1, const cmatrix_obj * src2); - - void cmatrix_mul(cmatrix_obj * obj, const cmatrix_obj * src1, const cmatrix_obj * src2); - - void cmatrix_scale(cmatrix_obj * obj, const cmatrix_obj * src, const float scale); - - void cmatrix_zero(cmatrix_obj * obj); - - void cmatrix_printf(const cmatrix_obj * obj); - -#endif \ No newline at end of file diff --git a/src/utils/fft.c b/src/utils/fft.c index de322ea..c6d26a5 100644 --- a/src/utils/fft.c +++ b/src/utils/fft.c @@ -21,7 +21,7 @@ * */ - #include "fft.h" + #include fft_obj * fft_construct(const unsigned int frameSize) { @@ -96,4 +96,4 @@ } - } \ No newline at end of file + } diff --git a/src/utils/fft.h b/src/utils/fft.h deleted file mode 100644 index 883beef..0000000 --- a/src/utils/fft.h +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef __ODAS_UTILS_FFT -#define __ODAS_UTILS_FFT - - /** - * \file cmatrix.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - - //! FFT object. - typedef struct fft_obj { - - unsigned int frameSize; ///< Frame size (in samples). - unsigned int halfFrameSize; ///< Half frame size (frame size divided by 2 plus 1). - fftwf_plan R2C; ///< FFTW plan for FFT from real to complex. - fftwf_plan C2R; ///< FFTW plan for FFT from complex to real. - float * realArray; ///< Array that holds all real values. - fftwf_complex * complexArray; ///< Array that holds all complex values. - - } fft_obj; - - /** Constructor. Initialize all fields to perform FFT. - \param size FFT size (in samples). - \return Pointer to the instantiated object. - */ - fft_obj * fft_construct(const unsigned int size); - - /** Destructor. Free memory. - \param obj Object to be destroyed. - */ - void fft_destroy(fft_obj * obj); - - /** Perform Fast Fourier Transform (real vector as input, complex vector as output). - \param obj Object used. - \param in Pointer to the real array used for input. - \param out Pointer to the complex array used for output. - */ - void fft_r2c(fft_obj * obj, const float * in, float * out); - - /** Perform Inverse Fast Fourier Transform (complex vector as input, real vector as output). - \param obj Object used. - \param in Pointer to the complex array used for input. - \param out Pointer to the real array used for output. - */ - void fft_c2r(fft_obj * obj, const float * in, float * out); - -#endif \ No newline at end of file diff --git a/src/utils/fifo.c b/src/utils/fifo.c index 14c638c..2b8dd36 100644 --- a/src/utils/fifo.c +++ b/src/utils/fifo.c @@ -21,7 +21,7 @@ * */ - #include "fifo.h" + #include fifo_obj * fifo_construct_zero(const unsigned int nMaxElements) { @@ -111,4 +111,4 @@ } - } \ No newline at end of file + } diff --git a/src/utils/fifo.h b/src/utils/fifo.h deleted file mode 100644 index 8a626a3..0000000 --- a/src/utils/fifo.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef __ODAS_UTILS_FIFO -#define __ODAS_UTILS_FIFO - - /** - * \file fifo.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - #include - #include - - typedef struct fifo_obj { - - void ** array; - unsigned int nElements; - unsigned int nMaxElements; - - pthread_mutex_t use; - sem_t push; - sem_t pop; - - } fifo_obj; - - fifo_obj * fifo_construct_zero(const unsigned int nMaxElements); - - void fifo_destroy(fifo_obj * obj); - - void fifo_push(fifo_obj * obj, void * element); - - void * fifo_pop(fifo_obj * obj); - - int fifo_nElements(fifo_obj * obj); - - void fifo_printf(const fifo_obj * obj); - -#endif \ No newline at end of file diff --git a/src/utils/gaussian.c b/src/utils/gaussian.c index 8841719..970364b 100644 --- a/src/utils/gaussian.c +++ b/src/utils/gaussian.c @@ -21,7 +21,7 @@ * */ - #include "gaussian.h" + #include gaussian_1d_obj * gaussian_1d_construct_zero(void) { @@ -577,4 +577,4 @@ } - } \ No newline at end of file + } diff --git a/src/utils/gaussian.h b/src/utils/gaussian.h deleted file mode 100644 index 3713dfa..0000000 --- a/src/utils/gaussian.h +++ /dev/null @@ -1,297 +0,0 @@ -#ifndef __ODAS_UTILS_GAUSSIAN -#define __ODAS_UTILS_GAUSSIAN - - /** - * \file gaussian.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - //! 1-D gaussian - typedef struct gaussian_1d_obj { - - float weight; ///< Weight of the gaussian. - float mu_x; ///< Mean of the gaussian. - float sigma_x; ///< Standard deviation of the gaussian. - float scaleFactor; ///< Precomputed scale factor for the exponential function. - - } gaussian_1d_obj; - - //! 2-D gaussian - typedef struct gaussian_2d_obj { - - float weight; ///< Weight of the gaussian. - float mu_x; ///< X-component of the mean of the gaussian. - float mu_y; ///< Y-component of the mean of the gaussian. - float sigma_x; ///< X-component of the standard deviation of the gaussian. - float sigma_y; ///< Y-component of the standard deviation of the gaussian. - float scaleFactor; ///< Precomputed scale factor for the exponential function. - - } gaussian_2d_obj; - - //! 3-D gaussian - typedef struct gaussian_3d_obj { - - float weight; ///< Weight of the gaussian. - float mu_x; ///< X-component of the mean of the gaussian. - float mu_y; ///< Y-component of the mean of the gaussian. - float mu_z; ///< Z-component of the mean of the gaussian. - float sigma_x; ///< X-component of the standard deviation of the gaussian. - float sigma_y; ///< Y-component of the standard deviation of the gaussian. - float sigma_z; ///< Z-component of the standard deviation of the gaussian. - float scaleFactor; ///< Precomputed scale factor for the exponential function. - - } gaussian_3d_obj; - - //! 1-D gaussian mixture model - typedef struct gaussians_1d_obj { - - unsigned int nSignals; ///< Number of gaussians. - gaussian_1d_obj ** array; ///< List of gaussians. - - } gaussians_1d_obj; - - //! 2-D gaussian mixture model - typedef struct gaussians_2d_obj { - - unsigned int nSignals; ///< Number of gaussians. - gaussian_2d_obj ** array; ///< List of gaussians. - - } gaussians_2d_obj; - - //! 3-D gaussian mixture model - typedef struct gaussians_3d_obj { - - unsigned int nSignals; ///< Number of gaussians. - gaussian_3d_obj ** array; ///< List of gaussians. - - } gaussians_3d_obj; - - /** Constructor. Initialize all fields to zero (weight to 1, mean to 0, standard deviation to 1). - \return Pointer to the instantiated object. - */ - gaussian_1d_obj * gaussian_1d_construct_zero(void); - - /** Constructor. Initialize all fields to zero (weight to 1, means to 0, standard deviations to 1). - \return Pointer to the instantiated object. - */ - gaussian_2d_obj * gaussian_2d_construct_zero(void); - - /** Constructor. Initialize all fields to zero (weight to 1, means to 0, standard deviations to 1). - \return Pointer to the instantiated object. - */ - gaussian_3d_obj * gaussian_3d_construct_zero(void); - - /** Constructor. Initialize all fields to weight, mu and sigma. - \param weight Weight value. - \param mu_x Mean value. - \param sigma_x Standard deviation value. - \return Pointer to the instantiated object. - */ - gaussian_1d_obj * gaussian_1d_construct_weightmusigma(const float weight, const float mu_x, const float sigma_x); - - /** Constructor. Initialize all fields to weight, mus and sigmas. - \param weight Weight value. - \param mu_x X-coordinate of the mean. - \param mu_y Y-coordinate of the mean. - \param sigma_x X-coordinate of the standard deviation. - \param sigma_y Y-coordinate of the standard deviation. - \return Pointer to the instantiated object. - */ - gaussian_2d_obj * gaussian_2d_construct_weightmusigma(const float weight, const float mu_x, const float mu_y, const float sigma_x, const float sigma_y); - - /** Constructor. Initialize all fields to weight, mus and sigmas. - \param weight Weight value. - \param mu_x X-coordinate of the mean. - \param mu_y Y-coordinate of the mean. - \param mu_z Z-coordinate of the mean. - \param sigma_x X-coordinate of the standard deviation. - \param sigma_y Y-coordinate of the standard deviation. - \param sigma_z Z-coordinate of the standard deviation. - \return Pointer to the instantiated object. - */ - gaussian_3d_obj * gaussian_3d_construct_weightmusigma(const float weight, const float mu_x, const float mu_y, const float mu_z, const float sigma_x, const float sigma_y, const float sigma_z); - - /** Constructor. Clone the object. - \param gaussian Object to cloned. - \return Pointer to the instantiated object. - */ - gaussian_1d_obj * gaussian_1d_construct_gaussian(const gaussian_1d_obj * gaussian); - - /** Constructor. Clone the object. - \param gaussian Object to cloned. - \return Pointer to the instantiated object. - */ - gaussian_2d_obj * gaussian_2d_construct_gaussian(const gaussian_2d_obj * gaussian); - - /** Constructor. Clone the object. - \param gaussian Object to cloned. - \return Pointer to the instantiated object. - */ - gaussian_3d_obj * gaussian_3d_construct_gaussian(const gaussian_3d_obj * gaussian); - - /** Destructor. Free memory. - \param obj Object to be destroyed. - */ - void gaussian_1d_destroy(gaussian_1d_obj * obj); - - /** Destructor. Free memory. - \param obj Object to be destroyed. - */ - void gaussian_2d_destroy(gaussian_2d_obj * obj); - - /** Destructor. Free memory. - \param obj Object to be destroyed. - */ - void gaussian_3d_destroy(gaussian_3d_obj * obj); - - /** Evaluate the gaussian at x. - \param obj Object to be used. - \param x Value of x. - \return Value of the gaussian. - */ - float gaussian_1d_eval(const gaussian_1d_obj * obj, const float x); - - /** Evaluate the gaussian at x and y. - \param obj Object to be used. - \param x Value of x. - \param y Value of y. - \return Value of the gaussian. - */ - float gaussian_2d_eval(const gaussian_2d_obj * obj, const float x, const float y); - - /** Evaluate the gaussian at x, y and z. - \param obj Object to be used. - \param x Value of x. - \param y Value of y. - \param z Value of z. - \return Value of the gaussian. - */ - float gaussian_3d_eval(const gaussian_3d_obj * obj, const float x, const float y, const float z); - - /** Print the content of the gaussian. - \param obj Object to be used. - */ - void gaussian_1d_printf(const gaussian_1d_obj * obj); - - /** Print the content of the gaussian. - \param obj Object to be used. - */ - void gaussian_2d_printf(const gaussian_2d_obj * obj); - - /** Print the content of the gaussian. - \param obj Object to be used. - */ - void gaussian_3d_printf(const gaussian_3d_obj * obj); - - /** Constructor. Fill the array of objects with null pointers. - \param nSignals Number of gaussians. - \return Pointer to the instantiated object. - */ - gaussians_1d_obj * gaussians_1d_construct_null(const unsigned int nSignals); - - /** Constructor. Fill the array of objects with null pointers. - \param nSignals Number of gaussians. - \return Pointer to the instantiated object. - */ - gaussians_2d_obj * gaussians_2d_construct_null(const unsigned int nSignals); - - /** Constructor. Fill the array of objects with null pointers. - \param nSignals Number of gaussians. - \return Pointer to the instantiated object. - */ - gaussians_3d_obj * gaussians_3d_construct_null(const unsigned int nSignals); - - /** Constructor. Clone the gaussians. - \param gaussians Object to be cloned. - \return Pointer to the instantiated object. - */ - gaussians_1d_obj * gaussians_1d_construct_gaussians(const gaussians_1d_obj * gaussians); - - /** Constructor. Clone the gaussians. - \param gaussians Object to be cloned. - \return Pointer to the instantiated object. - */ - gaussians_2d_obj * gaussians_2d_construct_gaussians(const gaussians_2d_obj * gaussians); - - /** Constructor. Clone the gaussians. - \param gaussians Object to be cloned. - \return Pointer to the instantiated object. - */ - gaussians_3d_obj * gaussians_3d_construct_gaussians(const gaussians_3d_obj * gaussians); - - /** Destructor. Free memory. - \param obj Object to be destroyed. - */ - void gaussians_1d_destroy(gaussians_1d_obj * obj); - - /** Destructor. Free memory. - \param obj Object to be destroyed. - */ - void gaussians_2d_destroy(gaussians_2d_obj * obj); - - /** Destructor. Free memory. - \param obj Object to be destroyed. - */ - void gaussians_3d_destroy(gaussians_3d_obj * obj); - - /** Evaluate the gaussian mixture model (GMM) at x. - \param obj Object to be used. - \param x Value of x. - \return Value of the GMM. - */ - float gaussians_1d_eval(const gaussians_1d_obj * obj, const float x); - - /** Evaluate the gaussian mixture model (GMM) at x and y. - \param obj Object to be used. - \param x Value of x. - \param y Value of y. - \return Value of the GMM. - */ - float gaussians_2d_eval(const gaussians_2d_obj * obj, const float x, const float y); - - /** Evaluate the gaussian mixture model (GMM) at x, y and z. - \param obj Object to be used. - \param x Value of x. - \param y Value of y. - \param z Value of z. - \return Value of the GMM. - */ - float gaussians_3d_eval(const gaussians_3d_obj * obj, const float x, const float y, const float z); - - /** Print the content of the gaussian mixture model (GMM). - \param obj Object to be used. - */ - void gaussians_1d_printf(const gaussians_1d_obj * obj); - - /** Print the content of the gaussian mixture model (GMM). - \param obj Object to be used. - */ - void gaussians_2d_printf(const gaussians_2d_obj * obj); - - /** Print the content of the gaussian mixture model (GMM). - \param obj Object to be used. - */ - void gaussians_3d_printf(const gaussians_3d_obj * obj); - -#endif \ No newline at end of file diff --git a/src/utils/gaussjordan.c b/src/utils/gaussjordan.c index 41cd416..a4d4cd6 100644 --- a/src/utils/gaussjordan.c +++ b/src/utils/gaussjordan.c @@ -21,7 +21,7 @@ * */ - #include "gaussjordan.h" + #include gaussjordan_obj * gaussjordan_construct_zero(const unsigned int nRowsCols, const float epsilon) { @@ -188,4 +188,4 @@ } - } \ No newline at end of file + } diff --git a/src/utils/gaussjordan.h b/src/utils/gaussjordan.h deleted file mode 100644 index 3e3668f..0000000 --- a/src/utils/gaussjordan.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef __ODAS_UTILS_GAUSSJORDAN -#define __ODAS_UTILS_GAUSSJORDAN - - /** - * \file gaussjordan.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - - typedef struct gaussjordan_obj { - - unsigned int nRowsCols; - float * array; - float epsilon; - - } gaussjordan_obj; - - gaussjordan_obj * gaussjordan_construct_zero(const unsigned int nRowsCols, const float epsilon); - - void gaussjordan_destroy(gaussjordan_obj * obj); - - void gaussjordan_process(gaussjordan_obj * obj, const float * src, float * dest); - -#endif \ No newline at end of file diff --git a/src/utils/inverse.c b/src/utils/inverse.c index 3df3ea1..ba15717 100644 --- a/src/utils/inverse.c +++ b/src/utils/inverse.c @@ -21,7 +21,7 @@ * */ - #include "inverse.h" + #include inverse_real_obj * inverse_real_construct_zero(const unsigned int nRowsCols, const float epsilon) { @@ -117,4 +117,4 @@ memcpy(dest->real, obj->ApBAinvB_inv->array, sizeof(float) * obj->nRowsCols * obj->nRowsCols); memcpy(dest->imag, obj->mBpABinvA_inv->array, sizeof(float) * obj->nRowsCols * obj->nRowsCols); - } \ No newline at end of file + } diff --git a/src/utils/inverse.h b/src/utils/inverse.h deleted file mode 100644 index 7285721..0000000 --- a/src/utils/inverse.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef __ODAS_UTILS_INVERSE -#define __ODAS_UTILS_INVERSE - - /** - * \file inverse.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include "gaussjordan.h" - #include "matrix.h" - #include "cmatrix.h" - - typedef struct inverse_real_obj { - - unsigned int nRowsCols; - - gaussjordan_obj * gaussjordan; - - } inverse_real_obj; - - typedef struct inverse_complex_obj { - - unsigned int nRowsCols; - - gaussjordan_obj * gaussjordan; - - matrix_obj * A; - matrix_obj * B; - - matrix_obj * Ainv; - matrix_obj * Binv; - - matrix_obj * BAinv; - matrix_obj * ABinv; - - matrix_obj * BAinvB; - matrix_obj * ABinvA; - - matrix_obj * ApBAinvB; - matrix_obj * BpABinvA; - - matrix_obj * ApBAinvB_inv; - matrix_obj * BpABinvA_inv; - - matrix_obj * mBpABinvA_inv; - - } inverse_complex_obj; - - inverse_real_obj * inverse_real_construct_zero(const unsigned int nRowsCols, const float epsilon); - - void inverse_real_destroy(inverse_real_obj * obj); - - void inverse_real_process(inverse_real_obj * obj, const matrix_obj * src, matrix_obj * dest); - - inverse_complex_obj * inverse_complex_construct_zero(const unsigned int nRowsCols, const float epsilon); - - void inverse_complex_destroy(inverse_complex_obj * obj); - - void inverse_complex_process(inverse_complex_obj * obj, const cmatrix_obj * src, cmatrix_obj * dest); - -#endif \ No newline at end of file diff --git a/src/utils/matrix.c b/src/utils/matrix.c index 5af6877..79de62c 100644 --- a/src/utils/matrix.c +++ b/src/utils/matrix.c @@ -21,7 +21,7 @@ * */ - #include "matrix.h" + #include matrix_obj * matrix_construct_zero(const unsigned int nRows, const unsigned int nCols) { @@ -281,4 +281,4 @@ } - } \ No newline at end of file + } diff --git a/src/utils/matrix.h b/src/utils/matrix.h deleted file mode 100644 index 62833b9..0000000 --- a/src/utils/matrix.h +++ /dev/null @@ -1,120 +0,0 @@ -#ifndef __ODAS_UTILS_MATRIX -#define __ODAS_UTILS_MATRIX - - /** - * \file matrix.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - #include - - //! Matrix - typedef struct matrix_obj { - - float * array; ///< Array of elements in the matrix. - unsigned int nRows; ///< Number of rows. - unsigned int nCols; ///< Number of columns. - - } matrix_obj; - - /** Constructor. Initialize all elements to zero in a matrix nRows x nCols. - \param nRows Number of rows. - \param nCols Number of columns. - \return Pointer to the instantiated object. - */ - matrix_obj * matrix_construct_zero(const unsigned int nRows, const unsigned int nCols); - - /** Constructor. Clone the object. - \param matrix Object to be cloned. - \return Pointer to the instantiated object. - */ - matrix_obj * matrix_construct_matrix(const matrix_obj * matrix); - - /** Set elements to 0. - \param obj Object to be used. - */ - void matrix_copy_zero(matrix_obj * obj); - - /** Set fields to the field values of the model object. No memory allocated. - \param matrix Object to be copied. - \param obj Object to be modified. - */ - void matrix_copy_matrix(matrix_obj * obj, const matrix_obj * matrix); - - /** Destructor. Free memory. - \param obj Object to be destroyed. - */ - void matrix_destroy(matrix_obj * obj); - - /** Compute the matrix transpose. - \param src Matrix to be transpose. - \param obj Transposed matrix. - */ - void matrix_transpose(matrix_obj * obj, const matrix_obj * src); - - /** Add two matrices. - \param src1 First matrix to be added. - \param src2 Second matrix to be added. - \param obj Result of the addition. - */ - void matrix_add(matrix_obj * obj, const matrix_obj * src1, const matrix_obj * src2); - - /** Subtract two matrices. - \param src1 Matrix to be subtracted from. - \param src2 Matrix to subtract. - \param obj Result of the subtraction. - */ - void matrix_sub(matrix_obj * obj, const matrix_obj * src1, const matrix_obj * src2); - - /** Multiply two matrices. - \param src1 First matrix to be multiplied. - \param src2 Second matrix to be multiplied. - \param obj Result of the multiplication. - */ - void matrix_mul(matrix_obj * obj, const matrix_obj * src1, const matrix_obj * src2); - - /** Inverse a matrix. - \param src Matrix to be inverted. - \param obj Inverted matrix. - */ - void matrix_inv(matrix_obj * obj, const matrix_obj * src); - - /** Compute the determinant. - \param obj Matrix which determinant is computed. - \return Determinant value. - */ - float matrix_det(const matrix_obj * obj); - - /** Multiply a matrix by a scalar. - \param src Matrix to be scaled. - \param scale Scaling factor. - \param obj Scaled matrix. - */ - void matrix_scale(matrix_obj * obj, const matrix_obj * src, const float scale); - - /** Print the content of the matrix. - \param obj Object to be used. - */ - void matrix_printf(const matrix_obj * obj); - -#endif \ No newline at end of file diff --git a/src/utils/pcm.c b/src/utils/pcm.c index bf8aa9b..c9d1191 100644 --- a/src/utils/pcm.c +++ b/src/utils/pcm.c @@ -21,7 +21,7 @@ * */ - #include "pcm.h" + #include float pcm_signedXXbits2normalized(const char * bytes, const unsigned int nBytes) { diff --git a/src/utils/pcm.h b/src/utils/pcm.h deleted file mode 100644 index 33a01f9..0000000 --- a/src/utils/pcm.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef __ODAS_UTILS_PCM -#define __ODAS_UTILS_PCM - - /** - * \file pcm.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - - float pcm_signedXXbits2normalized(const char * bytes, const unsigned int nBytes); - - void pcm_signedXXbits2json(const char * bytes, const unsigned int nBytes, char * json); - - void pcm_normalized2signedXXbits(const float sample, const unsigned int nBytes, char * bytes); - -#endif \ No newline at end of file diff --git a/src/utils/random.c b/src/utils/random.c index d6572f4..7391428 100644 --- a/src/utils/random.c +++ b/src/utils/random.c @@ -21,7 +21,7 @@ * */ - #include "random.h" + #include random_obj * random_construct_zero(const unsigned int N) { diff --git a/src/utils/random.h b/src/utils/random.h deleted file mode 100644 index 76f0a5a..0000000 --- a/src/utils/random.h +++ /dev/null @@ -1,118 +0,0 @@ -#ifndef __ODAS_UTILS_RANDOM -#define __ODAS_UTILS_RANDOM - - /** - * \file random.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - #include - - //! Random number generator - typedef struct random_obj { - - unsigned int N; ///< Number of elements in the space - unsigned int I; ///< Number of iterations to perform a binary search - float * pdf; ///< Probability density function (probability mass function) - float * cdf; ///< Cumulative density function - - } random_obj; - - //! Standard normal number generator - typedef struct normal_obj { - - double epsilon; ///< Small value to perform the Box-Muller transform. - - } normal_obj; - - //! Standard normal number generator offline - typedef struct normaloff_obj { - - unsigned int N; ///< Number of samples. - float * values; ///< Normally distributed samples. - - } normaloff_obj; - - /** Constructor. Initialize all elements to zero. - \param N Number of elements in the space. - \return Pointer to the instantiated object. - */ - random_obj * random_construct_zero(const unsigned int N); - - /** Destructor. Free memory. - \param obj Object to be destroyed. - */ - void random_destroy(random_obj * obj); - - /** Set the PDF. - \param pdf Array that contains the PDF values. - \param obj Object to be modified. - */ - void random_pdf(random_obj * obj, const float * pdf); - - /** Pick element randomly according to the PDF, and return the index. - \param nSamples Number of elements to pick. - \param indexes Array that contains the returned indexes. - \param obj Object to be used. - */ - void random_generate(const random_obj * obj, const unsigned int nSamples, unsigned int * indexes); - - /** Constructor. - \param epsilon Small value to perform the Box-Muller transform. - \return Pointer of the instantiated object. - */ - normal_obj * normal_construct_zero(const double epsilon); - - /** Destructor. Free memory. - \param obj Object to be destroyed. - */ - void normal_destroy(normal_obj * obj); - - /** Generate a random number according to a standard normal distribution. - \param nSamples Number of random numbers to generate. - \param values Array that contains the generated random numbers. - \param obj Object to be used. - */ - void normal_generate(const normal_obj * obj, const unsigned int nSamples, float * values); - - /** Constructor. - \param epsilon Small value to perform the Box-Muller transform. - \param N Number of random numbers generated offline and stored. - \return Pointer of the instantiated object. - */ - normaloff_obj * normaloff_construct_rnd(const double epsilon, const unsigned int N); - - /** Destructor. Free memory. - \param obj Object to be destroyed. - */ - void normaloff_destroy(normaloff_obj * obj); - - /** Generate a random number according to a standard normal distribution. - \param nSamples Number of random numbers to generate. - \param values Array that contains the generated random numbers. - \param obj Object to be used. - */ - void normaloff_generate(const normaloff_obj * obj, const unsigned int nSamples, float * values); - - -#endif \ No newline at end of file diff --git a/src/utils/transcendental.c b/src/utils/transcendental.c index 6904d30..674ac71 100644 --- a/src/utils/transcendental.c +++ b/src/utils/transcendental.c @@ -21,7 +21,7 @@ * */ - #include "transcendental.h" + #include transcendental_obj * transcendental_construct_zero(const float minValue, const float maxValue, const unsigned int nElements) { @@ -97,4 +97,4 @@ return obj->array[iElement]; - } \ No newline at end of file + } diff --git a/src/utils/transcendental.h b/src/utils/transcendental.h deleted file mode 100644 index ca32709..0000000 --- a/src/utils/transcendental.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef __ODAS_UTILS_TRANSCENDENTAL -#define __ODAS_UTILS_TRANSCENDENTAL - - /** - * \file transcendental.h - * \author François Grondin - * \version 2.0 - * \date 2018-03-18 - * \copyright - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - #include - #include - #include - #include - - typedef struct transcendental_obj { - - float maxValue; - float minValue; - float interval; - - float * array; - unsigned int nElements; - - } transcendental_obj; - - transcendental_obj * transcendental_construct_zero(const float minValue, const float maxValue, const unsigned int nElements); - - void transcendental_destroy(transcendental_obj * obj); - - float transcendental_process(const transcendental_obj * obj, const float value); - -#endif \ No newline at end of file