5#ifndef ASTARTE_DEVICE_SDK_STORED_PROPERTY_H
6#define ASTARTE_DEVICE_SDK_STORED_PROPERTY_H
44 explicit StoredProperty(std::string_view interface_name, std::string_view path,
55 [[nodiscard]] auto
get_path() const -> const std::
string&;
85 std::
string interface_name_;
87 int32_t version_major_;
104 template <
typename ParseContext>
105 constexpr auto parse(ParseContext& ctx)
const {
116 template <
typename FormatContext>
118 return astarte_fmt::format_to(ctx.out(),
119 "Interface: {} v{}, Path: {}, Ownership: {}, Value: {}",
134 out << astarte_fmt::format(
"{}", prop);
Represents a single Astarte data value.
Definition data.hpp:61
Represents a stored property on the device.
Definition stored_property.hpp:33
auto get_value() const -> const Data &
Retrieves the value of the property.
auto get_version_major() const -> int32_t
Retrieves the major version of the interface.
auto get_ownership() const -> const Ownership &
Retrieves the ownership of the interface.
auto get_path() const -> const std::string &
Retrieves the property path.
auto get_interface_name() const -> const std::string &
Retrieves the interface name.
StoredProperty(std::string_view interface_name, std::string_view path, int32_t version_major, Ownership ownership, Data data)
Constructs a new Stored Property instance.
Astarte data class and its related methods.
auto operator<<(std::ostream &out, const astarte::device::Data &data) -> std::ostream &
Stream insertion operator for Data.
Definition data.hpp:243
Umbrella namespace for the Astarte device library.
Definition data.hpp:29
Ownership
Possible Astarte ownership.
Definition ownership.hpp:23
Namespace alias for the formatting library (std or fmt).
Definition formatter.hpp:45
Global namespace for all Astarte related functionality.
Definition data.hpp:29
Ownership definitions for communication with Astarte.