|
| template<typename T> |
| | Message (std::string_view interface, std::string_view path, T data) |
| | Constructor for the Message class.
|
| |
| auto | get_interface () const -> const std::string & |
| | Gets the interface of the message.
|
| |
| auto | get_path () const -> const std::string & |
| | Gets the path of the message.
|
| |
| auto | is_datastream () const -> bool |
| | Checks if this message contains a datastream.
|
| |
| auto | is_individual () const -> bool |
| | Checks if this message contains individual data.
|
| |
| template<typename T> |
| auto | into () const -> const T & |
| | Get the content of the message.
|
| |
| template<typename T> |
| auto | try_into () const -> std::optional< T > |
| | Return the content of the message if it's of the correct type.
|
| |
| auto | get_raw_data () const -> const std::variant< DatastreamIndividual, DatastreamObject, PropertyIndividual > & |
| | Returns the raw data contained in this class instance.
|
| |
| auto | operator== (const Message &other) const -> bool |
| | Overloader for the comparison operator ==.
|
| |
| auto | operator!= (const Message &other) const -> bool |
| | Overloader for the comparison operator !=.
|
| |
Astarte message class, represents a full message for/from Astarte.
The Message class acts as a unified container for data received from Astarte (via polling). It can hold individual datastreams, aggregated objects, or individual properties.