mqtt_cpp
include
mqtt
fixed_header.hpp
Go to the documentation of this file.
1
// Copyright Takatoshi Kondo 2015
2
//
3
// Distributed under the Boost Software License, Version 1.0.
4
// (See accompanying file LICENSE_1_0.txt or copy at
5
// http://www.boost.org/LICENSE_1_0.txt)
6
7
#if !defined(MQTT_FIXED_HEADER_HPP)
8
#define MQTT_FIXED_HEADER_HPP
9
10
#include <
mqtt/namespace.hpp
>
11
#include <
mqtt/control_packet_type.hpp
>
12
13
namespace
MQTT_NS
{
14
15
constexpr std::uint8_t
make_fixed_header
(
control_packet_type
type, std::uint8_t flags) {
16
return
static_cast<
std::uint8_t
>
(type) | (flags & 0x0f);
17
}
18
19
}
// namespace MQTT_NS
20
21
#endif
// MQTT_FIXED_HEADER_HPP
control_packet_type.hpp
MQTT_NS
Definition:
any.hpp:27
MQTT_NS::control_packet_type
control_packet_type
Definition:
control_packet_type.hpp:18
MQTT_NS::make_fixed_header
constexpr std::uint8_t make_fixed_header(control_packet_type type, std::uint8_t flags)
Definition:
fixed_header.hpp:15
namespace.hpp
Generated by
1.9.1