#ifndef SENSORSLOT_HEADERFILE
#define SENSORSLOT_HEADERFILE

#include "SlotOfAgent.h"

//TODO: set name of slot as the name of the sensor is (+ "slot");
class SensorSlotOfAgent : public SlotOfAgent  {

	private:
		float sensorValue;
		bool flagSensorValueIsSet;
		bool flagSensorValueHasChanged;

		//SHORTCUT/WORKAUROUND -> TODO: make this better!
		float lastSensorValue;
		bool flagLastSensorValueIsSet;
		unsigned int valueSetCounter;
		float tempHistory[5];
		unsigned int historyCounter = 0;


	public:
		SensorSlotOfAgent();

		void set_sensorValue(float sensorValue);
		bool get_sensorValue(float* sensorValue);
		bool getPreviousSensorValue(float* lastSensorValue);

		bool get_flagSensorValueIsSet();
		bool get_flagSensorValueHasChanged();

		//SHORTCUT/WORKAUROUND -> TODO: make this better!
		void increaseValueSetCounter();
		void resetValueSetCounter();
		unsigned int getValueSetCounter();

		void resetSlot();
};

#endif