fastiot_core_services.dash.model package

Submodules

fastiot_core_services.dash.model.historic_sensor module

pydantic model fastiot_core_services.dash.model.historic_sensor.ThingSeries[source]

This class is used to store a list of Things with the same machine and name

field dt_start: Optional[datetime] = None
field dt_end: Optional[datetime] = None
field thing_list: List[Thing] = []
__init__(**kwargs)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

remove_until(timestamp)[source]

Removes all data until timestamp. It is guaranteed that if this operation finishes successfully, the values starting from 2nd until the end of the time series will be greater then timestamp. If the time series includes timestamp when the function is called, it still will after it finishes.

The dt_start attribute will be adjusted accordingly. No timestamps of values will be changed.

Parameters:

timestamp (datetime) – Timestamp used for removal.

remove_from(timestamp)[source]
class fastiot_core_services.dash.model.historic_sensor.HistoricSensor(name, machine, customer, service)[source]
__init__(name, machine, customer, service)[source]
static to_df(historic_sensor_list)[source]

fastiot_core_services.dash.model.live_sensor module

class fastiot_core_services.dash.model.live_sensor.LiveSensor(name, machine, customer, module)[source]
__init__(name, machine, customer, module)[source]
clean_until(current_time, max_delta)[source]