source: pacpussensors/trunk/PacpusSocket/StringGenerator.h@ 150

Last change on this file since 150 was 126, checked in by DHERBOMEZ Gérald, 8 years ago

StringGenerator component added to test PacpusUDPSocket
XML file to test provided

File size: 1.6 KB
Line 
1/*********************************************************************
2// created: 2016/05/13
3// filename: StringGenerator.h
4//
5// author: Gerald Dherbomez
6// Copyright Heudiasyc UMR UTC/CNRS 7253
7//
8// version: $Id: $
9//
10// purpose: A component that generates a string
11//
12*********************************************************************/
13
14#include "Pacpus/kernel/Log.h"
15#include "Pacpus/kernel/ComponentBase.h"
16#include "Pacpus/kernel/ComponentFactory.h"
17
18#include <QTimer>
19
20// Export macro for PacpusSocket DLL for Windows only
21#ifdef WIN32
22# ifdef PACPUSSOCKET_EXPORTS
23 // make DLL
24# define PACPUSSOCKET_API __declspec(dllexport)
25# else
26 // use DLL
27# define PACPUSSOCKET_API __declspec(dllimport)
28# endif
29#else
30 // On other platforms, simply ignore this
31# define PACPUSSOCKET_API
32#endif
33
34namespace pacpus {
35
36class PACPUSSOCKET_API StringGenerator
37 : public QObject
38 , public ComponentBase
39{
40 Q_OBJECT
41
42public:
43 /// Constructor
44 StringGenerator(QString name);
45
46 /// Destructor
47 ~StringGenerator();
48
49
50public Q_SLOTS:
51 void sendData();
52
53Q_SIGNALS:
54 void timeout();
55
56
57protected:
58 // The 3 virtual methods relative to the ComponentBase inheritance
59 virtual void startActivity();
60 virtual void stopActivity();
61 virtual COMPONENT_CONFIGURATION configureComponent(XmlComponentConfig config);
62
63 virtual void addInputs();
64 virtual void addOutputs();
65
66private:
67 OutputInterface<QString, StringGenerator>* stringOutput_;
68
69
70};
71
72} // namespace pacpus
Note: See TracBrowser for help on using the repository browser.