NETSIM  1.0.1
Hardware-in-the-loopacousticnetworksimulator
groups.h
Go to the documentation of this file.
1 // Copyright 2017-2020:
2 // GobySoft, LLC (2017-)
3 // Massachusetts Institute of Technology (2017-)
4 // File authors:
5 // Toby Schneider <toby@gobysoft.org>
6 // Henrik Schmidt <henrik@mit.edu>
7 //
8 //
9 // This file is part of the NETSIM Libraries.
10 //
11 // The NETSIM Libraries are free software: you can redistribute them and/or modify
12 // them under the terms of the GNU Lesser General Public License as published by
13 // the Free Software Foundation, either version 2.1 of the License, or
14 // (at your option) any later version.
15 //
16 // The NETSIM Libraries are distributed in the hope that they will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU Lesser General Public License for more details.
20 //
21 // You should have received a copy of the GNU Lesser General Public License
22 // along with NETSIM. If not, see <http://www.gnu.org/licenses/>.
23 
24 #ifndef MODEMSIMGROUPS20170815H
25 #define MODEMSIMGROUPS20170815H
26 
27 #include "goby/middleware/group.h"
28 
29 #include "netsim/core/common.h"
30 
31 namespace netsim
32 {
33 namespace groups
34 {
35 // published by netsim_core
36 constexpr goby::middleware::Group impulse_request{"impulse_request"};
37 constexpr goby::middleware::Group buffer_size_change{"buffer_size_change"};
38 constexpr goby::middleware::Group logger_event{"logger_event"};
39 
40 template <int from_index> struct AudioIn
41 {
42  static_assert(from_index < NETSIM_MAX_MODEMS,
43  "Max supported modems is NETSIM_MAX_MODEMS(set in CMake)");
44  constexpr static goby::middleware::Group group{"ain", from_index};
45 };
46 template <int from_index> constexpr goby::middleware::Group AudioIn<from_index>::group;
47 
48 template <int from_index, int to_index> struct AudioOut
49 {
50  static_assert(from_index < NETSIM_MAX_MODEMS && to_index < NETSIM_MAX_MODEMS,
51  "Max supported modems is NETSIM_MAX_MODEMS (set in CMake)");
52  constexpr static goby::middleware::Group group{"aout",
53  from_index* NETSIM_MAX_MODEMS + to_index};
54 };
55 template <int from_index, int to_index>
56 constexpr goby::middleware::Group AudioOut<from_index, to_index>::group;
57 
58 template <int from_index> struct DetectorAudio
59 {
60  static_assert(from_index < NETSIM_MAX_MODEMS,
61  "Max supported modems is NETSIM_MAX_MODEMS(set in CMake)");
62  constexpr static goby::middleware::Group group{"detector_audio_from", from_index};
63 };
64 template <int from_index> constexpr goby::middleware::Group DetectorAudio<from_index>::group;
65 
66 template <int from_index> struct BridgeAudio
67 {
68  static_assert(from_index < NETSIM_MAX_MODEMS,
69  "Max supported modems is NETSIM_MAX_MODEMS(set in CMake)");
70  constexpr static goby::middleware::Group group{"bridge_audio_from", from_index};
71 };
72 template <int from_index> constexpr goby::middleware::Group BridgeAudio<from_index>::group;
73 
74 // published by netsim_postprocess
75 constexpr goby::middleware::Group post_process_event{"post_process_event"};
76 
77 // published by netsim_manager
78 constexpr goby::middleware::Group env_nav_update{"environment_nav_update"};
79 constexpr goby::middleware::Group env_impulse_req{"environment_impulse_request"};
80 constexpr goby::middleware::Group env_bellhop_req{"environment_bellhop_request"};
81 constexpr goby::middleware::Group env_performance_req{"environment_performance_request"};
82 constexpr goby::middleware::Group configuration{"configuration"};
83 constexpr goby::middleware::Group receive_stats{"receive_stats"};
84 
85 constexpr goby::middleware::Group gps_line_out{"gps_line_out"};
86 constexpr goby::middleware::Group gps_line_in{"gps_line_in"};
87 
88 // published by netsim_liaison
89 constexpr goby::middleware::Group config_request{"config_request"};
90 constexpr goby::middleware::Group bellhop_request{"bellhop_request"};
91 
92 // published by netsim_udp
93 constexpr goby::middleware::Group performance_request{"performance_request"};
94 
95 // published by goby_moos_gateway
96 constexpr goby::middleware::Group impulse_response{"impulse_response"};
97 constexpr goby::middleware::Group bellhop_response{"bellhop_response"};
98 constexpr goby::middleware::Group performance_response{"performance_response"};
99 
100 // published by netsim_tool
101 namespace tool
102 {
103 constexpr goby::middleware::Group receive_data{"tool::receive_data"};
104 constexpr goby::middleware::Group ready{"tool::ready"};
105 constexpr goby::middleware::Group transmit{"tool::transmit"};
106 constexpr goby::middleware::Group rx_stats{"tool::rx_stats"};
107 constexpr goby::middleware::Group raw_in{"tool::raw_in"};
108 constexpr goby::middleware::Group raw_out{"tool::raw_out"};
109 
110 } // namespace tool
111 
112 } // namespace groups
113 } // namespace netsim
114 
115 #endif
netsim::groups::env_performance_req
constexpr goby::middleware::Group env_performance_req
Definition: groups.h:81
netsim::groups::tool::ready
constexpr goby::middleware::Group ready
Definition: groups.h:104
netsim::groups::bellhop_request
constexpr goby::middleware::Group bellhop_request
Definition: groups.h:90
netsim::groups::gps_line_in
constexpr goby::middleware::Group gps_line_in
Definition: groups.h:86
netsim::groups::configuration
constexpr goby::middleware::Group configuration
Definition: groups.h:82
netsim::groups::tool::receive_data
constexpr goby::middleware::Group receive_data
Definition: groups.h:103
netsim::groups::DetectorAudio::group
constexpr static goby::middleware::Group group
Definition: groups.h:62
netsim::groups::impulse_request
constexpr goby::middleware::Group impulse_request
Definition: groups.h:36
netsim::groups::performance_request
constexpr goby::middleware::Group performance_request
Definition: groups.h:93
netsim::groups::logger_event
constexpr goby::middleware::Group logger_event
Definition: groups.h:38
netsim::groups::BridgeAudio
Definition: groups.h:66
netsim
Definition: environment.h:30
netsim::groups::DetectorAudio
Definition: groups.h:58
netsim::groups::tool::rx_stats
constexpr goby::middleware::Group rx_stats
Definition: groups.h:106
netsim::groups::buffer_size_change
constexpr goby::middleware::Group buffer_size_change
Definition: groups.h:37
netsim::groups::tool::raw_out
constexpr goby::middleware::Group raw_out
Definition: groups.h:108
netsim::groups::BridgeAudio::group
constexpr static goby::middleware::Group group
Definition: groups.h:70
netsim::groups::tool::transmit
constexpr goby::middleware::Group transmit
Definition: groups.h:105
netsim::groups::AudioIn::group
constexpr static goby::middleware::Group group
Definition: groups.h:44
netsim::groups::config_request
constexpr goby::middleware::Group config_request
Definition: groups.h:89
netsim::groups::env_bellhop_req
constexpr goby::middleware::Group env_bellhop_req
Definition: groups.h:80
netsim::groups::bellhop_response
constexpr goby::middleware::Group bellhop_response
Definition: groups.h:97
netsim::groups::env_nav_update
constexpr goby::middleware::Group env_nav_update
Definition: groups.h:78
netsim::groups::tool::raw_in
constexpr goby::middleware::Group raw_in
Definition: groups.h:107
common.h
netsim::groups::impulse_response
constexpr goby::middleware::Group impulse_response
Definition: groups.h:96
netsim::groups::AudioIn
Definition: groups.h:40
netsim::groups::post_process_event
constexpr goby::middleware::Group post_process_event
Definition: groups.h:75
netsim::groups::AudioOut
Definition: groups.h:48
netsim::groups::AudioOut::group
constexpr static goby::middleware::Group group
Definition: groups.h:52
NETSIM_MAX_MODEMS
#define NETSIM_MAX_MODEMS
Definition: common.h:34
netsim::groups::performance_response
constexpr goby::middleware::Group performance_response
Definition: groups.h:98
netsim::groups::gps_line_out
constexpr goby::middleware::Group gps_line_out
Definition: groups.h:85
netsim::groups::env_impulse_req
constexpr goby::middleware::Group env_impulse_req
Definition: groups.h:79
netsim::groups::receive_stats
constexpr goby::middleware::Group receive_stats
Definition: groups.h:83