add shared library for main functionality
This commit is contained in:
parent
57b2c76323
commit
5cb799a703
6 changed files with 83 additions and 6 deletions
|
|
@ -77,6 +77,7 @@ target_link_libraries(
|
||||||
${PROJECT_NAME}
|
${PROJECT_NAME}
|
||||||
# act-deploy-commands
|
# act-deploy-commands
|
||||||
act-deploy-db-lib
|
act-deploy-db-lib
|
||||||
|
actsim-agent-lib
|
||||||
# act-deploy-pipeline-modules-lib
|
# act-deploy-pipeline-modules-lib
|
||||||
# act-deploy-test-gen-modules-lib
|
# act-deploy-test-gen-modules-lib
|
||||||
# yaml-cpp
|
# yaml-cpp
|
||||||
|
|
|
||||||
32
include/actsim_agent/actsim_agent.hpp
Normal file
32
include/actsim_agent/actsim_agent.hpp
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
/*************************************************************************
|
||||||
|
*
|
||||||
|
* This file is part of the ACT library
|
||||||
|
*
|
||||||
|
* Copyright (c) 2024 Fabian Posch
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*
|
||||||
|
**************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __ACTSIM_AGENT__
|
||||||
|
#define __ACTSIM_AGENT__
|
||||||
|
|
||||||
|
#include "db_types.hpp"
|
||||||
|
|
||||||
|
int start_agent(db::db_credentials_t db_cred, size_t worker_processes);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -2,14 +2,11 @@
|
||||||
# Grab necessary libraries from ACT_HOME
|
# Grab necessary libraries from ACT_HOME
|
||||||
#include_directories($ENV{ACT_HOME}/include)
|
#include_directories($ENV{ACT_HOME}/include)
|
||||||
include_directories(../include)
|
include_directories(../include)
|
||||||
#include_directories(../include/commands)
|
|
||||||
include_directories(../include/db_lib)
|
include_directories(../include/db_lib)
|
||||||
|
include_directories(../include/actsim_agent)
|
||||||
|
|
||||||
add_subdirectory(db_lib)
|
add_subdirectory(db_lib)
|
||||||
#add_subdirectory(pipeline_lib)
|
add_subdirectory(actsim_agent)
|
||||||
#add_subdirectory(pipeline_modules)
|
|
||||||
#add_subdirectory(testcase_generators)
|
|
||||||
#add_subdirectory(commands)
|
|
||||||
|
|
||||||
file(
|
file(
|
||||||
GLOB proj_SRC
|
GLOB proj_SRC
|
||||||
|
|
|
||||||
13
src/actsim_agent/CMakeLists.txt
Normal file
13
src/actsim_agent/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
include_directories(../../include/db_lib)
|
||||||
|
include_directories(../../include/actsim_agent)
|
||||||
|
|
||||||
|
file(
|
||||||
|
GLOB actsim_agent_SRC
|
||||||
|
"*.cpp"
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(
|
||||||
|
actsim-agent-lib
|
||||||
|
SHARED
|
||||||
|
${actsim_agent_SRC}
|
||||||
|
)
|
||||||
31
src/actsim_agent/actsim_agent.cpp
Normal file
31
src/actsim_agent/actsim_agent.cpp
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
/*************************************************************************
|
||||||
|
*
|
||||||
|
* This file is part of the ACT library
|
||||||
|
*
|
||||||
|
* Copyright (c) 2024 Fabian Posch
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*
|
||||||
|
**************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
#include "actsim_agent.hpp"
|
||||||
|
|
||||||
|
int start_agent(db::db_credentials_t db_cred, size_t worker_processes) {
|
||||||
|
std::cout << "Hello world from the agent." << std::endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
@ -25,6 +25,7 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
#include <actsim_agent.hpp>
|
||||||
#include "cli_util.hpp"
|
#include "cli_util.hpp"
|
||||||
#include "db_types.hpp"
|
#include "db_types.hpp"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
@ -157,6 +158,8 @@ int main (int argc, char **argv) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << "Hello world!" << std::endl;
|
DEBUG_PRINT("Starting actsim agent with " + std::to_string(jobs) + " worker threads.");
|
||||||
|
|
||||||
|
return start_agent(db_cred, jobs);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue