SOLA
Loading...
Searching...
No Matches
amr_properties.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_CPPS_AMR_AMR_PROPERTIES_H_
18#define DAISI_CPPS_AMR_AMR_PROPERTIES_H_
19
20#include <set>
21#include <string>
22
23#include "cpps/amr/model/amr_static_ability.h"
24#include "cpps/amr/physical/functionality.h"
25#include "solanet/serializer/serialize.h"
26
27namespace daisi::cpps {
29public:
30 AmrProperties() = default;
31
32 AmrProperties(std::string manufacturer, std::string model_name, uint32_t model_number,
33 std::string device_type, std::string friendly_name,
34 std::set<FunctionalityType> functionalities = {})
35 : device_type_(std::move(device_type)),
36 friendly_name_(std::move(friendly_name)),
37 functionalities_(std::move(functionalities)),
38 manufacturer_(std::move(manufacturer)),
39 model_name_(std::move(model_name)),
40 model_number_(model_number) {}
41
42 explicit AmrProperties(std::string friendly_name) : friendly_name_(std::move(friendly_name)) {}
43
44 std::string getManufacturer() const { return manufacturer_; }
45 std::string getModelName() const { return model_name_; }
46 uint32_t getModelNumber() const { return model_number_; }
47 std::string getDeviceType() const { return device_type_; }
48 std::string getFriendlyName() const { return friendly_name_; }
49 std::set<FunctionalityType> getFunctionalities() const { return functionalities_; }
50
51 SERIALIZE(device_type_, friendly_name_, functionalities_, manufacturer_, model_name_,
52 model_number_);
53
54private:
55 std::string device_type_ = "none";
56 std::string friendly_name_ = "none";
57 std::set<FunctionalityType> functionalities_ = {
58 FunctionalityType::kLoad, FunctionalityType::kMoveTo, FunctionalityType::kUnload,
59 FunctionalityType::kNavigate};
60 std::string manufacturer_ = "none";
61 std::string model_name_ = "none";
62 uint32_t model_number_ = 0;
63};
64} // namespace daisi::cpps
65#endif
Definition amr_properties.h:28