Ignition Transport

API Reference

11.0.0
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 IGN_TRANSPORT_PACKET_HH_
19 #define IGN_TRANSPORT_PACKET_HH_
20 
21 #include <cstdint>
22 #include <iostream>
23 #include <string>
24 #include <vector>
25 
26 #include "ignition/transport/config.hh"
27 #include "ignition/transport/Export.hh"
29 
30 // This whole file is deprecated in version 8 of Ignition Transport. Please
31 // remove this file in Version 9.
32 
33 namespace ignition
34 {
35  namespace transport
36  {
37  // Inline bracket to help doxygen filtering.
38  inline namespace IGNITION_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
static const uint16_t FlagRelay
Definition: Packet.hh:51
static const uint8_t NewConnection
Definition: Packet.hh:47
static const uint8_t HeartbeatType
Definition: Packet.hh:45
static const uint8_t SubType
Definition: Packet.hh:43
static const uint8_t ByeType
Definition: Packet.hh:46
static const uint8_t UnadvType
Definition: Packet.hh:44
static const uint8_t EndConnection
Definition: Packet.hh:48
static const uint8_t AdvType
Definition: Packet.hh:42
static const std::vector< std::string > MsgTypesStr
Used for debugging the message type received/send.
Definition: Packet.hh:57
static const uint8_t Uninitialized
Definition: Packet.hh:41
Definition: AdvertiseOptions.hh:28