Compare commits
5 commits
4672159f50
...
2443e553c8
Author | SHA1 | Date | |
---|---|---|---|
QuentinPerret | 2443e553c8 | ||
QuentinPerret | 2bd028910f | ||
QuentinPerret | 29ce8ac9d9 | ||
QuentinPerret | 713b8aae5e | ||
QuentinPerret | 49060a8419 |
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -12,6 +12,7 @@ Code-C/DartConfiguration.tcl
|
|||
Code-C/tsl
|
||||
|
||||
Makefile
|
||||
.vscode
|
||||
|
||||
# Created by https://www.toptal.com/developers/gitignore/api/cmake,c
|
||||
# Edit at https://www.toptal.com/developers/gitignore?templates=cmake,c
|
||||
|
|
7
.vscode/launch.json
vendored
7
.vscode/launch.json
vendored
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": []
|
||||
}
|
26
.vscode/settings.json
vendored
26
.vscode/settings.json
vendored
|
@ -1,26 +0,0 @@
|
|||
{
|
||||
"C_Cpp.errorSquiggles": "Disabled",
|
||||
"files.associations": {
|
||||
"time.h": "c",
|
||||
"b2hd.h": "c",
|
||||
"main.h": "c",
|
||||
"stdio.h": "c",
|
||||
"string.h": "c",
|
||||
"initialparameters.h": "c",
|
||||
"filegestion.h": "c",
|
||||
"power.h": "c",
|
||||
"getarray.h": "c",
|
||||
"math.h": "c",
|
||||
"limits": "c",
|
||||
"*.tcc": "c",
|
||||
"type_traits": "c",
|
||||
"simulateflux.h": "c",
|
||||
"pthread.h": "c",
|
||||
"types.h": "c",
|
||||
"average.h": "c",
|
||||
"queue.h": "c",
|
||||
"growthrate.h": "c",
|
||||
"stdbool.h": "c"
|
||||
},
|
||||
"cmake.configureOnOpen": false
|
||||
}
|
20
.vscode/tasks.json
vendored
20
.vscode/tasks.json
vendored
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"tasks": [
|
||||
{
|
||||
"type": "cppbuild",
|
||||
"label": "C/C++: gcc.exe build active file",
|
||||
"command": "C:/msys64/mingw64/bin/gcc.exe",
|
||||
"args": ["-g", "${file}", "-o", "${fileDirname}\\${fileBasenameNoExtension}"],
|
||||
"options": {
|
||||
"cwd": "${fileDirname}"
|
||||
},
|
||||
"problemMatcher": ["$gcc"],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"detail": "compiler: C:/msys64/mingw64/bin/gcc.exe"
|
||||
}
|
||||
],
|
||||
"version": "2.0.0"
|
||||
}
|
5
Code-C/.vscode/settings.json
vendored
5
Code-C/.vscode/settings.json
vendored
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"files.associations": {
|
||||
"power.h": "c"
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required(VERSION 2.6)
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
project(Traitement-signal-plantes C)
|
||||
|
||||
include(CTest)
|
||||
|
@ -10,16 +10,21 @@ file(MAKE_DIRECTORY Executable)
|
|||
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY Executable) #Set Executable directory as default exectutable file location
|
||||
|
||||
add_executable(exect fileGestion.c getArray.c average.c growthRate.c power.c queue.c simulateFlux.c main.c)
|
||||
add_executable(exect fileGestion.c getArray.c average.c growthRate.c power.c queue.c simulateFlux.c database.c main.c)
|
||||
# add_executable(exect main.c simulateFlux.c queue.c power.c growthRate.c average.c getArray.c fileGestion.c)
|
||||
|
||||
find_package (SQLite3)
|
||||
include_directories(${SQLite3_INCLUDE_DIRS})
|
||||
target_link_libraries (exect ${SQLite3_LIBRARIES} m)
|
||||
|
||||
|
||||
find_package(Threads)
|
||||
target_link_libraries(exect ${CMAKE_THREAD_LIBS_INIT} m)
|
||||
|
||||
set(CTEST_MEMORYCHECK_TYPE "AddressSanitizer")
|
||||
set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS "verbosity=1:symbolize=1:abort_on_error=1:detect_leaks=1")
|
||||
|
||||
add_executable(ctest fileGestion.c getArray.c average.c growthRate.c queue.c simulateFlux.c ctest.c)
|
||||
add_executable(ctest fileGestion.c getArray.c average.c growthRate.c queue.c simulateFlux.c database.c ctest.c)
|
||||
target_link_libraries(ctest ${CMAKE_THREAD_LIBS_INIT} m)
|
||||
|
||||
add_test(test_queueCreateEmpty ./ctest queueCreateEmpty)
|
||||
|
|
11
Code-C/Include/database.h
Normal file
11
Code-C/Include/database.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#include <sqlite3.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <unistd.h>
|
||||
#include <math.h>
|
||||
|
||||
int createDb();
|
||||
int initiaizeNewTrial(char *position, double frequency, bool *captorOneHot);
|
||||
int initiaizeNewTrial(char *position, double frequency, bool *captorOneHot);
|
37
Code-C/cmake/FindSQLite3.cmake
Normal file
37
Code-C/cmake/FindSQLite3.cmake
Normal file
|
@ -0,0 +1,37 @@
|
|||
# Copyright (C) 2007-2009 LuaDist.
|
||||
# Created by Peter Kapec <kapecp@gmail.com>
|
||||
# Redistribution and use of this file is allowed according to the terms of the MIT license.
|
||||
# For details see the COPYRIGHT file distributed with LuaDist.
|
||||
# Note:
|
||||
# Searching headers and libraries is very simple and is NOT as powerful as scripts
|
||||
# distributed with CMake, because LuaDist defines directories to search for.
|
||||
# Everyone is encouraged to contact the author with improvements. Maybe this file
|
||||
# becomes part of CMake distribution sometimes.
|
||||
|
||||
# - Find sqlite3
|
||||
# Find the native SQLITE3 headers and libraries.
|
||||
#
|
||||
# SQLITE3_INCLUDE_DIRS - where to find sqlite3.h, etc.
|
||||
# SQLITE3_LIBRARIES - List of libraries when using sqlite.
|
||||
# SQLITE3_FOUND - True if sqlite found.
|
||||
|
||||
# Look for the header file.
|
||||
FIND_PATH(SQLITE3_INCLUDE_DIR NAMES sqlite3.h)
|
||||
|
||||
# Look for the library.
|
||||
FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite)
|
||||
|
||||
# Handle the QUIETLY and REQUIRED arguments and set SQLITE3_FOUND to TRUE if all listed variables are TRUE.
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SQLITE3 DEFAULT_MSG SQLITE3_LIBRARY SQLITE3_INCLUDE_DIR)
|
||||
|
||||
# Copy the results to the output variables.
|
||||
IF(SQLITE3_FOUND)
|
||||
SET(SQLITE3_LIBRARIES ${SQLITE3_LIBRARY})
|
||||
SET(SQLITE3_INCLUDE_DIRS ${SQLITE3_INCLUDE_DIR})
|
||||
ELSE(SQLITE3_FOUND)
|
||||
SET(SQLITE3_LIBRARIES)
|
||||
SET(SQLITE3_INCLUDE_DIRS)
|
||||
ENDIF(SQLITE3_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(SQLITE3_INCLUDE_DIRS SQLITE3_LIBRARIES)
|
248
Code-C/database.c
Normal file
248
Code-C/database.c
Normal file
|
@ -0,0 +1,248 @@
|
|||
#include "./Include/simulateFlux.h"
|
||||
#include "./Include/database.h"
|
||||
|
||||
int initializeTrialsTable()
|
||||
{
|
||||
sqlite3 *db;
|
||||
int rc;
|
||||
sqlite3_stmt *stmt;
|
||||
|
||||
rc = sqlite3_open("robotgowest.db", &db);
|
||||
|
||||
// char *sql = "CREATE TABLE Test(Id INT)";
|
||||
|
||||
char *sql =
|
||||
"CREATE TABLE Trials(Id INTEGER PRIMARY KEY AUTOINCREMENT, Position TEXT, Start INT, Frequency NUMBER);";
|
||||
|
||||
rc = sqlite3_prepare_v2(db, sql, -1, &stmt, NULL);
|
||||
rc = sqlite3_step(stmt);
|
||||
rc = sqlite3_finalize(stmt);
|
||||
sqlite3_close(db);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int initializeCaptorMetadataTable()
|
||||
{
|
||||
sqlite3 *db;
|
||||
int rc;
|
||||
sqlite3_stmt *stmt;
|
||||
|
||||
rc = sqlite3_open("robotgowest.db", &db);
|
||||
|
||||
// char *sql = "CREATE TABLE Test(Id INT)";
|
||||
|
||||
char *sql =
|
||||
"CREATE TABLE CaptorMetadata(Id INTEGER PRIMARY KEY AUTOINCREMENT, CaptorNumber INT, TrialId INT, FOREIGN KEY (TrialId) REFERENCES Trials(Id));";
|
||||
|
||||
rc = sqlite3_prepare_v2(db, sql, -1, &stmt, NULL);
|
||||
rc = sqlite3_step(stmt);
|
||||
rc = sqlite3_finalize(stmt);
|
||||
sqlite3_close(db);
|
||||
return 0;
|
||||
}
|
||||
|
||||
char *generateDataTableName(int trialId, int captorNumber)
|
||||
{
|
||||
|
||||
char *tableName;
|
||||
tableName = (char *)malloc(8 * sizeof(char));
|
||||
strcpy(tableName, "T");
|
||||
strcat(tableName, convertIntegerToChar(trialId));
|
||||
strcat(tableName, "C");
|
||||
strcat(tableName, convertIntegerToChar(captorNumber));
|
||||
strcat(tableName, "Data");
|
||||
return tableName;
|
||||
}
|
||||
|
||||
int createCaptorDataTable(int trialId, int captorNumber)
|
||||
{
|
||||
sqlite3 *db;
|
||||
int rc;
|
||||
sqlite3_stmt *stmt;
|
||||
|
||||
// Create Table Name
|
||||
char *tableName = generateDataTableName(trialId, captorNumber);
|
||||
|
||||
rc = sqlite3_open("robotgowest.db", &db);
|
||||
if (rc != SQLITE_OK)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
char sql[101] = "CREATE TABLE ";
|
||||
strcat(sql, tableName);
|
||||
strcat(sql, " (Id INTEGER PRIMARY KEY AUTOINCREMENT, Lux NUMBER, Mean NUMBER , Power NUMBER);");
|
||||
|
||||
rc = sqlite3_prepare_v2(db, sql, -1, &stmt, NULL);
|
||||
rc = sqlite3_step(stmt);
|
||||
rc = sqlite3_finalize(stmt);
|
||||
sqlite3_close(db);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int insertTrailElement(char *position, int start, double frequency)
|
||||
{
|
||||
|
||||
sqlite3 *db;
|
||||
sqlite3_stmt *stmt;
|
||||
|
||||
int rc;
|
||||
|
||||
rc = sqlite3_open("robotgowest.db", &db);
|
||||
|
||||
rc = sqlite3_prepare_v2(db, "INSERT INTO Trials(Position,Start,Frequency) VALUES ( :position , :start , :frequency )", -1, &stmt, NULL);
|
||||
if (rc != SQLITE_OK)
|
||||
return 1;
|
||||
|
||||
sqlite3_bind_text(stmt, 1, position, -1, SQLITE_STATIC);
|
||||
|
||||
sqlite3_bind_int(stmt, 2, start);
|
||||
|
||||
sqlite3_bind_double(stmt, 3, frequency);
|
||||
|
||||
rc = sqlite3_step(stmt);
|
||||
rc = sqlite3_finalize(stmt);
|
||||
sqlite3_close(db);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int updateTrailElement(int id, char *position, int start, double frequency)
|
||||
{
|
||||
|
||||
sqlite3 *db;
|
||||
sqlite3_stmt *stmt;
|
||||
|
||||
int rc;
|
||||
|
||||
rc = sqlite3_open("robotgowest.db", &db);
|
||||
|
||||
rc = sqlite3_prepare_v2(db, "UPDATE Trials SET Position = :position, Start = :start, Frequency = :frequency WHERE Id = :id", -1, &stmt, NULL);
|
||||
if (rc != SQLITE_OK)
|
||||
return 1;
|
||||
|
||||
sqlite3_bind_text(stmt, 1, position, -1, SQLITE_STATIC);
|
||||
|
||||
sqlite3_bind_int(stmt, 2, start);
|
||||
|
||||
sqlite3_bind_double(stmt, 3, frequency);
|
||||
|
||||
sqlite3_bind_int(stmt, 4, id);
|
||||
|
||||
rc = sqlite3_step(stmt);
|
||||
rc = sqlite3_finalize(stmt);
|
||||
sqlite3_close(db);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int insertCaptorMetadataElement(int captorNumber, int trialId)
|
||||
{
|
||||
|
||||
sqlite3 *db;
|
||||
sqlite3_stmt *stmt;
|
||||
|
||||
int rc;
|
||||
|
||||
rc = sqlite3_open("robotgowest.db", &db);
|
||||
|
||||
rc = sqlite3_prepare_v2(db, "INSERT INTO CaptorMetadata(CaptorNumber,TrialId) VALUES ( :captorNumber , :trialId)", -1, &stmt, NULL);
|
||||
if (rc != SQLITE_OK)
|
||||
return 1;
|
||||
|
||||
sqlite3_bind_int(stmt, 1, captorNumber);
|
||||
|
||||
sqlite3_bind_int(stmt, 2, trialId);
|
||||
|
||||
rc = sqlite3_step(stmt);
|
||||
rc = sqlite3_finalize(stmt);
|
||||
|
||||
sqlite3_close(db);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int insertCaptorDataElement(int trialId, int captorNumber, double lux, double mean, double power)
|
||||
{
|
||||
|
||||
char *tableName = generateDataTableName(trialId, captorNumber);
|
||||
|
||||
sqlite3 *db;
|
||||
sqlite3_stmt *stmt;
|
||||
|
||||
int rc;
|
||||
|
||||
rc = sqlite3_open("robotgowest.db", &db);
|
||||
|
||||
char sql[70] = "INSERT INTO ";
|
||||
strcat(sql, tableName);
|
||||
strcat(sql, "(Lux,Mean,Power) VALUES ( :lux , :mean , :power)");
|
||||
|
||||
rc = sqlite3_prepare_v2(db, sql, -1, &stmt, NULL);
|
||||
if (rc != SQLITE_OK)
|
||||
return 1;
|
||||
|
||||
sqlite3_bind_double(stmt, 1, lux);
|
||||
sqlite3_bind_double(stmt, 2, mean);
|
||||
sqlite3_bind_double(stmt, 3, power);
|
||||
|
||||
rc = sqlite3_step(stmt);
|
||||
rc = sqlite3_finalize(stmt);
|
||||
sqlite3_close(db);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int createDb()
|
||||
{
|
||||
char *dbPosition = "./robotgowest.db";
|
||||
if (access(dbPosition, F_OK))
|
||||
{
|
||||
initializeTrialsTable();
|
||||
initializeCaptorMetadataTable();
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Database already initialized");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
int getMaxTrialIdRow()
|
||||
{
|
||||
int rc;
|
||||
sqlite3 *db;
|
||||
sqlite3_stmt *stmt;
|
||||
int data = -1;
|
||||
|
||||
rc = sqlite3_open("robotgowest.db", &db);
|
||||
if (rc != SQLITE_OK)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
rc = sqlite3_prepare_v2(db, "SELECT MAX(Id) FROM Trials", -1, &stmt, NULL);
|
||||
|
||||
if (sqlite3_step(stmt) == SQLITE_ROW)
|
||||
{
|
||||
data = sqlite3_column_int(stmt, 0);
|
||||
}
|
||||
|
||||
rc = sqlite3_finalize(stmt);
|
||||
sqlite3_close(db);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
int initiaizeNewTrial(char *position, double frequency, bool *captorOneHot)
|
||||
{
|
||||
insertTrailElement(position, -1, frequency);
|
||||
int trialId = getMaxTrialIdRow();
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
if (captorOneHot[i])
|
||||
{
|
||||
insertCaptorMetadataElement(i, trialId);
|
||||
createCaptorDataTable(trialId, i + 1);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
|
@ -8,6 +8,7 @@
|
|||
#include "./Include/average.h"
|
||||
#include "./Include/growthRate.h"
|
||||
#include "./Include/getArray.h"
|
||||
#include "./Include/database.h"
|
||||
|
||||
bool rawDataWriteFlag;
|
||||
int nRowRawData = 5000;
|
||||
|
@ -160,6 +161,11 @@ int main(int argc, char **argv)
|
|||
invTimeBandWidth = 1 / (nRowRawData * period);
|
||||
firstRawDataQueue = queueCreateEmpty(); // change this for create empty
|
||||
|
||||
// launch DB related function
|
||||
sqlite3_initialize();
|
||||
createDb(); // Created the Db if not exist
|
||||
initiaizeNewTrial("test", freqEch, selectionCaptors); // Initialize Trials data and tables
|
||||
|
||||
pthread_t rawData;
|
||||
if (pthread_create(&rawData, NULL, threadSimulateFlux, "threadSimulflux") != 0)
|
||||
{
|
||||
|
@ -182,4 +188,6 @@ int main(int argc, char **argv)
|
|||
// }
|
||||
|
||||
pthread_exit(NULL);
|
||||
|
||||
sqlite3_shutdown();
|
||||
}
|
|
@ -152,11 +152,11 @@ bool writeOneRawData(FILE *rawDataFile)
|
|||
{
|
||||
if (selectionCaptors[i - 1])
|
||||
{
|
||||
quartet value;
|
||||
value.octet1 = buff[3 * i + 1];
|
||||
value.octet2 = buff[3 * i + 2];
|
||||
value.octet3 = buff[3 * i + 3];
|
||||
value.octet4 = 0;
|
||||
// quartet value;
|
||||
// value.octet1 = buff[3 * i + 1];
|
||||
// value.octet2 = buff[3 * i + 2];
|
||||
// value.octet3 = buff[3 * i + 3];
|
||||
// value.octet4 = 0;
|
||||
|
||||
valbin[i] = buff[3 * i + 1] * 256 * 256 * 256 + buff[3 * i + 2] * 256 * 256 + buff[3 * i + 3] * 256;
|
||||
memcpy(&values[i], &valbin[i], sizeof(uint32_t));
|
||||
|
|
|
@ -1,118 +0,0 @@
|
|||
#include "./database.h"
|
||||
|
||||
int initializeTrailsTable()
|
||||
{
|
||||
sqlite3 *db;
|
||||
char *err_msg;
|
||||
int rc;
|
||||
sqlite3_stmt *stmt;
|
||||
|
||||
rc = sqlite3_open("robotgowest.db", &db);
|
||||
|
||||
// char *sql = "CREATE TABLE Test(Id INT)";
|
||||
|
||||
char *sql =
|
||||
"CREATE TABLE Trials(Id INTEGER PRIMARY KEY AUTOINCREMENT, Position TEXT, Start INT, Frequency NUMBER, Duration INT);";
|
||||
|
||||
rc = sqlite3_prepare_v2(db, sql, -1, &stmt, NULL);
|
||||
rc = sqlite3_step(stmt);
|
||||
rc = sqlite3_finalize(stmt);
|
||||
sqlite3_close(db);
|
||||
}
|
||||
|
||||
int initializeCaptorMetadataTable()
|
||||
{
|
||||
sqlite3 *db;
|
||||
char *err_msg;
|
||||
int rc;
|
||||
sqlite3_stmt *stmt;
|
||||
|
||||
rc = sqlite3_open("robotgowest.db", &db);
|
||||
|
||||
// char *sql = "CREATE TABLE Test(Id INT)";
|
||||
|
||||
char *sql =
|
||||
"CREATE TABLE CaptorMetadata(Id INTEGER PRIMARY KEY AUTOINCREMENT, CaptorNumber INT, TrialId INT, FOREIGN KEY (TrialId) REFERENCES Trials(Id));";
|
||||
|
||||
rc = sqlite3_prepare_v2(db, sql, -1, &stmt, NULL);
|
||||
rc = sqlite3_step(stmt);
|
||||
rc = sqlite3_finalize(stmt);
|
||||
sqlite3_close(db);
|
||||
}
|
||||
|
||||
int createCaptorDataTable(int trialId, int captorNumber)
|
||||
{
|
||||
sqlite3 *db;
|
||||
char *err_msg;
|
||||
int rc;
|
||||
sqlite3_stmt *stmt;
|
||||
|
||||
// Create Table Name
|
||||
char tableName[8];
|
||||
strcpy(tableName, "T");
|
||||
strcat(tableName, convertIntegerToChar(trialId));
|
||||
strcat(tableName, "C");
|
||||
strcat(tableName, convertIntegerToChar(captorNumber));
|
||||
strcat(tableName, "Data");
|
||||
|
||||
rc = sqlite3_open("robotgowest.db", &db);
|
||||
if (rc != SQLITE_OK)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
char sql[101] = "CREATE TABLE ";
|
||||
strcat(sql, tableName);
|
||||
strcat(sql, " (Id INTEGER PRIMARY KEY AUTOINCREMENT, Lux NUMBER, Mean NUMBER , Power NUMBER);");
|
||||
|
||||
rc = sqlite3_prepare_v2(db, sql, -1, &stmt, NULL);
|
||||
rc = sqlite3_step(stmt);
|
||||
rc = sqlite3_finalize(stmt);
|
||||
sqlite3_close(db);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief convert an interger N into a char*
|
||||
*
|
||||
* @param N
|
||||
* @return char*
|
||||
*/
|
||||
char *convertIntegerToChar(int N)
|
||||
{
|
||||
// Count digits in number N
|
||||
int m = N;
|
||||
int digit = 0;
|
||||
while (m)
|
||||
{
|
||||
digit++;
|
||||
m /= 10;
|
||||
}
|
||||
char *arr;
|
||||
char arr1[digit];
|
||||
arr = (char *)malloc(digit * sizeof(char));
|
||||
int index = 0;
|
||||
while (N)
|
||||
{
|
||||
arr1[++index] = N % 10 + '0';
|
||||
N /= 10;
|
||||
}
|
||||
int i;
|
||||
for (i = 0; i < index; i++)
|
||||
{
|
||||
arr[i] = arr1[index - i];
|
||||
}
|
||||
arr[i] = '\0';
|
||||
return (char *)arr;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
sqlite3_initialize();
|
||||
|
||||
initializeTrailsTable();
|
||||
initializeCaptorMetadataTable();
|
||||
createCaptorDataTable(12, 8);
|
||||
sqlite3_shutdown();
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
#include <sqlite3.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
// Duplication from simulFlux.c
|
||||
|
||||
/**
|
||||
* @brief convert an interger N into a char*
|
||||
*
|
||||
* @param N
|
||||
* @return char*
|
||||
*/
|
||||
char *convertIntegerToChar(int N);
|
|
@ -1 +1,3 @@
|
|||
##This mist include all fetch function and also init and insert function for nn training annd testing result
|
||||
##This mist include all fetch function and also init and insert function for nn training annd testing result
|
||||
|
||||
import numpy
|
||||
|
|
BIN
Db-Script/db
BIN
Db-Script/db
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue