Astarte device API for C++ 0.8.1
Astarte device SDK for C++
Loading...
Searching...
No Matches
stored_property.hpp
Go to the documentation of this file.
1// (C) Copyright 2025, SECO Mind Srl
2//
3// SPDX-License-Identifier: Apache-2.0
4
5#ifndef ASTARTE_DEVICE_SDK_STORED_PROPERTY_H
6#define ASTARTE_DEVICE_SDK_STORED_PROPERTY_H
7
12
13#include <cstdint>
14#include <string>
15#include <string_view>
16
19
20namespace AstarteDeviceSdk {
21
24 public:
33 explicit AstarteStoredProperty(std::string_view interface_name, std::string_view path,
34 int32_t version_major, AstarteOwnership ownership,
35 AstarteData data);
40 [[nodiscard]] auto get_interface_name() const -> const std::string&;
45 [[nodiscard]] auto get_path() const -> const std::string&;
51 [[nodiscard]] auto get_version_major() const -> int32_t;
57 [[nodiscard]] auto get_ownership() const -> const AstarteOwnership&;
62 [[nodiscard]] auto get_value() const -> const AstarteData&;
68 [[nodiscard]] auto operator==(const AstarteStoredProperty& other) const -> bool;
74 [[nodiscard]] auto operator!=(const AstarteStoredProperty& other) const -> bool;
75
76 private:
77 std::string interface_name_;
78 std::string path_;
79 int32_t version_major_;
80 AstarteOwnership ownership_;
81 AstarteData data_;
82};
83
84} // namespace AstarteDeviceSdk
85
86#endif // ASTARTE_DEVICE_SDK_STORED_PROPERTY_H
Astarte data class, representing the basic Astarte types.
Definition data.hpp:40
auto get_ownership() const -> const AstarteOwnership &
Get the ownership contained within the object.
auto get_version_major() const -> int32_t
Get the major version within the object.
AstarteStoredProperty(std::string_view interface_name, std::string_view path, int32_t version_major, AstarteOwnership ownership, AstarteData data)
Constructor for the AstarteStoredProperty class.
auto get_interface_name() const -> const std::string &
Get the interface name contained within the object.
auto get_path() const -> const std::string &
Get the path contained within the object.
auto get_value() const -> const AstarteData &
Get the value contained within the object.
Astarte data class and its related methods.
Umbrella namespace for the Astarte device SDK.
Definition data.hpp:23
AstarteOwnership
Possible Astarte ownership.
Definition ownership.hpp:19
Ownership definitions for communication with Astarte.