// TSensors.h: interface for the TSensors class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_TSENSORS_H__20FAC091_F11B_11D6_867D_0000E87713C4__INCLUDED_)
#define AFX_TSENSORS_H__20FAC091_F11B_11D6_867D_0000E87713C4__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "TObject.h"
#include "TConfig.h"

struct TEnvStateSet
{
   TDoorsState doorsState;
   TElevState  elevState;
   TElevTask   elevTask;
   int         whereUppestButt;
   int         isElevOnThisFloorPressed;
   int         isButtUpOnThisFloorPressed;
   int         isButtDownOnThisFloorPressed;

   float       wherePopulestFloor;
};

class TSensors  
{
public:
   TSensors();
   virtual ~TSensors();

   void getEnvState( TEnvStateSet &set );

   void init();
   void reset();

   void pressButton( int floor );

   int getPopulestFloor();

protected:

   int *floorsPresses;
   int changed;
   int cachePopulest;
};

#endif // !defined(AFX_TSENSORS_H__20FAC091_F11B_11D6_867D_0000E87713C4__INCLUDED_)
