#pragma once
#include <string>
#include <vector>
#include <libsumo/TraCIDefs.h>
#ifndef LIBTRACI
class NamedRTree;
class MSInductLoop;
class MEInductLoop;
class PositionVector;
#endif
namespace LIBSUMO_NAMESPACE {
class InductionLoop {
public:
static double getPosition(const std::string& loopID);
static std::string getLaneID(const std::string& loopID);
static int getLastStepVehicleNumber(const std::string& loopID);
static double getLastStepMeanSpeed(const std::string& loopID);
static std::vector<std::string> getLastStepVehicleIDs(const std::string& loopID);
static double getLastStepOccupancy(const std::string& loopID);
static double getLastStepMeanLength(const std::string& loopID);
static double getTimeSinceDetection(const std::string& loopID);
static std::vector<libsumo::TraCIVehicleData> getVehicleData(const std::string& loopID);
static double getIntervalOccupancy(const std::string& loopID);
static double getIntervalMeanSpeed(const std::string& loopID);
static int getIntervalVehicleNumber(const std::string& loopID);
static std::vector<std::string> getIntervalVehicleIDs(const std::string& loopID);
static double getLastIntervalOccupancy(const std::string& loopID);
static double getLastIntervalMeanSpeed(const std::string& loopID);
static int getLastIntervalVehicleNumber(const std::string& loopID);
static std::vector<std::string> getLastIntervalVehicleIDs(const std::string& loopID);
static void overrideTimeSinceDetection(const std::string& loopID, double time);
LIBSUMO_ID_PARAMETER_API
LIBSUMO_SUBSCRIPTION_API
#ifndef LIBTRACI
#ifndef SWIG
static NamedRTree* getTree();
static void cleanup();
static void storeShape(const std::string& id, PositionVector& shape);
static std::shared_ptr<VariableWrapper> makeWrapper();
static bool handleVariable(const std::string& objID, const int variable, VariableWrapper* wrapper, tcpip::Storage* paramData);
private:
static MSInductLoop* getDetector(const std::string& loopID);
static MEInductLoop* getMEDetector(const std::string& loopID);
private:
static SubscriptionResults mySubscriptionResults;
static ContextSubscriptionResults myContextSubscriptionResults;
static NamedRTree* myTree;
#endif
#endif
private:
InductionLoop() = delete;
};
}