44 [[nodiscard]]
static std::string
type() {
return "NodeData"; }
48 [[nodiscard]]
static std::vector<std::string>
parentTypes() {
return {}; }
63 [[nodiscard]]
const std::vector<std::string>&
events()
const {
return _events; }
71 [[nodiscard]]
virtual std::optional<double>
getValueAt(
size_t )
const {
return std::nullopt; }
83 [[nodiscard]]
virtual std::optional<double>
getDynamicDataAt(
const std::string& )
const {
return std::nullopt; }
86 [[nodiscard]]
virtual std::vector<std::pair<std::string, double>>
getDynamicData()
const {
return {}; }
The class is responsible for all time-related tasks.
The class is responsible for all time-related tasks.
Definition InsTime.hpp:667
Parent class for all data transmitted over Flow pins.
Definition NodeData.hpp:27
virtual std::vector< std::string > dynamicDataDescriptors() const
Returns a vector of data descriptors for the dynamic data.
Definition NodeData.hpp:79
virtual ~NodeData()=default
Destructor.
NodeData & operator=(NodeData &&)=default
Move assignment operator.
NodeData()=default
Default constructor.
NodeData(NodeData &&)=default
Move constructor.
virtual std::vector< std::pair< std::string, double > > getDynamicData() const
Returns a vector of data descriptors and values for the dynamic data.
Definition NodeData.hpp:86
void addEvent(const std::string &text)
Adds the event to the list.
Definition NodeData.hpp:67
static std::vector< std::string > GetStaticDataDescriptors()
Returns a vector of data descriptors.
Definition NodeData.hpp:51
std::vector< std::string > _events
List of events.
Definition NodeData.hpp:93
NodeData & operator=(const NodeData &)=default
Copy assignment operator.
static std::string type()
Returns the type of the data class.
Definition NodeData.hpp:44
static std::vector< std::string > parentTypes()
Returns the parent types of the data class.
Definition NodeData.hpp:48
virtual std::optional< double > getValueAt(size_t) const
Get the value at the index.
Definition NodeData.hpp:71
double getValueAtOrNaN(size_t idx) const
Get the value at the index or NaN if not in the observation.
Definition NodeData.hpp:76
const std::vector< std::string > & events() const
Returns a vector of string events associated with this data.
Definition NodeData.hpp:63
static constexpr size_t GetStaticDescriptorCount()
Get the amount of descriptors.
Definition NodeData.hpp:54
virtual std::vector< std::string > staticDataDescriptors() const
Returns a vector of data descriptors.
Definition NodeData.hpp:57
InsTime insTime
Time at which the message was received.
Definition NodeData.hpp:89
virtual std::optional< double > getDynamicDataAt(const std::string &) const
Get the value for the descriptor.
Definition NodeData.hpp:83
virtual size_t staticDescriptorCount() const
Get the amount of descriptors.
Definition NodeData.hpp:60
NodeData(const NodeData &)=default
Copy constructor.