DESERT 3.5.1
Loading...
Searching...
No Matches
uwsc-clmsg.h
Go to the documentation of this file.
1//
2// Copyright (c) 2024 Regents of the SIGNET lab, University of Padova.
3// All rights reserved.
4//
5// Redistribution and use in source and binary forms, with or without
6// modification, are permitted provided that the following conditions
7// are met:
8// 1. Redistributions of source code must retain the above copyright
9// notice, this list of conditions and the following disclaimer.
10// 2. Redistributions in binary form must reproduce the above copyright
11// notice, this list of conditions and the following disclaimer in the
12// documentation and/or other materials provided with the distribution.
13// 3. Neither the name of the University of Padova (SIGNET lab) nor the
14// names of its contributors may be used to endorse or promote products
15// derived from this software without specific prior written permission.
16//
17// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
19// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
21// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
24// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
27// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
39#ifndef UWSC_CLMSG_H
40#define UWSC_CLMSG_H
41
42#include <clmessage.h>
43#include <node-core.h>
44
45#define CLMSG_MC2CTR_VERBOSITY 3
46#define CLMSG_CTR2MC_VERBOSITY 3
47#define CLMSG_TRACK2MC_VERBOSITY 3
49extern ClMessage_t CLMSG_MC2CTR_SETPOS;
50extern ClMessage_t CLMSG_MC2CTR_SETSTATUS;
51extern ClMessage_t CLMSG_CTR2MC_GETPOS;
52extern ClMessage_t CLMSG_TRACK2MC_TRACKPOS;
53extern ClMessage_t CLMSG_TRACK2MC_GETSTATUS;
54
55class ClSAP;
56
61class ClMsgCtr2McPosition : public ClMessage
62{
63 public:
64
69 ClMsgCtr2McPosition(int dest_id);
70
74 virtual ~ClMsgCtr2McPosition() = default;
75
81
86 void setRovPosition(Position* position);
87
92 Position* getRovPosition() const;
93
94 private:
95 Position* rov_position;
96};
97
102class ClMsgMc2CtrPosition : public ClMessage
103{
104 public:
105
110 ClMsgMc2CtrPosition(int dest_id);
111
115 virtual ~ClMsgMc2CtrPosition() = default;
116
122
127 void setRovDestination(Position* destination);
128
133 Position* getRovDestination() const;
134
135
136 private:
137 Position* rov_destination;
138};
139
144class ClMsgMc2CtrStatus : public ClMessage
145{
146 public:
147
152 ClMsgMc2CtrStatus(int dest_id);
153
157 virtual ~ClMsgMc2CtrStatus() = default;
158
164
169 void setRovStatus(bool detect);
170
175 bool getRovStatus() const;
176
177
178 private:
180};
181
186class ClMsgTrack2McPosition : public ClMessage
187{
188 public:
189
194 ClMsgTrack2McPosition(int dest_id);
195
199 virtual ~ClMsgTrack2McPosition() = default;
200
206
211 void setTrackPosition(Position* position);
212
217 Position* getTrackPosition() const;
218
219 private:
220 Position* track_position;
221};
222
227class ClMsgTrack2McStatus : public ClMessage
228{
229 public:
230
235 ClMsgTrack2McStatus(int dest_id);
236
240 virtual ~ClMsgTrack2McStatus() = default;
241
247
252 void setMineStatus(bool remove);
253
258 bool getMineStatus() const;
259
260
261 private:
263};
264
265#endif /* UWSC_CLMSG_H */
Class that manages cross layer messages that require the position of the ROV follower.
Definition uwsc-clmsg.h:62
virtual ~ClMsgCtr2McPosition()=default
Destructor of ClMsgCtr2McPosition class.
ClMsgCtr2McPosition * copy()
Creates a copy of the object.
Definition uwsc-clmsg.cc:48
Position * rov_position
Rov follower current position.
Definition uwsc-clmsg.h:95
void setRovPosition(Position *position)
Sets the ROV follower position.
Definition uwsc-clmsg.cc:54
Position * getRovPosition() const
Get the ROV follower current position.
Definition uwsc-clmsg.cc:60
Class that manages cross layer messages that require the new destination of the ROV follower.
Definition uwsc-clmsg.h:103
virtual ~ClMsgMc2CtrPosition()=default
Destructor of ClMsgMc2CtrPosition class.
Position * getRovDestination() const
Get the ROV follower destination.
Definition uwsc-clmsg.cc:86
void setRovDestination(Position *destination)
Sets the ROV follower destination.
Definition uwsc-clmsg.cc:80
Position * rov_destination
Rov follower new destination.
Definition uwsc-clmsg.h:137
ClMsgMc2CtrPosition * copy()
Creates a copy of the object.
Definition uwsc-clmsg.cc:74
Class that manages cross layer messages that require the status of the ROV follower.
Definition uwsc-clmsg.h:145
virtual ~ClMsgMc2CtrStatus()=default
Destructor of ClMsgMc2CtrStatus class.
bool rov_status
Status of the rov follower, true if detected a mine.
Definition uwsc-clmsg.h:179
ClMsgMc2CtrStatus * copy()
Creates a copy of the object.
bool getRovStatus() const
Get the rov follower status.
void setRovStatus(bool detect)
Sets the rov follower status.
Class that manages cross layer messages that require the track position of the ROV follower.
Definition uwsc-clmsg.h:187
Position * track_position
Track position received from UwTracker module.
Definition uwsc-clmsg.h:220
ClMsgTrack2McPosition * copy()
Creates a copy of the object.
virtual ~ClMsgTrack2McPosition()=default
Destructor of ClMsgTrack2McPosition class.
void setTrackPosition(Position *position)
Sets the track position.
Position * getTrackPosition() const
Get the track position.
Class that manages cross layer messages that require the status of a mine tracked from a rov follower...
Definition uwsc-clmsg.h:228
bool getMineStatus() const
Get the current mine status.
virtual ~ClMsgTrack2McStatus()=default
Destructor of ClMsgTrack2McStatus class.
void setMineStatus(bool remove)
Sets the current mine status.
ClMsgTrack2McStatus * copy()
Creates a copy of the object.
bool mine_status
Status of the current mine; true if removed, false otherwise.
Definition uwsc-clmsg.h:262
ClMessage_t CLMSG_MC2CTR_SETPOS
ClMessage_t CLMSG_TRACK2MC_TRACKPOS
ClMessage_t CLMSG_CTR2MC_GETPOS
ClMessage_t CLMSG_TRACK2MC_GETSTATUS
ClMessage_t CLMSG_MC2CTR_SETSTATUS