Commit fbb1fa81 authored by Matthias Greuter's avatar Matthias Greuter
Browse files

Remove deprecated DateTime

parent 5c3122c1
/*******************************************************************************
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
//-----------------------------------------------------------------------------
/** @file date_time.h */
//-----------------------------------------------------------------------------
#ifndef MANTLEAPI_ENVIRONMENTALCONDITIONS_DATETIME_H
#define MANTLEAPI_ENVIRONMENTALCONDITIONS_DATETIME_H
#include <MantleAPI/Common/time_utils.h>
#include <chrono>
namespace mantle_api
{
// TODO: Delete this struct and use Time directly in Get/SetDateTime once the move to the MantleAPI is complete
struct [[deprecated]] DateTime
{
Time date_time_ms{0};
};
} // namespace mantle_api
#endif // MANTLEAPI_ENVIRONMENTALCONDITIONS_DATETIME_H
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#define MANTLEAPI_EXECUTION_IENVIRONMENT_H #define MANTLEAPI_EXECUTION_IENVIRONMENT_H
#include <MantleAPI/Common/simulation_time.h> #include <MantleAPI/Common/simulation_time.h>
#include <MantleAPI/EnvironmentalConditions/date_time.h> #include <MantleAPI/Common/time_utils.h>
#include <MantleAPI/EnvironmentalConditions/road_condition.h> #include <MantleAPI/EnvironmentalConditions/road_condition.h>
#include <MantleAPI/EnvironmentalConditions/weather.h> #include <MantleAPI/EnvironmentalConditions/weather.h>
#include <MantleAPI/Map/i_coord_converter.h> #include <MantleAPI/Map/i_coord_converter.h>
...@@ -77,11 +77,11 @@ class IEnvironment ...@@ -77,11 +77,11 @@ class IEnvironment
virtual const IEntityRepository& GetEntityRepository() const = 0; virtual const IEntityRepository& GetEntityRepository() const = 0;
/// @brief DateTime in UTC (converted from RFC 3339 standard) /// @brief DateTime in UTC (converted from RFC 3339 standard)
virtual void SetDateTime(DateTime date_time) = 0; virtual void SetDateTime(mantle_api::Time time) = 0;
virtual DateTime GetDateTime() = 0; virtual mantle_api::Time GetDateTime() = 0;
/// @brief Time since start of simulation and delta time to previous step /// @brief Time since start of simulation and delta time to previous step
virtual SimulationTime GetSimulationTime() = 0; virtual mantle_api::Time GetSimulationTime() = 0;
virtual void SetWeather(Weather weather) = 0; virtual void SetWeather(Weather weather) = 0;
virtual void SetRoadCondition(std::vector<FrictionPatch> friction_patches) = 0; virtual void SetRoadCondition(std::vector<FrictionPatch> friction_patches) = 0;
......
...@@ -342,11 +342,11 @@ class MockEnvironment : public mantle_api::IEnvironment ...@@ -342,11 +342,11 @@ class MockEnvironment : public mantle_api::IEnvironment
std::ignore = friction_patches; std::ignore = friction_patches;
} }
void SetDateTime(mantle_api::DateTime date_time) override { std::ignore = date_time; } void SetDateTime(mantle_api::Time date_time) override { std::ignore = date_time; }
mantle_api::DateTime GetDateTime() override { return mantle_api::DateTime(); } mantle_api::Time GetDateTime() override { return mantle_api::Time(); }
MOCK_METHOD(mantle_api::SimulationTime, GetSimulationTime, (), (override)); MOCK_METHOD(mantle_api::Time, GetSimulationTime, (), (override));
private: private:
MockQueryService query_service_{}; MockQueryService query_service_{};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment