Goby3 3.3.0
2025.07.10
Loading...
Searching...
No Matches
acomms_constants.h
Go to the documentation of this file.
1// Copyright 2009-2021:
2// GobySoft, LLC (2013-)
3// Massachusetts Institute of Technology (2007-2014)
4// Community contributors (see AUTHORS file)
5// File authors:
6// Toby Schneider <toby@gobysoft.org>
7//
8//
9// This file is part of the Goby Underwater Autonomy Project Libraries
10// ("The Goby Libraries").
11//
12// The Goby Libraries are free software: you can redistribute them and/or modify
13// them under the terms of the GNU Lesser General Public License as published by
14// the Free Software Foundation, either version 2.1 of the License, or
15// (at your option) any later version.
16//
17// The Goby Libraries are distributed in the hope that they will be useful,
18// but WITHOUT ANY WARRANTY; without even the implied warranty of
19// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20// GNU Lesser General Public License for more details.
21//
22// You should have received a copy of the GNU Lesser General Public License
23// along with Goby. If not, see <http://www.gnu.org/licenses/>.
24
25#ifndef GOBY_ACOMMS_ACOMMS_CONSTANTS_H
26#define GOBY_ACOMMS_ACOMMS_CONSTANTS_H
27
28#include <bitset>
29#include <limits>
30#include <string>
31
33namespace goby
34{
36namespace acomms
37{
38constexpr unsigned BITS_IN_BYTE{8};
40constexpr unsigned NIBS_IN_BYTE{2};
41
43constexpr int BROADCAST_ID{0};
44
46constexpr int QUERY_DESTINATION_ID{-1};
47
49constexpr int QUERY_SOURCE_ID{-1};
50
51} // namespace acomms
52} // namespace goby
53#endif
constexpr unsigned NIBS_IN_BYTE
One hex char is a nibble (4 bits), two nibbles per byte.
constexpr int BROADCAST_ID
special modem id for the broadcast destination - no one is assigned this address. Analogous to intern...
constexpr int QUERY_SOURCE_ID
similar to QUERY_DESTINATION_ID but for the source modem id
constexpr int QUERY_DESTINATION_ID
special modem id used internally to goby-acomms for indicating that the MAC layer (amac) is agnostic ...
constexpr unsigned BITS_IN_BYTE
The global namespace for the Goby project.