47 lines
966 B
C++
47 lines
966 B
C++
/*
|
|
*******************************************************************************
|
|
* INCLUDE
|
|
*******************************************************************************
|
|
*/
|
|
#include "Sensor.h"
|
|
|
|
namespace Hardware
|
|
{
|
|
/*
|
|
*******************************************************************************
|
|
* CLASS DEFINE
|
|
*******************************************************************************
|
|
*/
|
|
Sensor::Sensor(Type type): _type(type)
|
|
{
|
|
}
|
|
|
|
Sensor::~Sensor()
|
|
{
|
|
}
|
|
|
|
void Sensor::read(float& value)
|
|
{
|
|
}
|
|
|
|
void Sensor::read(float values[])
|
|
{
|
|
}
|
|
|
|
Sensor::Type Sensor::type()
|
|
{
|
|
return _type;
|
|
}
|
|
|
|
SensorManager::SensorCollection SensorManager::_sensorCollection;
|
|
|
|
Sensor& SensorManager::getDefaultSensor(Sensor::Type type)
|
|
{
|
|
return *_sensorCollection[type][0];
|
|
}
|
|
|
|
void SensorManager::registerSensor(Sensor::Type type, Sensor::Ptr pSensor)
|
|
{
|
|
_sensorCollection[type].push_back(pSensor);
|
|
}
|
|
}
|