| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
VendorId_t.hpp
1// Copyright 2020 Proyectos y Sistemas de Mantenimiento SL (eProsima).
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
18
19#ifndef FASTDDS_RTPS_COMMON__VENDORID_T_HPP
20#define FASTDDS_RTPS_COMMON__VENDORID_T_HPP
21
22#include <array>
23#include <cstdint>
24#include <iomanip>
25#include <iostream>
26
27 namespace eprosima {
28 namespace fastdds {
29 namespace rtps {
30
32 using VendorId_t = std::array<uint8_t, 2>;
33
34 const VendorId_t c_VendorId_Unknown = {0x00, 0x00};
35 const VendorId_t c_VendorId_eProsima = {0x01, 0x0F};
36 const VendorId_t c_VendorId_rti_connext = {0x01, 0x01};
37 const VendorId_t c_VendorId_opendds = {0x01, 0x03};
38
39} // namespace rtps
40} // namespace fastdds
41} // namespace eprosima
42
49 inline std::ostream& operator <<(
50 std::ostream& output,
51 eprosima::fastdds::rtps::VendorId_t vendor_id)
52{
53 output << "0x" << std::hex << std::setfill('0') << std::setw(2) << static_cast<int>(vendor_id[0]) << " 0x" <<
54 std::hex << std::setfill('0') << std::setw(2) << static_cast<int>(vendor_id[1]);
55 return output;
56}
57
58#endif // FASTDDS_RTPS_COMMON__VENDORID_T_HPP
eprosima::fastdds::rtps
Contains the RTPS protocol implementation.
eprosima::fastdds::rtps::c_VendorId_opendds
const VendorId_t c_VendorId_opendds
Definition VendorId_t.hpp:37
eprosima::fastdds::rtps::c_VendorId_Unknown
const VendorId_t c_VendorId_Unknown
Definition VendorId_t.hpp:34
eprosima::fastdds::rtps::c_VendorId_rti_connext
const VendorId_t c_VendorId_rti_connext
Definition VendorId_t.hpp:36
eprosima::fastdds::rtps::VendorId_t
std::array< uint8_t, 2 > VendorId_t
Structure VendorId_t, specifying the vendor Id of the implementation.
Definition VendorId_t.hpp:32
eprosima::fastdds::rtps::c_VendorId_eProsima
const VendorId_t c_VendorId_eProsima
Definition VendorId_t.hpp:35
eprosima::fastdds
eprosima
eProsima namespace.