MOD: delete all old stuff and shrink to ne current used
This commit is contained in:
@@ -1,69 +0,0 @@
|
||||
|
||||
#include "SimCore/Identifier.hpp"
|
||||
#include "WHISPER/Messages/Message.hpp"
|
||||
#include <SimCore/SimCore.hpp>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#define CATCH_CONFIG_MAIN
|
||||
#include <catch2/catch.hpp>
|
||||
#include <SimCore/Templates/Entity.hpp>
|
||||
|
||||
// SimCore::Identifier OwnID, SimCore::Identifier ParentID, SimCore::SensorKinds SensorKind,std::uint32_t GroundTruthPort, std::uint32_t ParentPort,std::string ParentIPAddress
|
||||
class Ship : public SimCore::Entity
|
||||
{
|
||||
public:
|
||||
Ship(SimCore::Identifier OwnID,
|
||||
std::string EntityName,
|
||||
WHISPER::SourceType ownType,
|
||||
SimCore::Identifier ParentID,
|
||||
SimCore::EntityKind EntityKind,
|
||||
std::uint32_t GroundTruthPort,
|
||||
std::uint32_t CommandPort,
|
||||
std::string CommandIPAddress):
|
||||
Entity( OwnID,EntityName,ownType, ParentID, EntityKind, GroundTruthPort, CommandPort, CommandIPAddress)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
void specificPhysicsCalculations(std::chrono::milliseconds::rep duration) override
|
||||
{
|
||||
LOG_S(INFO)<<"calculating every " << duration << "milliseconds";
|
||||
};
|
||||
|
||||
void specificReloadCharacteristicts() override
|
||||
{
|
||||
LOG_S(INFO)<<"loading specifications";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
SCENARIO("Testing the SimCore Sensor")
|
||||
{
|
||||
GIVEN("different Attributes for a Track in different forms")
|
||||
{
|
||||
SimCore::Identifier IDParent(0,1,false);
|
||||
SimCore::Identifier ID1(0,2,false);
|
||||
Ship Ship(ID1,"FGS Hamburg",WHISPER::SourceType::SHIP,IDParent,SimCore::EntityKind::SURFACE,8000,8001,"127.0.0.1");
|
||||
Ship.start();
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(5000));
|
||||
Ship.stop();
|
||||
WHEN("constructing Track Object with data")
|
||||
{
|
||||
|
||||
THEN("check if Track attributes are correct")
|
||||
{
|
||||
// REQUIRE(testOperator == true);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} //THEN
|
||||
} // WHEN
|
||||
} // GIVEN
|
||||
} //SCENARIO
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "SimCore/Identifier.hpp"
|
||||
#include <SimCore/Identifier.hpp>
|
||||
#include <SimCore/SimCore.hpp>
|
||||
#define CATCH_CONFIG_MAIN
|
||||
#include <catch2/catch.hpp>
|
||||
@@ -11,10 +11,10 @@ SCENARIO("Testing the SimCorePositionClass")
|
||||
GIVEN("different position in different forms")
|
||||
{
|
||||
|
||||
SimCore::Identifier ID1(0,100,SimCore::ObjectSource::EXTERNAL);
|
||||
SimCore::Identifier ID2(0,100,SimCore::ObjectSource::EXTERNAL);
|
||||
SimCore::Identifier ID3(1,100,SimCore::ObjectSource::INTERNAL);
|
||||
SimCore::Identifier ID4(1,200,SimCore::ObjectSource::INTERNAL);
|
||||
SimCore::Identifier ID1(true);
|
||||
SimCore::Identifier ID2();
|
||||
SimCore::Identifier ID3();
|
||||
SimCore::Identifier ID4();
|
||||
|
||||
|
||||
WHEN("constructing Position Object with data")
|
||||
@@ -25,12 +25,10 @@ SCENARIO("Testing the SimCorePositionClass")
|
||||
|
||||
THEN("positions attributes are correct")
|
||||
{
|
||||
REQUIRE(ID1.getNumber() == 100);
|
||||
REQUIRE(ID1.isExternal() == true);
|
||||
REQUIRE(ID1.getParentNumber() == 0);
|
||||
REQUIRE(ID1.isValid() == 100);
|
||||
REQUIRE(ID1.isExternal() == true);
|
||||
|
||||
REQUIRE(ID1 == ID2);
|
||||
REQUIRE(ID1 != ID2);
|
||||
REQUIRE(ID1 != ID3);
|
||||
REQUIRE(ID4 != ID3);
|
||||
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
|
||||
#include "SimCore/Identifier.hpp"
|
||||
#include <SimCore/SimCore.hpp>
|
||||
#include <memory>
|
||||
#include <thread>
|
||||
#define CATCH_CONFIG_MAIN
|
||||
#include <catch2/catch.hpp>
|
||||
#include <SimCore/Templates/Sensor.hpp>
|
||||
|
||||
// SimCore::Identifier OwnID, SimCore::Identifier ParentID, SimCore::SensorKinds SensorKind,std::uint32_t GroundTruthPort, std::uint32_t ParentPort,std::string ParentIPAddress
|
||||
class Radar : public SimCore::Sensor
|
||||
{
|
||||
public:
|
||||
Radar(SimCore::Identifier OwnID,
|
||||
SimCore::Identifier ParentID,
|
||||
SimCore::SensorKinds SensorKind,
|
||||
std::uint32_t GroundTruthPort,
|
||||
std::uint32_t ParentPort,
|
||||
std::string ParentIPAddress,
|
||||
std::string radarType):SimCore::Sensor(OwnID, ParentID, SensorKind, GroundTruthPort, ParentPort, ParentIPAddress),radarType_(radarType)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private:
|
||||
std::string radarType_;
|
||||
|
||||
void specificSensorCalculations() override
|
||||
{
|
||||
LOG_S(INFO)<<"calculating";
|
||||
};
|
||||
|
||||
void specificReloadCharacteristicts() override
|
||||
{
|
||||
LOG_S(INFO)<<"loading specifications";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
SCENARIO("Testing the SimCore Sensor")
|
||||
{
|
||||
GIVEN("different Attributes for a Track in different forms")
|
||||
{
|
||||
SimCore::Identifier IDParent(0,1,false);
|
||||
SimCore::Identifier IDRadar(1,1,false);
|
||||
|
||||
Radar Radar(IDRadar,IDParent,SimCore::SensorKinds::RADAR,8000,8001,"127.0.0.1","APAR");
|
||||
Radar.start();
|
||||
|
||||
WHEN("constructing Track Object with data")
|
||||
{
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
||||
THEN("check if Track attributes are correct")
|
||||
{
|
||||
// REQUIRE(testOperator == true);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} //THEN
|
||||
} // WHEN
|
||||
} // GIVEN
|
||||
} //SCENARIO
|
||||
Reference in New Issue
Block a user