Flair
Framework Libre Air
|
Abstract class for data types. More...
#include <io_data.h>
Public Member Functions | |
io_data (const Object *parent, std::string name, int n) | |
Constructor. More... | |
virtual | ~io_data () |
Destructor. More... | |
void | SetDataTime (Time time) |
Set data time. More... | |
Time | DataTime (void) const |
Data time. More... | |
const io_data * | Prev (int n) const |
Previous data. More... | |
virtual DataType const & | GetDataType () const =0 |
Public Member Functions inherited from flair::core::Mutex | |
Mutex (const Object *parent, std::string name="") | |
Constructor. More... | |
~Mutex () | |
Destructor. More... | |
void | GetMutex (void) const |
GetMutex. More... | |
void | ReleaseMutex (void) const |
ReleaseMutex. More... | |
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 Object * | Parent (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 | |
void | AppendLogDescription (std::string description, DataType const &datatype) |
Specify the description of the reimplemented class data's. More... | |
void | SetPtrToCircle (void **ptr) |
Set the datas to circle. More... | |
Protected Attributes | |
io_data * | prev |
Pointer to previous data. More... | |
Additional Inherited Members | |
Public Types inherited from flair::core::Object | |
enum | color_t { Auto = 0, Red = 31, Green = 32, Orange = 33 } |
Abstract class for data types.
Use this class to define a custom data type. Data types ares used for logging and graphs.
The reimplemented class must call SetSize() in its constructor.
io_data can be constructed with n samples (see io_data::io_data). In this case, old samples can be accessed throug io_data::Prev.
flair::core::io_data::io_data | ( | const Object * | parent, |
std::string | name, | ||
int | n | ||
) |
|
virtual |
Destructor.
void flair::core::io_data::SetDataTime | ( | Time | time | ) |
Set data time.
time | time |
Time flair::core::io_data::DataTime | ( | void | ) | const |
Data time.
const io_data* flair::core::io_data::Prev | ( | int | n | ) | const |
Previous data.
Access previous data. io_data must have been constructed with n>1, io_data::SetPtrToCircle must have been set and io_data::prev must have been allocated.
n | previous data number |
|
protected |
Specify the description of the reimplemented class data's.
This method must be called in the constructor of the reimplemented class, once by element.
Each element description must be called in the same order as CopyDatas put the datas in the buffer.
The description will be used for the log descriptor file.
description | description of the element |
datatype | type of the element |
|
protected |
Set the datas to circle.
ptr | pointer to the data to circle |
|
protected |
Pointer to previous data.
Reimplemented class must allocate this pointer if n>1.
Pointer must be allocated with the same kind of reimplemented class.