StateSpace.h

Go to the documentation of this file.
00001 #ifndef __STATESPACE_H__
00002 #define __STATESPACE_H__
00003 
00004 #include "Ram.h"
00005 #include "Environment.h"
00006 
00007 class StateSpace {
00008 
00009      public:
00010 
00011           StateSpace(Environment* newEnv);
00012           ~StateSpace();
00013 
00014           void getState (ENV_POS* pos, STATE *_state);
00015           void setState (ENV_POS* pos, STATE *_state);
00016 
00017           void setValue (ENV_POS* pos, float _value);
00018           void setBestAction (ENV_POS* pos, unsigned char _action);
00019           void setFeedback (ENV_POS* pos, unsigned char _action, char _fb);
00020 
00021           double getValue (ENV_POS* pos);
00022           unsigned char getBestAction (ENV_POS* pos);
00023           char getFeedback (ENV_POS* pos, unsigned char _action);
00024 
00025           void ramtestSaveBytes(unsigned int _addr, unsigned char *data, unsigned char _length);
00026           void ramtestReadBytes(unsigned int _addr, unsigned char *data, unsigned char _length);
00027           unsigned int getMemorySize();
00028 
00029           bool useInternalRAM;
00030 
00031      private:
00032           STATE tmpState;
00033 
00034           Environment* env;
00035 
00036           // for internal RAM
00037           unsigned char* internStateSpace; //[STATESIZE*MAX_STATES];
00038 
00039           // for external RAM
00040           Ram* ram1;
00041 };
00042 
00043 
00044 #endif
00045 
Generated on Fri Oct 8 17:10:07 2010 for Crawling Robot Microcontroller Software by  doxygen 1.6.3