5#ifndef ASTARTE_DEVICE_SDK_DEVICE_H
6#define ASTARTE_DEVICE_SDK_DEVICE_H
90 virtual
void send_individual(std::string_view interface_name, std::string_view path,
92 const std::chrono::system_clock::time_point* timestamp) = 0;
100 virtual
void send_object(std::string_view interface_name, std::string_view path,
102 const std::chrono::system_clock::time_point* timestamp) = 0;
109 virtual
void set_property(std::string_view interface_name, std::string_view path,
116 virtual
void unset_property(std::string_view interface_name, std::string_view path) = 0;
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
auto operator=(AstarteDevice &&other) -> AstarteDevice &=default
Move assignment operator for the Astarte device class.
AstarteDevice(AstarteDevice &&other)=default
Move constructor for the Astarte device class.
virtual void add_interface_from_file(const std::filesystem::path &json_file)=0
Add an interface for the device from a JSON file.
virtual void set_property(std::string_view interface_name, std::string_view path, const AstarteData &data)=0
Set a device property on Astarte.
virtual void unset_property(std::string_view interface_name, std::string_view path)=0
Unset a device property on Astarte.
virtual void send_individual(std::string_view interface_name, std::string_view path, const AstarteData &data, const std::chrono::system_clock::time_point *timestamp)=0
Send an individual data payload to Astarte.
virtual void connect()=0
Connect the device to Astarte.
virtual void remove_interface(const std::string &interface_name)=0
Remove an installed interface.
virtual void add_interface_from_str(std::string_view json)=0
Add an interface for the device from a JSON string view.
AstarteDevice(const AstarteDevice &other)=delete
Copy constructor for the Astarte device class.
virtual auto poll_incoming(const std::chrono::milliseconds &timeout) -> std::optional< AstarteMessage >=0
Poll for incoming messages from Astarte.
virtual void disconnect()=0
Disconnect the device from Astarte.
virtual void send_object(std::string_view interface_name, std::string_view path, const AstarteDatastreamObject &object, const std::chrono::system_clock::time_point *timestamp)=0
Send an aggregate object data payload to Astarte.
virtual ~AstarteDevice()=default
Virtual destructor.
virtual auto is_connected() const -> bool=0
Check if the device is connected to the Astarte message hub.
auto operator=(const AstarteDevice &other) -> AstarteDevice &=delete
Copy assignment operator for the Astarte device class.
Astarte message class, represents a full message for/from Astarte.
Definition msg.hpp:25
Astarte data class and its related methods.
Astarte message class and its related methods.
Umbrella namespace for the Astarte device SDK.
Definition data.hpp:22
Astarte object class and its related methods.