diff --git a/.gitmodules b/.gitmodules index e687aae..27861ef 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "libs/SimCore"] - path = libs/SimCore - url = ssh://git@dev-gitea.ftewa.ti.unibw-hamburg.de:12000/hwinkel/SimCore.git [submodule "libs/json"] path = libs/json url = https://github.com/nlohmann/json.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 94c04af..0d9e8ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,11 +7,12 @@ IF(NOT TARGET Catch2) add_subdirectory(libs/Catch2 EXCLUDE_FROM_ALL) include(libs/Catch2/contrib/Catch.cmake) ENDIF() +add_compile_definitions(LOGURU_WITH_STREAMS SQLITE_THREADSAFE=2) -IF(NOT TARGET SimCore) -set(TEST_SIMCORE_LIBRARY OFF CACHE INTERNAL "") - add_subdirectory(libs/SimCore EXCLUDE_FROM_ALL) -ENDIF() +# IF(NOT TARGET SimCore) +# set(TEST_SIMCORE_LIBRARY OFF CACHE INTERNAL "") +# add_subdirectory(libs/SimCore EXCLUDE_FROM_ALL) +# ENDIF() IF(NOT TARGET nlohmann_json) set(JSON_BuildTests_INIT OFF CACHE INTERNAL "") @@ -52,9 +53,9 @@ add_library(EntityLibrary STATIC target_link_libraries(EntityLibrary +loguru SimCore eigen -loguru nlohmann_json OrderLibrary kubecontrol diff --git a/cmake/Modules/protobuf.cmake b/cmake/Modules/protobuf.cmake index 436763a..9f62bc1 100644 --- a/cmake/Modules/protobuf.cmake +++ b/cmake/Modules/protobuf.cmake @@ -16,7 +16,7 @@ function(protobuf_generate_cpp) ${ARGN}) FILE(GLOB PROTO_FILES ${protobuf_PROTO_PATH}/*.proto) - set(PROTOC ${CMAKE_BINARY_DIR}/libs/SimCore/libs/whisper-com/libs/protobuf/protoc) + set(PROTOC ${CMAKE_BINARY_DIR}/libs/OrderLibrary/libs/SimCore/libs/whisper-com/libs/protobuf/protoc) message(STATUS "protoc path: " ${PROTOC}) FOREACH(proto ${PROTO_FILES}) @@ -29,7 +29,7 @@ function(protobuf_generate_cpp) add_custom_command( OUTPUT "${protoDIR}/${protoFILENAME}.pb.cc" DEPENDS "${protoDIR}/${protoFILENAME}.proto" - COMMAND ${PROTOC} --cpp_out=${protoDIR} --proto_path=${protoDIR} --proto_path="${CMAKE_SOURCE_DIR}/libs/SimCore/include/SimCore/Messages/Protos" --proto_path="${CMAKE_SOURCE_DIR}/libs/SimCore/libs/whisper-com/libs/protobuf/src" "${protoDIR}/${protoFILENAME}.proto" + COMMAND ${PROTOC} --cpp_out=${protoDIR} --proto_path=${protoDIR} --proto_path="${CMAKE_SOURCE_DIR}/libs/OrderLibrary/libs/SimCore/include/SimCore/Messages/Protos" --proto_path="${CMAKE_SOURCE_DIR}/libs/OrderLibrary/libs/SimCore/libs/whisper-com/libs/protobuf/src" "${protoDIR}/${protoFILENAME}.proto" ) diff --git a/include/Entities/Sensor.hpp b/include/Entities/Sensor.hpp index 8a0e1f9..0f7ee79 100644 --- a/include/Entities/Sensor.hpp +++ b/include/Entities/Sensor.hpp @@ -16,6 +16,8 @@ #include #include + + namespace Entities { class Sensor { diff --git a/libs/KubeControl b/libs/KubeControl index f59652a..53d2b9f 160000 --- a/libs/KubeControl +++ b/libs/KubeControl @@ -1 +1 @@ -Subproject commit f59652ada171d389dff669b1472e89672f59829c +Subproject commit 53d2b9f8906dcae5f4e66b130e6f2dc26bce5321 diff --git a/libs/OrderLibrary b/libs/OrderLibrary index a330169..4a0a8a6 160000 --- a/libs/OrderLibrary +++ b/libs/OrderLibrary @@ -1 +1 @@ -Subproject commit a33016976e8e25fdec9ec1ca73a6bd99af1c46bc +Subproject commit 4a0a8a6bb92dd5b011b781307bacac7f5a18d6e3 diff --git a/libs/SimCore b/libs/SimCore deleted file mode 160000 index d345fd5..0000000 --- a/libs/SimCore +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d345fd5bc3cd864593da3ef2eac5010047b08c47 diff --git a/libs/json b/libs/json index 6eab7a2..5d27543 160000 --- a/libs/json +++ b/libs/json @@ -1 +1 @@ -Subproject commit 6eab7a2b187b10b2494e39c1961750bfd1bda500 +Subproject commit 5d2754306d67d1e654a1a34e1d2e74439a9d53b3 diff --git a/libs/nlohmannJSON b/libs/nlohmannJSON index 6eab7a2..5d27543 160000 --- a/libs/nlohmannJSON +++ b/libs/nlohmannJSON @@ -1 +1 @@ -Subproject commit 6eab7a2b187b10b2494e39c1961750bfd1bda500 +Subproject commit 5d2754306d67d1e654a1a34e1d2e74439a9d53b3 diff --git a/src/Entities/Sensor.cpp b/src/Entities/Sensor.cpp index 06d3d2b..351028a 100644 --- a/src/Entities/Sensor.cpp +++ b/src/Entities/Sensor.cpp @@ -10,6 +10,7 @@ #include #include #include +#include namespace Entities { diff --git a/tests/test_EntityClass.cpp b/tests/test_EntityClass.cpp index 10a4b20..822ff85 100644 --- a/tests/test_EntityClass.cpp +++ b/tests/test_EntityClass.cpp @@ -23,7 +23,7 @@ class Ship : public Entities::Entity std::uint32_t GroundTruthPort, ushort CommandPort ): - Entity( OwnID,EntityName,ownType, EntityKind,SimCore::Side::EntitySide::FRIEND, "127.0.0.1",GroundTruthPort, CommandPort,false) + Entity( OwnID,EntityName,ownType, 10000, EntityKind,SimCore::Side::EntitySide::FRIEND, "127.0.0.1",GroundTruthPort, CommandPort,false) { SimCore::Position pos1; pos1.setGeodesicPos(55, 6, 0); @@ -33,6 +33,11 @@ class Ship : public Entities::Entity // LOG_S(INFO)< track) override { LOG_S(INFO)<<"calculating"; }; - void specificReloadCharacteristicts() override - { - LOG_S(INFO)<<"loading specifications"; - }; + }; @@ -46,7 +46,7 @@ SCENARIO("Testing the SimCore Sensor") SimCore::Identifier IDParent; SimCore::Identifier IDRadar; - Radar Radar(IDRadar,IDParent,SimCore::SensorKinds::RADAR,8000,8001,"127.0.0.1","APAR"); + Radar Radar(IDRadar,IDParent,SimCore::SensorKinds::RADAR,"239.0.0.1",8000,8001,"127.0.0.1","APAR"); Radar.start(); WHEN("constructing Track Object with data") diff --git a/tests/test_Tracklist.cpp b/tests/test_Tracklist.cpp index 543d77b..bbf62ea 100644 --- a/tests/test_Tracklist.cpp +++ b/tests/test_Tracklist.cpp @@ -22,9 +22,8 @@ SCENARIO("Testing the SimCore Sensor") { GIVEN("different Attributes for a Track in different forms") { - SimCore::Identifier OwnID; - TrackList::TrackList List(OwnID); - List.setTrackTimeout(5000); + TrackList::TrackList List; + // List.setTrackTimeout(5000); double speed = 10; double course = 90; @@ -54,23 +53,23 @@ SCENARIO("Testing the SimCore Sensor") WHEN("constructing Track Object with data") { - List.addTrack(track,Sensor1); + List.addTrack(track); THEN("check if Track attributes are correct") { - REQUIRE(List.size() == 1); + REQUIRE(List.getSize() == 1); REQUIRE(List.getTrack(id)->getPosition().getGeocentricPos() == pos.getGeocentricPos()); REQUIRE(List.getTrack(id)->Speed.getValue() == speed); REQUIRE(List.getTrack(id)->Course.getValue() == course); - REQUIRE(List.getTrack(id)->getSensorCount() == 1); + // REQUIRE(List.getTrack(id)->getSensorCount() == 1); track->Course.setValue(270); - List.addTrack(track,Sensor2); + List.addTrack(track); // REQUIRE(List.getTrack(id)->Course.getValue() == 270); - REQUIRE(List.getTrack(id)->getSensorCount() == 2); + // REQUIRE(List.getTrack(id)->getSensorCount() == 2); std::this_thread::sleep_for(std::chrono::milliseconds(5500)); - REQUIRE(List.size() == 0); + REQUIRE(List.getSize() == 0); - List.stopSanitizer(); + // List.stopSanitizer();