21 CRoboticHeadInterface::CRoboticHeadInterface() :
22 mrpt::utils::COutputLogger(
"CRoboticHeadInterface")
61 THROW_EXCEPTION(
"ERROR LEYENDO LA GANANCIA DEL AMPLIFICADOR DE LA OREJA \n");
105 for (
size_t k = 0; k < 3; k++)
107 for (
size_t j = 0; j < 500/100; j++)
110 for (
size_t i = 0; i < 100; i++)
void Get3SoundBuffer(mrpt::math::CMatrixTemplate< int > &buf)
Debug only!!! This function return the last 500 acquired samples for each sound channel.
bool SetGain(int &new_gain, int &channel)
Set the gain for the amplifier each ear.
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
#define THROW_EXCEPTION(msg)
Contains classes for various device interfaces.
std::string read_string(const std::string §ion, const std::string &name, const std::string &defaultValue, bool failIfNotFound=false) const
void GetGain(int &_gain, int &channel)
Read the gain for the amplifier of the ear "channel", where channel is 0, 1 or 2. ...
This class allows loading and storing values and vectors of different types from a configuration text...
int read_int(const std::string §ion, const std::string &name, int defaultValue, bool failIfNotFound=false) const
CInterfaceFTDIMessages m_usbConnection
This base provides a set of functions for maths stuff.
void read_vector(const std::string §ion, const std::string &name, const VECTOR_TYPE &defaultValue, VECTOR_TYPE &outValues, bool failIfNotFound=false) const
Reads a configuration parameter of type vector, stored in the file as a string: "[v1 v2 v3 ...
std::string m_serialNumber
GLsizei const GLchar ** string
This template class provides the basic functionality for a general 2D any-size, resizable container o...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
void GetSoundLocation(int &ang)
This function return the angle where last sound where detected.
bool receiveMessage(utils::CMessage &msg)
Tries to receive a message from the device.
void sendMessage(const utils::CMessage &msg)
Send a message to the device.
std::vector< uint8_t > content
The contents of the message (memory is automatically handled by the std::vector object) ...
void setSize(size_t row, size_t col, bool zeroNewElements=false)
Changes the size of matrix, maintaining the previous contents.
std::vector< int32_t > gain
void loadConfig_sensorSpecific(const mrpt::utils::CConfigFileBase *configSource, const std::string &iniSection)
Loads specific configuration for the device from a given source of configuration parameters, for example, an ".ini" file, loading from the section "[iniSection]" (see utils::CConfigFileBase and derived classes) See hwdrivers::CSonarSRF10 for the possible parameters.
uint32_t type
An identifier of the message type (only the least-sig byte is typically sent)