AstraLog-HPC
Loading...
Searching...
No Matches
Types.hpp File Reference

Definition of the data structures and utility functions used across the Engine folder. More...

#include <optional>
#include <variant>
#include <string>
#include <vector>
#include <simdjson.h>
#include <RulesFactory/Strategy.hpp>
Include dependency graph for Types.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  DataPoint
 DataPoint contains the information of a single data point, which is a line of the input file. More...
 
struct  IntermediateResult
 Intermediate result for each timestamp: alarms + map of rule outcomes. More...
 

Typedefs

using Batch = std::vector< DataPoint >
 Batch groups all the data points for a single timestamp.
 

Functions

std::optional< DataPoint > parseStringToDataPoint (const std::string &line, simdjson::dom::parser &parser)
 Parses a line of the input file into a DataPoint structure.
 

Detailed Description

Definition of the data structures and utility functions used across the Engine folder.

Typedef Documentation

◆ Batch

using Batch = std::vector<DataPoint>

Batch groups all the data points for a single timestamp.

Function Documentation

◆ parseStringToDataPoint()

std::optional< DataPoint > parseStringToDataPoint ( const std::string &  line,
simdjson::dom::parser &  parser 
)

Parses a line of the input file into a DataPoint structure.

Parameters
lineThe line to parse, in JSON format "timestamp,sensor_id,value,priority".
parserThe simdjson parser to use for parsing the value.
Returns
A DataPoint structure containing the parsed information.
Here is the caller graph for this function: