icub-client
homeostasisManager.cpp
Go to the documentation of this file.
1 #include "homeostasisManager.h"
2 #include <cmath>
3 
5 {
6  for (unsigned int i = 0; i < drives.size(); i++)
7  {
8  drives[i]->update();
9  }
10  return true;
11 }
12 
14 {
15  drives.push_back(D);
16 }
17 
19 {
20  drives.erase(drives.begin()+D);
21 }
22 
23 void HomeostasisManager::sleep(int D, double time)
24 {
25  drives[D]->sleep(time);
26 }
27 
void sleep(int D, double time)
sleep cancels update function for a time
bool updateDrives()
updateDrives updates all internal values
void removeDrive(int D)
removeDrive Removes a drive in homeostasis manager.
std::vector< Drive * > drives
void addDrive(Drive *D)
addDrive Generates a drive in the homeostasis manager.