[9] | 1 | // *********************************************************************
|
---|
| 2 | //
|
---|
| 3 | // created: 2015/09/18
|
---|
| 4 | // filename: MessageComponent.h
|
---|
| 5 | //
|
---|
| 6 | // author: Gerald Dherbomez
|
---|
| 7 | // Copyright Heudiasyc (c) UMR UTC/CNRS 7253
|
---|
| 8 | //
|
---|
| 9 | // license: CECILL-C
|
---|
| 10 | //
|
---|
| 11 | // version: $Id: $
|
---|
| 12 | //
|
---|
| 13 | // brief: Pacpus template component header file
|
---|
| 14 | //
|
---|
| 15 | // *********************************************************************
|
---|
| 16 |
|
---|
| 17 |
|
---|
| 18 | #ifndef __MessageComponent_h__
|
---|
| 19 | #define __MessageComponent_h__
|
---|
| 20 |
|
---|
| 21 | #include <Pacpus/kernel/PacpusLibConfig.h>
|
---|
| 22 | #include <Pacpus/kernel/ComponentBase.h>
|
---|
| 23 | #include <Pacpus/kernel/InputOutputInterface.h>
|
---|
| 24 | #include <Pacpus/kernel/DbiteFile.h>
|
---|
| 25 | #include <QTimer>
|
---|
| 26 |
|
---|
| 27 | namespace pacpus
|
---|
| 28 | {
|
---|
| 29 |
|
---|
| 30 | class PACPUSLIB_API MessageComponent
|
---|
| 31 | : public QObject
|
---|
| 32 | , public ComponentBase
|
---|
| 33 | {
|
---|
| 34 | Q_OBJECT
|
---|
| 35 |
|
---|
| 36 | public:
|
---|
| 37 | // Specific constructor for pacpus component
|
---|
| 38 | MessageComponent(QString name);
|
---|
| 39 | ~MessageComponent();
|
---|
| 40 |
|
---|
| 41 | // 3 inherited virtual pure methods
|
---|
| 42 | virtual void startActivity();
|
---|
| 43 | virtual void stopActivity();
|
---|
| 44 | virtual ComponentBase::COMPONENT_CONFIGURATION configureComponent(XmlComponentConfig config);
|
---|
| 45 |
|
---|
| 46 | virtual void addInputs();
|
---|
| 47 | virtual void addOutputs();
|
---|
| 48 |
|
---|
| 49 | // void produceOutput();
|
---|
| 50 | // void processInput(const int& value);
|
---|
| 51 |
|
---|
| 52 |
|
---|
| 53 | private:
|
---|
| 54 | // Add here your private variables
|
---|
| 55 | QTimer timer_;
|
---|
| 56 | float period_;
|
---|
| 57 | int count_;
|
---|
| 58 |
|
---|
| 59 | private slots:
|
---|
| 60 | void display();
|
---|
| 61 |
|
---|
| 62 | // Declaration of an output
|
---|
| 63 | // OutputInterface<int, MessageComponent>* out1_;
|
---|
| 64 |
|
---|
| 65 |
|
---|
| 66 | }; // end class MessageComponent
|
---|
| 67 |
|
---|
| 68 | } // end namespace pacpus
|
---|
| 69 |
|
---|
| 70 | #endif |
---|