#ifndef SLAVEAGENTSLOTOFAGENT_HEADERFILE
#define SLAVEAGENTSLOTOFAGENT_HEADERFILE

#include "rosa/agent/experimental/SlotOfAgent.hpp"
//#include "State.h"

class SlaveAgentSlotOfAgent : public SlotOfAgent {

private:
  // TODO: set- and get function for maxNumOf_mountedSensors;
  float slaveAgentValue;
  list<float> lSlaveAgentHistory;

  bool flagSlaveAgentValueIsSet;
  /*
  //XXX - next 3 variables needed?
  bool flagSlaveAgentValueHasChanged;
  bool flagSlaveAgentValueChangeIsSet;
  float slaveAgentValueChange;
  */

  /*
  vector<State*> vStates;
  State* activeState;
  State* backupState;

  bool
  ateToStatesVector(State* state);
  */

public:
  SlaveAgentSlotOfAgent();

  void setSlaveAgentValue(float slaveAgentValue);
  bool get_slaveAgentValue(float *slaveAgentValue);

  bool get_flagSlaveAgentValueIsSet();

  // TODO: move these functions into -> HistoryHandler
  bool saveValueInHistory();
  unsigned int getHistoryLength();
  bool deleteOldestHistoryEntry();
  unsigned int getNumberOfRelativesToActualValue(float threshold);

  // DATE18
  list<float> getHistory();

  void printHistory();

  /*
  bool get_flagSlaveAgentValueHasChanged();

  bool get_slaveAgentValueChangingRate(float* slaveAgentValueChangingRate);


  vector<State*>* getStatesVector();
  bool createNewStateAndMakeItActive();
  bool injectValueInActiveState();
  int getIndexOfRelatedState(unsigned int startIndex, float thresholdToAverage);

  bool relatedToActiveState(float thresholdToAverage);
  bool valueIsRelated(unsigned int index, float thresholdToAverage);

  State* getActiveState();
  void deleteActiveState();
  bool setActiveState(unsigned int index);
  unsigned int getNumberOfStates();
  */
  /*
  vector<State*>* getStatesVector();
  State* getActiveState();
  */
};

#endif