Flair
Framework Libre Air
flair::sensor::Imu Class Reference

Base class for Imu. More...

#include <Imu.h>

+ Inheritance diagram for flair::sensor::Imu:

Public Member Functions

 Imu (const core::FrameworkManager *parent, std::string name)
 Constructor. More...
 
 Imu (const core::IODevice *parent, std::string name)
 Constructor. More...
 
 ~Imu ()
 Destructor. More...
 
gui::LayoutGetLayout (void) const
 Setup Layout. More...
 
void LockUserInterface (void) const
 Lock user interface. More...
 
void UnlockUserInterface (void) const
 Unlock user interface. More...
 
void UseDefaultPlot (void)
 Use default plot. More...
 
gui::TabGetPlotTab (void) const
 Plot tab. More...
 
core::OneAxisRotationGetOneAxisRotation (void) const
 Get OneAxisRotation. More...
 
- Public Member Functions inherited from flair::core::IODevice
 IODevice (const Object *parent, std::string name)
 Constructor. More...
 
virtual ~IODevice ()
 Destructor. More...
 
void AddDeviceToLog (const IODevice *device)
 Add an IODevice to the logs. More...
 
void AddDataToLog (const io_data *data)
 Add an io_data to the log. More...
 
void OutputToShMem (bool enabled)
 Send the output to a shared memory. More...
 
virtual DataType const & GetInputDataType () const
 
virtual DataType const & GetOutputDataType () const
 
- Public Member Functions inherited from flair::core::Object
 Object (const Object *parent=NULL, std::string name="", std::string type="")
 Constructor. More...
 
virtual ~Object ()
 Destructor. More...
 
std::string ObjectName (void) const
 Name. More...
 
std::string ObjectType (void) const
 Type. More...
 
const ObjectParent (void) const
 Parent. More...
 
std::vector< const Object * > * TypeChilds (void) const
 Childs of the same type. More...
 
std::vector< const Object * > * Childs (void) const
 Childs. More...
 
void Information (const char *function, int line, const char *format,...) const
 Formatted information. More...
 
void Warning (const char *function, const char *format,...) const
 Formatted warning. More...
 
void Error (const char *function, const char *format,...) const
 Formatted error. More...
 
bool ErrorOccured (bool recursive=true) const
 Has an errror occured? More...
 

Protected Member Functions

gui::GroupBoxGetGroupBox (void) const
 Setup GroupBox. More...
 
void UpdateImu ()
 UpdateImu. More...
 
void GetDatas (core::ImuData **imuData) const
 Get imu datas. More...
 
- Protected Member Functions inherited from flair::core::IODevice
void ProcessUpdate (io_data *data)
 Process the childs of type IODevice, and log if needed. More...
 

Additional Inherited Members

- Public Types inherited from flair::core::Object
enum  color_t { Auto = 0, Red = 31, Green = 32, Orange = 33 }
 

Detailed Description

Base class for Imu.

Use this class to define a custom Imu.

Constructor & Destructor Documentation

flair::sensor::Imu::Imu ( const core::FrameworkManager parent,
std::string  name 
)

Constructor.

Construct an Imu.

Parameters
parentparent
namename
flair::sensor::Imu::Imu ( const core::IODevice parent,
std::string  name 
)

Constructor.

Construct an Imu.
This contructor must only be called for a simulated device.

Parameters
parentparent
namename
flair::sensor::Imu::~Imu ( )

Destructor.

Member Function Documentation

gui::Layout* flair::sensor::Imu::GetLayout ( void  ) const

Setup Layout.

Returns
setup Layout
void flair::sensor::Imu::LockUserInterface ( void  ) const

Lock user interface.

void flair::sensor::Imu::UnlockUserInterface ( void  ) const

Unlock user interface.

void flair::sensor::Imu::UseDefaultPlot ( void  )

Use default plot.

gui::Tab* flair::sensor::Imu::GetPlotTab ( void  ) const

Plot tab.

Returns
plot Tab
core::OneAxisRotation* flair::sensor::Imu::GetOneAxisRotation ( void  ) const

Get OneAxisRotation.

Returns
fixed rotation of the imu
gui::GroupBox* flair::sensor::Imu::GetGroupBox ( void  ) const
protected

Setup GroupBox.

Returns
setup GroupBox
void flair::sensor::Imu::UpdateImu ( )
protected

UpdateImu.

The reimplemented class must call this function as soon as IMU datas are available.
It handles the data rotation if it was defined.

void flair::sensor::Imu::GetDatas ( core::ImuData **  imuData) const
protected

Get imu datas.

Parameters
imuDataimu datas