Fawkes API
Fawkes Development Version
gex_sender_thread.h
1
2
/***************************************************************************
3
* gex_sender_thread.h - Gossip Example Plugin - Sender
4
*
5
* Created: Wed Mar 05 14:27:35 2014
6
* Copyright 2006-2014 Tim Niemueller [www.niemueller.de]
7
****************************************************************************/
8
9
/* This program is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; either version 2 of the License, or
12
* (at your option) any later version.
13
*
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU Library General Public License for more details.
18
*
19
* Read the full text in the LICENSE.GPL file in the doc directory.
20
*/
21
22
#ifndef _PLUGINS_GOSSIP_EXAMPLE_GEX_SENDER_THREAD_H_
23
#define _PLUGINS_GOSSIP_EXAMPLE_GEX_SENDER_THREAD_H_
24
25
#include <aspect/blocked_timing.h>
26
#include <aspect/clock.h>
27
#include <aspect/logging.h>
28
#include <core/threading/thread.h>
29
#include <plugins/gossip/aspect/gossip.h>
30
31
namespace
fawkes
{
32
class
Time;
33
}
34
35
class
GossipExampleSenderThread
:
public
fawkes::Thread
,
36
public
fawkes::ClockAspect
,
37
public
fawkes::LoggingAspect
,
38
public
fawkes::BlockedTimingAspect
,
39
public
fawkes::GossipAspect
40
{
41
public
:
42
GossipExampleSenderThread
();
43
virtual
~GossipExampleSenderThread
();
44
45
virtual
void
init
();
46
virtual
void
loop
();
47
virtual
void
finalize
();
48
49
/** Stub to see name in backtrace for easier debugging. @see Thread::run() */
50
protected
:
51
virtual
void
52
run
()
53
{
54
Thread::run();
55
}
56
57
private
:
58
fawkes::Time
*last_sent_;
59
unsigned
int
counter_;
60
};
61
62
#endif
GossipExampleSenderThread::~GossipExampleSenderThread
virtual ~GossipExampleSenderThread()
Destructor.
Definition:
gex_sender_thread.cpp:43
GossipExampleSenderThread::loop
virtual void loop()
Code to execute in the thread.
Definition:
gex_sender_thread.cpp:61
fawkes::GossipAspect
Definition:
gossip.h:41
GossipExampleSenderThread::init
virtual void init()
Initialize the thread.
Definition:
gex_sender_thread.cpp:48
GossipExampleSenderThread::GossipExampleSenderThread
GossipExampleSenderThread()
Constructor.
Definition:
gex_sender_thread.cpp:35
GossipExampleSenderThread::finalize
virtual void finalize()
Finalize the thread.
Definition:
gex_sender_thread.cpp:55
fawkes::BlockedTimingAspect
Definition:
blocked_timing.h:54
GossipExampleSenderThread
Definition:
gex_sender_thread.h:34
fawkes
fawkes::LoggingAspect
Definition:
logging.h:36
GossipExampleSenderThread::run
virtual void run()
Stub to see name in backtrace for easier debugging.
Definition:
gex_sender_thread.h:51
fawkes::Time
Definition:
time.h:96
fawkes::Thread
Definition:
thread.h:44
fawkes::ClockAspect
Definition:
clock.h:38
src
plugins
gossip
example
gex_sender_thread.h
Generated by
1.8.16