Leosac
0.8.0
Open Source Access Control
rplethpacket.hpp
Go to the documentation of this file.
1
/*
2
Copyright (C) 2014-2016 Leosac
3
4
This file is part of Leosac.
5
6
Leosac is free software: you can redistribute it and/or modify
7
it under the terms of the GNU Affero General Public License as published by
8
the Free Software Foundation, either version 3 of the License, or
9
(at your option) any later version.
10
11
Leosac is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU Affero General Public License for more details.
15
16
You should have received a copy of the GNU Affero General Public License
17
along with this program. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
26
#ifndef RPLETHPACKET_HPP
27
#define RPLETHPACKET_HPP
28
29
#include "
tools/bufferutils.hpp
"
30
31
#include <vector>
32
33
namespace
Leosac
34
{
35
namespace
Module
36
{
37
namespace
Rpleth
38
{
39
class
RplethPacket
40
{
41
public
:
42
enum class
Sender
43
{
44
Client
= 0,
45
Server
46
};
47
48
public
:
49
RplethPacket
(
Sender
packetSender);
50
51
RplethPacket
(
const
RplethPacket
&other);
52
53
~RplethPacket
() =
default
;
54
55
RplethPacket
&
operator=
(
const
RplethPacket
&other);
56
57
public
:
58
Byte
checksum
()
const
;
59
60
public
:
61
Byte
status
;
62
Byte
type
;
63
Byte
command
;
64
Byte
dataLen
;
65
std::vector<Byte>
data
;
66
Byte
sum
;
67
bool
isGood
;
68
Sender
sender
;
69
};
70
}
71
}
72
}
73
74
#endif // RPLETHPACKET_HPP
Leosac::Module::Rpleth::RplethPacket::sender
Sender sender
Definition:
rplethpacket.hpp:68
Leosac::Module::Rpleth::RplethPacket::~RplethPacket
~RplethPacket()=default
Leosac::Module::Rpleth::RplethPacket
Definition:
rplethpacket.hpp:39
Leosac::Module::Rpleth::RplethPacket::Sender::Client
@ Client
Leosac::Module::Rpleth::RplethPacket::Sender::Server
@ Server
Leosac::Module::Rpleth::RplethPacket::type
Byte type
Definition:
rplethpacket.hpp:62
Leosac::Module::Rpleth::RplethPacket::sum
Byte sum
Definition:
rplethpacket.hpp:66
Leosac
This is the header file for a generated source file, GitSHA1.cpp.
Definition:
APIStatusCode.hpp:22
Leosac::Module::Rpleth::RplethPacket::dataLen
Byte dataLen
Definition:
rplethpacket.hpp:64
Leosac::Module::Rpleth::RplethPacket::RplethPacket
RplethPacket(Sender packetSender)
Definition:
rplethpacket.cpp:30
Leosac::Module::Rpleth::RplethPacket::Sender
Sender
Definition:
rplethpacket.hpp:42
Leosac::Module::Rpleth::RplethPacket::status
Byte status
Definition:
rplethpacket.hpp:61
Leosac::Module::Rpleth::RplethPacket::operator=
RplethPacket & operator=(const RplethPacket &other)
Definition:
rplethpacket.cpp:53
bufferutils.hpp
buffer-related helper functions
Leosac::Module::Rpleth::RplethPacket::command
Byte command
Definition:
rplethpacket.hpp:63
Leosac::Module::Rpleth::RplethPacket::data
std::vector< Byte > data
Definition:
rplethpacket.hpp:65
Leosac::Module::Rpleth::RplethPacket::isGood
bool isGood
Definition:
rplethpacket.hpp:67
Byte
std::uint8_t Byte
Definition:
bufferutils.hpp:31
Leosac::Module::Rpleth::RplethPacket::checksum
Byte checksum() const
Definition:
rplethpacket.cpp:66
src
modules
rpleth
rplethpacket.hpp
Generated on Tue Mar 22 2022 10:48:26 for Leosac by
1.8.17