source: flair-src/trunk/lib/FlairCore/src/unexported/IODevice_impl.h@ 456

Last change on this file since 456 was 157, checked in by Sanahuja Guillaume, 5 years ago

iadded isready to iodevice:
avoid problem of imu not ready in ardrone2

File size: 1.7 KB
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5/*!
6 * \file IODevice_impl.h
7 * \brief Classe de base pour un système à entrées/sorties
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2011/05/01
10 * \version 4.0
11 */
12
13#ifndef IO_DEVICE_IMPL_H
14#define IO_DEVICE_IMPL_H
15
16#include <string>
17#include <Object.h>
18
19namespace flair {
20namespace core {
21class io_data;
22class IODevice;
23class Thread;
24class Mutex;
25class FrameworkManager;
26class SharedMem;
27}
28}
29
30class FrameworkManager_impl;
31
32class IODevice_impl {
33public:
34 IODevice_impl(const flair::core::IODevice *self);
35 ~IODevice_impl();
36 void ResumeThread(void);
37 size_t LogSize(void) const;
38 void AppendLog(char **ptr);
39 void AddDataToLog(const flair::core::io_data *data);
40 void WriteLogsDescriptors(std::fstream &desc_file, int *index);
41 int SetToWake(const flair::core::Thread *thread);
42 void WriteLog(flair::core::Time time);
43 void AddDeviceToLog(const flair::core::IODevice *device);
44 void SetToBeLogged(void);
45 bool IsSetToBeLogged(void) const;
46 void OutputToShMem(bool enabled);
47 void WriteToShMem(void);
48 void PrintLogsDescriptors(void);
49 void SetIsReady(bool status);
50 bool IsReady(void) const;
51
52private:
53 std::vector<const flair::core::IODevice *> devicesToLog;
54 const flair::core::IODevice *self;
55 const flair::core::FrameworkManager *framework;
56 FrameworkManager_impl *framework_impl;
57 std::vector<const flair::core::io_data *> datasToLog;
58 flair::core::Thread *thread_to_wake;
59 flair::core::Mutex *wake_mutex;
60 bool tobelogged;
61 bool outputtoshm;
62 flair::core::SharedMem *shmem;
63 bool isReady;
64};
65
66#endif // IO_DEVICE_IMPL_H
Note: See TracBrowser for help on using the repository browser.