pfpsim Docs -[1.0.0]
Main Page
Related Pages
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Pages
core
PacketBase.h
1
/*
2
* PFPSim: Library for the Programmable Forwarding Plane Simulation Framework
3
*
4
* Copyright (C) 2016 Concordia Univ., Montreal
5
* Samar Abdi
6
* Umair Aftab
7
* Gordon Bailey
8
* Faras Dewal
9
* Shafigh Parsazad
10
* Eric Tremblay
11
*
12
* Copyright (C) 2016 Ericsson
13
* Bochra Boughzala
14
*
15
* This program is free software; you can redistribute it and/or
16
* modify it under the terms of the GNU General Public License
17
* as published by the Free Software Foundation; either version 2
18
* of the License, or (at your option) any later version.
19
*
20
* This program is distributed in the hope that it will be useful,
21
* but WITHOUT ANY WARRANTY; without even the implied warranty of
22
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
* GNU General Public License for more details.
24
*
25
* You should have received a copy of the GNU General Public License
26
* along with this program; if not, write to the Free Software
27
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
28
* 02110-1301, USA.
29
*/
30
35
#ifndef CORE_PACKETBASE_H_
36
#define CORE_PACKETBASE_H_
37
#include <string>
38
#include "TrType.h"
39
40
namespace
pfp
{
41
namespace
core {
42
43
// TODO(gordon) This class is only here for backwards compatibility.
44
// It could be removed.
45
class
PacketBase
:
public
TrType
{
46
public
:
47
PacketBase
() =
default
;
48
virtual
~
PacketBase
() =
default
;
49
50
explicit
PacketBase
(std::size_t
id
, std::string type =
"PacketBase"
)
51
:
TrType
(
id
), type(type) {}
52
53
std::string data_type()
const override
{
54
return
type;
55
}
56
57
bool
debuggable
()
const override
{
58
return
true
;
59
}
60
61
private
:
62
const
std::string type;
63
};
// PacketBase
64
65
};
// namespace core
66
};
// namespace pfp
67
68
#endif // CORE_PACKETBASE_H_
pfp::core::TrType
Definition:
TrType.h:47
pfp::core::PacketBase::debuggable
bool debuggable() const override
Check whether this packet should be watched by the debugger.
Definition:
PacketBase.h:57
pfp::core::PacketBase
Definition:
PacketBase.h:45
pfp
PacketBase.h.
Definition:
ConfigurationParameters.cpp:36
Generated on Fri May 20 2016 16:55:59 for pfpsim by
Doxygen
[ 1.8.8 ]