5#ifndef ASTARTE_DEVICE_SDK_DEVICE_GRPC_H
6#define ASTARTE_DEVICE_SDK_DEVICE_GRPC_H
26#include "astarte_device_sdk/property.hpp"
93 const std::chrono::system_clock::time_point* timestamp) override;
101 void send_object(std::string_view interface_name, std::string_view path,
103 const std::chrono::system_clock::time_point* timestamp) override;
110 void set_property(std::string_view interface_name, std::string_view path,
117 void unset_property(std::string_view interface_name, std::string_view path) override;
144 auto
get_property(std::string_view interface_name, std::string_view path)
148 struct AstarteDeviceGRPCImpl;
149 std::shared_ptr<AstarteDeviceGRPCImpl> astarte_device_impl_;
Astarte data class, representing the basic Astarte types.
Definition data.hpp:39
Astarte object class, representing the Astarte object datastream data.
Definition object.hpp:22
void disconnect() override
Disconnect from Astarte.
void connect() override
Connect the device to Astarte.
auto operator=(AstarteDeviceGRPC &&other) -> AstarteDeviceGRPC &=delete
Move assignment operator for the Astarte device class.
auto poll_incoming(const std::chrono::milliseconds &timeout) -> std::optional< AstarteMessage > override
Poll incoming messages.
void unset_property(std::string_view interface_name, std::string_view path) override
Unset a device property.
auto operator=(AstarteDeviceGRPC &other) -> AstarteDeviceGRPC &=delete
Copy assignment operator for the Astarte device class.
AstarteDeviceGRPC(AstarteDeviceGRPC &other)=delete
Copy constructor for the Astarte device class.
void remove_interface(const std::string &interface_name) override
Remove an installed interface.
void send_object(std::string_view interface_name, std::string_view path, const AstarteDatastreamObject &object, const std::chrono::system_clock::time_point *timestamp) override
Send object data to Astarte.
auto get_properties(std::string_view interface_name) -> std::list< AstarteStoredProperty >
Get stored properties matching the interface.
auto is_connected() const -> bool override
Check if the device is connected.
void send_individual(std::string_view interface_name, std::string_view path, const AstarteData &data, const std::chrono::system_clock::time_point *timestamp) override
Send individual data to Astarte.
void set_property(std::string_view interface_name, std::string_view path, const AstarteData &data) override
Set a device property.
void add_interface_from_str(std::string_view json) override
Add an interface for the device from a JSON string view.
AstarteDeviceGRPC(const std::string &server_addr, const std::string &node_uuid)
Constructor for the Astarte device class.
~AstarteDeviceGRPC() override
Destructor for the Astarte device class.
auto get_all_properties(const std::optional< AstarteOwnership > &ownership) -> std::list< AstarteStoredProperty >
Get all stored properties matching the input filter.
void add_interface_from_file(const std::filesystem::path &json_file) override
Add an interface for the device from a JSON file.
auto get_property(std::string_view interface_name, std::string_view path) -> AstartePropertyIndividual
Get a single stored property matching the interface name and path.
AstarteDeviceGRPC(AstarteDeviceGRPC &&other)=delete
Move constructor for the Astarte device class.
AstarteDevice(const AstarteDevice &other)=delete
Copy constructor for the Astarte device class.
Astarte message class, represents a full message for/from Astarte.
Definition msg.hpp:25
Representing the Astarte individual datastream data.
Definition property.hpp:20
Representing data for a stored property.
Definition stored_property.hpp:23
Astarte data class and its related methods.
Abstract Astarte device object and its related methods.
Astarte message class and its related methods.
Umbrella namespace for the Astarte device SDK.
Definition data.hpp:22
AstarteOwnership
Possible Astarte ownership.
Definition ownership.hpp:19
Astarte object class and its related methods.
Ownership definitions for communication with Astarte.
Astarte stored property class and its related methods.