SOLA
Loading...
Searching...
No Matches
handover_message.h
1// Copyright 2023 The SOLA authors
2//
3// This file is part of DAISI.
4//
5// DAISI is free software: you can redistribute it and/or modify it under the terms of the GNU
6// General Public License as published by the Free Software Foundation; version 2.
7//
8// DAISI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
9// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
10// Public License for more details.
11//
12// You should have received a copy of the GNU General Public License along with DAISI. If not, see
13// <https://www.gnu.org/licenses/>.
14//
15// SPDX-License-Identifier: GPL-2.0-only
16
17#ifndef DAISI_PATH_PLANNING_MESSAGE_HANDOVER_MESSAGE_H_
18#define DAISI_PATH_PLANNING_MESSAGE_HANDOVER_MESSAGE_H_
19
20#include <utility>
21
22#include "drive_message.h"
23#include "solanet/serializer/serialize.h"
24
25namespace daisi::path_planning::message {
26
30public:
31 HandoverMessage() = default;
32
33 HandoverMessage(const DriveMessage &drive, uint32_t next_station, std::string next_station_ip)
34 : drive_(drive), next_station_(next_station), next_station_ip_(std::move(next_station_ip)){};
35
36 [[nodiscard]] uint32_t getNextStation() const { return next_station_; }
37 [[nodiscard]] std::string getNextStationIP() const { return next_station_ip_; }
38 [[nodiscard]] DriveMessage getDriveMessage() const { return drive_; }
39
40 SERIALIZE(drive_, next_station_, next_station_ip_);
41
42private:
43 DriveMessage drive_;
44 uint32_t next_station_ = 0;
45 std::string next_station_ip_;
46};
47
48} // namespace daisi::path_planning::message
49
50#endif // DAISI_PATH_PLANNING_MESSAGE_HANDOVER_MESSAGE_H_
Message that is send from PickupStation to logical AGV with drive instructions.
Definition drive_message.h:30
Definition handover_message.h:29