async_mqtt 4.1.0
Loading...
Searching...
No Matches
packet_id_type.hpp
1// Copyright Takatoshi Kondo 2022
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(ASYNC_MQTT_PACKET_PACKET_ID_TYPE_HPP)
8#define ASYNC_MQTT_PACKET_PACKET_ID_TYPE_HPP
9
10#include <cstdint>
11#include <cstddef>
12
13namespace async_mqtt {
14
15template <std::size_t Bytes>
16struct packet_id_type;
17
18template <>
19struct packet_id_type<2> {
20 using type = std::uint16_t;
21};
22template <>
23struct packet_id_type<4> {
24 using type = std::uint32_t;
25};
26
27} // namespace async_mqtt
28
29#endif // ASYNC_MQTT_PACKET_PACKET_ID_TYPE_HPP