Gazebo Transport

API Reference

12.2.1
gz/transport/Packet.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 
18 #ifndef GZ_TRANSPORT_PACKET_HH_
19 #define GZ_TRANSPORT_PACKET_HH_
20 
21 #include <cstdint>
22 #include <iostream>
23 #include <string>
24 #include <vector>
25 
26 #include "gz/transport/config.hh"
27 #include "gz/transport/Export.hh"
29 
30 // This whole file is deprecated in version 8 of Gazebo Transport. Please
31 // remove this file in Version 9.
32 
33 namespace gz
34 {
35  namespace transport
36  {
37  // Inline bracket to help doxygen filtering.
38  inline namespace GZ_TRANSPORT_VERSION_NAMESPACE {
39  //
40  // Message types.
41  static const uint8_t Uninitialized = 0;
42  static const uint8_t AdvType = 1;
43  static const uint8_t SubType = 2;
44  static const uint8_t UnadvType = 3;
45  static const uint8_t HeartbeatType = 4;
46  static const uint8_t ByeType = 5;
47  static const uint8_t NewConnection = 6;
48  static const uint8_t EndConnection = 7;
49 
50  // Flag set when a discovery message is relayed.
51  static const uint16_t FlagRelay = 0b000000000000'0001;
52  // Flag set when we want to avoid to relay a discovery message.
53  // This is used to avoid loops.
54  static const uint16_t FlagNoRelay = 0b000000000000'0010;
55 
58  {
59  "UNINITIALIZED", "ADVERTISE", "SUBSCRIBE", "UNADVERTISE", "HEARTBEAT",
60  "BYE", "NEW_CONNECTION", "END_CONNECTION"
61  };
62  }
63  }
64 }
65 
66 #endif