Page MenuHomec4science

Supervisor.cpp
No OneTemporary

File Metadata

Created
Thu, Sep 26, 20:25

Supervisor.cpp

/*
* Supervisor.cpp
*
* Created on: Jan 21, 2013
* Author: tuleu
*/
#include "Supervisor.h"
#include <liboncilla/utils/OncillaBackend.h>
#include "Oncilla.h"
namespace rci {
namespace oncilla {
Supervisor::Supervisor(OncillaBackend & backend)
: d_l4s(4,SupervisorL4::Ptr())
, d_trunk(backend.CreateSupervisorTrunk()){
LIBONCILLA_FOREACH_LEG(l){
d_l4s[l] = backend.CreateSupervisorL4(l,Oncilla::nameOfLeg(l) + " Oncilla Supervised L4");
}
}
Supervisor::~Supervisor(){
}
const SupervisorTrunk::Ptr & Supervisor::getTrunk(){
return d_trunk;
}
const SupervisorL4::Ptr & Supervisor::getL4(Leg l){
if(l >= NUM_LEGS){
std::ostringstream os;
os << "Leg " << l << "is out of range [0 3].";
throw std::out_of_range(os.str());
}
return d_l4s[l];
}
} /* namespace oncilla */
} /* namespace rci */

Event Timeline