Skip to content

IInfluxRepo

Namespace: Database.Repository.InfluxRepo

Interface for the InfluxDB repository.

public interface IInfluxRepo

Methods

GetOutsideWeatherData(DateTime, DateTime, String)

Retrieves outside weather data for a given place and time range.

IAsyncEnumerable<Object[]> GetOutsideWeatherData(DateTime start, DateTime end, string place)

Parameters

start DateTime

The start of the time range.

end DateTime

The end of the time range.

place String

The location for which to retrieve data.

Returns

An async enumerable containing object arrays of temperature values.

GetSensorWeatherData(DateTime, DateTime, String)

Retrieves sensor weather data for a given time range.

IAsyncEnumerable<Object[]> GetSensorWeatherData(DateTime start, DateTime end, string sensor)

Parameters

start DateTime

The start of the time range.

end DateTime

The end of the time range.

sensor String

Sensor name.

Returns

An async enumerable containing object arrays of temperature values.

GetUptime(String)

Retrieves all times the Arduino was available.

IAsyncEnumerable<PointDataValues> GetUptime(string sensor)

Parameters

sensor String

Sensor name

Returns

An async enumerable containing all data points.

WriteOutsideWeatherData(String, String, Double, DateTime, Int32)

Generates a point in the InfluxDB database with the given outside weather data.

Task WriteOutsideWeatherData(string place, string website, double temperature, DateTime timestamp, int postalcode)

Parameters

place String

Name of the city

website String

Name of the API that provided the data

temperature Double

Temperature data

timestamp DateTime

Timestamp

postalcode Int32

Associated postalcode

Returns

A task that represents asynchronous saving of data.

WriteSensorData(Double, String, Int64, Int32)

Generates a point in the InfluxDB database with the given sensor data for the temperature measurement.

Task WriteSensorData(double measurement, string sensor, long timestamp, int sequence)

Parameters

measurement Double

Temperature Value

sensor String

SensorId

timestamp Int64

Unix Timestamp

sequence Int32

Sequence number

Returns

A task that represents asynchronous saving of data.

WriteUptime(String, Int64)

Function saving each timestamp at which the Arduino was available.

Task WriteUptime(string sensor, long timestamp)

Parameters

sensor String

Sensor name

timestamp Int64

Timestamp

Returns

A task that represents asynchronous saving of data.