| 238 | } |
| 239 | |
| 240 | Device* Everything::getDeviceByName(const String &str) |
| 241 | { |
| 242 | for(unsigned int index=0; index<m_nSensorCount; ++index) |
| 243 | { |
| 244 | if(m_Sensors[index]->getName()==str) |
| 245 | return (Device*)m_Sensors[index]; |
| 246 | } |
| 247 | |
| 248 | for(unsigned int index=0; index<m_nExecutorCount; ++index) |
| 249 | { |
| 250 | if(m_Executors[index]->getName()==str) |
| 251 | return (Device*)m_Executors[index]; |
| 252 | } |
| 253 | |
| 254 | return 0; //null if no such device present |
| 255 | } |
| 256 | |
| 257 | bool Everything::addSensor(Sensor *sensor) |
| 258 | { |