iotdb

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2024 License: MIT Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

query-type Function 状态
low-fuel TrucksWithLowFuel ok
high-load TrucksWithHighLoad 需要和influx一样把一些tags改成field
stationary-trucks StationaryTrucks where条件里不支持别名
long-daily-sessions TrucksWithLongDailySessions where条件里不支持别名
long-driving-sessions TrucksWithLongDrivingSessions where条件里不支持别名
avg-vs-projected-fuel-consumption AvgVsProjectedFuelConsumption 需要和influx一样把一些tags改成field
avg-daily-driving-duration AvgDailyDrivingDuration ok
avg-daily-driving-session AvgDailyDrivingSession 嵌套查询层数太多
avg-load AvgLoad 需要和influx一样把一些tags改成field
daily-activity DailyTruckActivity where条件里不支持别名
breakdown-frequency TruckBreakdownFrequency 嵌套查询层数太多
single-last-loc LastLocByTruck ok
last-loc LastLocPerTruck ok

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseGenerator

type BaseGenerator struct {
}

BaseGenerator contains settings specific for TimescaleDB

func (*BaseGenerator) GenerateEmptyQuery

func (g *BaseGenerator) GenerateEmptyQuery() query.Query

GenerateEmptyQuery returns an empty query.TDengine.

func (*BaseGenerator) NewIoT

func (g *BaseGenerator) NewIoT(start, end time.Time, scale int) (utils.QueryGenerator, error)

NewIoT creates a new iot use case query generator.

type IoT

type IoT struct {
	*iot.Core
	*BaseGenerator
}

IoT produces TDengine-specific queries for all the iot query types.

func NewIoT

func NewIoT(start, end time.Time, scale int, g *BaseGenerator) *IoT

NewIoT makes an IoT object ready to generate Queries.

func (*IoT) AvgDailyDrivingDuration

func (i *IoT) AvgDailyDrivingDuration(qi query.Query)

AvgDailyDrivingDuration finds the average driving duration per driver. ok

func (*IoT) AvgDailyDrivingSession

func (i *IoT) AvgDailyDrivingSession(qi query.Query)

AvgDailyDrivingSession finds the saverage driving session without stopping per driver per day. TODO

func (*IoT) AvgLoad

func (i *IoT) AvgLoad(qi query.Query)

AvgLoad finds the average load per truck model per fleet. TODO: not support current_load/load_capacity

func (*IoT) AvgVsProjectedFuelConsumption

func (i *IoT) AvgVsProjectedFuelConsumption(qi query.Query)

AvgVsProjectedFuelConsumption calculates average and projected fuel consumption per fleet. TODO: not support avg(nominal_fuel_consumption)

func (*IoT) DailyTruckActivity

func (i *IoT) DailyTruckActivity(qi query.Query)

DailyTruckActivity returns the number of hours trucks has been active (not out-of-commission) per day per fleet per model. TODO: not support ms<1

func (*IoT) LastLocByTruck

func (i *IoT) LastLocByTruck(qi query.Query, nTrucks int)

LastLocByTruck finds the truck location for nTrucks. ReWrite

func (*IoT) LastLocPerTruck

func (i *IoT) LastLocPerTruck(qi query.Query)

LastLocPerTruck finds all the truck locations along with truck and driver names. ReWrite

func (*IoT) StationaryTrucks

func (i *IoT) StationaryTrucks(qi query.Query)

StationaryTrucks finds all trucks that have low average velocity in a time window. TODO: not support mean_velocity < 1

func (*IoT) TruckBreakdownFrequency

func (i *IoT) TruckBreakdownFrequency(qi query.Query)

TruckBreakdownFrequency calculates the amount of times a truck model broke down in the last period. TODO

func (*IoT) TrucksWithHighLoad

func (i *IoT) TrucksWithHighLoad(qi query.Query)

TrucksWithHighLoad finds all trucks that have load over 90%. TODO: current_load >= 0.9*load_capacity not support

func (*IoT) TrucksWithLongDailySessions

func (i *IoT) TrucksWithLongDailySessions(qi query.Query)

TrucksWithLongDailySessions finds all trucks that have driven more than 10 hours in the last 24 hours. TODO

func (*IoT) TrucksWithLongDrivingSessions

func (i *IoT) TrucksWithLongDrivingSessions(qi query.Query)

TrucksWithLongDrivingSessions finds all trucks that have not stopped at least 20 mins in the last 4 hours. TODO not support mean_velocity > 1

func (*IoT) TrucksWithLowFuel

func (i *IoT) TrucksWithLowFuel(qi query.Query)

TrucksWithLowFuel finds all trucks with low fuel (less than 10%). ReWrite

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL