67 lines
1.6 KiB
C++
67 lines
1.6 KiB
C++
|
|
#include <SimCore/Identifier.hpp>
|
|
#include <SimCore/SimCore.hpp>
|
|
#include <memory>
|
|
#include <thread>
|
|
#define CATCH_CONFIG_MAIN
|
|
#include <catch2/catch.hpp>
|
|
#include <Entities/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 Entities::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):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;
|
|
SimCore::Identifier IDRadar;
|
|
|
|
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
|