IBR-DTNSuite
0.12
Main Page
Namespaces
Classes
Files
File List
File Members
AcknowledgementSet.h
Go to the documentation of this file.
1
/*
2
* AcknowledgementSet.h
3
*
4
* Created on: 11.01.2013
5
* Author: morgenro
6
*/
7
8
#ifndef ACKNOWLEDGEMENTSET_H_
9
#define ACKNOWLEDGEMENTSET_H_
10
11
#include "
routing/NodeHandshake.h
"
12
#include <
ibrdtn/data/BundleList.h
>
13
#include <
ibrcommon/thread/Mutex.h
>
14
#include <iostream>
15
#include <set>
16
17
namespace
dtn
18
{
19
namespace
routing
20
{
24
class
AcknowledgementSet
:
public
NodeHandshakeItem
,
public
ibrcommon::Mutex
25
{
26
public
:
27
AcknowledgementSet
();
28
AcknowledgementSet
(
const
AcknowledgementSet
&);
29
33
void
add
(
const
dtn::data::MetaBundle
&bundle)
throw
();
34
38
void
expire
(
const
dtn::data::Timestamp
×tamp)
throw
();
39
43
void
merge
(
const
AcknowledgementSet
&)
throw
();
44
48
bool
has
(
const
dtn::data::BundleID
&
id
)
const
throw
();
49
50
/* virtual methods from NodeHandshakeItem */
51
virtual
const
dtn::data::Number
&
getIdentifier
()
const
;
52
virtual
dtn::data::Length
getLength
()
const
;
53
virtual
std::ostream&
serialize
(std::ostream& stream)
const
;
54
virtual
std::istream&
deserialize
(std::istream& stream);
55
static
const
dtn::data::Number
identifier
;
56
57
friend
std::ostream&
operator<<
(std::ostream&,
const
AcknowledgementSet
&);
58
friend
std::istream&
operator>>
(std::istream&,
AcknowledgementSet
&);
59
60
typedef
dtn::data::BundleList::const_iterator
const_iterator
;
61
const_iterator
begin
()
const
{
return
_bundles.
begin
(); };
62
const_iterator
end
()
const
{
return
_bundles.
end
(); };
63
64
private
:
65
dtn::data::BundleList
_bundles;
66
};
67
}
/* namespace routing */
68
}
/* namespace dtn */
69
#endif
/* ACKNOWLEDGEMENTSET_H_ */
daemon
src
routing
prophet
AcknowledgementSet.h
Generated on Thu Mar 27 2014 09:26:20 for IBR-DTNSuite by
1.8.4