This repository has been archived on 2025-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
rc2007-soccer/source/Concept/Framework/robot.h

46 lines
623 B
C
Raw Permalink Normal View History

2007-01-14 18:07:03 +00:00
#ifndef _ROBOT_H
#define _ROBOT_H
#include "stdafx.h"
class IO_Module;
class Sensor;
class Engine;
class Robot
{
public:
Robot();
2007-01-14 18:07:03 +00:00
~Robot();
private:
IO_Module* modules[IO_END];
2007-01-14 18:07:03 +00:00
public:
bool AddModule(IO_Module* newModule);
template <class T> T* GetModule(uint8 moduleId)
{
return ((T*)modules[moduleId]);
2007-01-14 18:07:03 +00:00
}
bool RemoveModule(uint8 moduleId)
{
if(!modules[moduleId])
return false;
delete modules[moduleId];
modules[moduleId] = NULL;
2007-01-14 18:07:03 +00:00
return true;
}
bool RemoveModule(IO_Module* oldModule);
void Update();
2007-02-15 20:33:05 +00:00
uint16 GetADCValue(uint8 channel);
2007-01-14 18:07:03 +00:00
};
#endif