iot

package
v0.0.0-...-177a272 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ReadingsTableName is the name of the table where all the readings
	// time series data is stored.
	ReadingsTableName = "readings"
	// DiagnosticsTableName is the name of the table where all the diagnostics
	// time series data is stored.
	DiagnosticsTableName = "diagnostics"

	// StationaryDuration is the time duration to evaluate stationary trucks.
	StationaryDuration = 10 * time.Minute
	// LongDrivingSessionDuration is the the time duration which is considered a
	// long driving session without stopping.
	LongDrivingSessionDuration = 4 * time.Hour
	// DailyDrivingDuration is time duration of one day of driving.
	DailyDrivingDuration = 24 * time.Hour

	// LabelLastLoc is the label for the last location query.
	LabelLastLoc = "last-loc"
	// LabelLastLocSingleTruck is the label for the last location query for a single truck.
	LabelLastLocSingleTruck = "single-last-loc"
	// LabelLowFuel is the label for the low fuel query.
	LabelLowFuel = "low-fuel"
	// LabelHighLoad is the label for the high load query.
	LabelHighLoad = "high-load"
	// LabelStationaryTrucks is the label for the stationary trucks query.
	LabelStationaryTrucks = "stationary-trucks"
	// LabelLongDrivingSessions is the label for the long driving sessions query.
	LabelLongDrivingSessions = "long-driving-sessions"
	// LabelLongDailySessions is the label for the long daily sessions query.
	LabelLongDailySessions = "long-daily-sessions"
	// LabelAvgVsProjectedFuelConsumption is the label for the avg vs projected fuel consumption query.
	LabelAvgVsProjectedFuelConsumption = "avg-vs-projected-fuel-consumption"
	// LabelAvgDailyDrivingDuration is the label for the avg daily driving durationquery.
	LabelAvgDailyDrivingDuration = "avg-daily-driving-duration"
	// LabelAvgDailyDrivingSession is the label for the avg daily driving session query.
	LabelAvgDailyDrivingSession = "avg-daily-driving-session"
	// LabelAvgLoad is the label for the avg load query.
	LabelAvgLoad = "avg-load"
	// LabelDailyActivity is the label for the daily activity query.
	LabelDailyActivity = "daily-activity"
	// LabelBreakdownFrequency is the label for the breakdown frequency query.
	LabelBreakdownFrequency = "breakdown-frequency"
)

Variables

This section is empty.

Functions

func NewAvgDailyDrivingDuration

func NewAvgDailyDrivingDuration(core utils.QueryGenerator) utils.QueryFiller

NewAvgDailyDrivingDuration creates a new avg daily driving duration per driver query filler.

func NewAvgDailyDrivingSession

func NewAvgDailyDrivingSession(core utils.QueryGenerator) utils.QueryFiller

NewAvgDailyDrivingSession creates a new avg daily driving session query filler.

func NewAvgLoad

func NewAvgLoad(core utils.QueryGenerator) utils.QueryFiller

NewAvgLoad creates a new avg load query filler.

func NewAvgVsProjectedFuelConsumption

func NewAvgVsProjectedFuelConsumption(core utils.QueryGenerator) utils.QueryFiller

NewAvgVsProjectedFuelConsumption creates a new avg vs projected fuel consumption query filler.

func NewDailyTruckActivity

func NewDailyTruckActivity(core utils.QueryGenerator) utils.QueryFiller

NewDailyTruckActivity creates a new daily truck activity query filler.

func NewLastLocPerTruck

func NewLastLocPerTruck(core utils.QueryGenerator) utils.QueryFiller

NewLastLocPerTruck creates a new last location query filler.

func NewLastLocSingleTruck

func NewLastLocSingleTruck(core utils.QueryGenerator) utils.QueryFiller

NewLastLocSingleTruck creates a new last location query filler.

func NewStationaryTrucks

func NewStationaryTrucks(core utils.QueryGenerator) utils.QueryFiller

NewStationaryTrucks creates a new stationary trucks query filler.

func NewTruckBreakdownFrequency

func NewTruckBreakdownFrequency(core utils.QueryGenerator) utils.QueryFiller

NewTruckBreakdownFrequency creates a new truck breakdown frequency query filler.

func NewTruckWithHighLoad

func NewTruckWithHighLoad(core utils.QueryGenerator) utils.QueryFiller

NewTruckWithHighLoad creates a new trucks with high load query filler.

func NewTruckWithLongDailySession

func NewTruckWithLongDailySession(core utils.QueryGenerator) utils.QueryFiller

NewTruckWithLongDailySession creates a new trucks with longer driving session query filler.

func NewTruckWithLowFuel

func NewTruckWithLowFuel(core utils.QueryGenerator) utils.QueryFiller

NewTruckWithLowFuel creates a new trucks with low fuel query filler.

func NewTrucksWithLongDrivingSession

func NewTrucksWithLongDrivingSession(core utils.QueryGenerator) utils.QueryFiller

NewTrucksWithLongDrivingSession creates a new trucks with longer driving sessions query filler.

Types

type AvgDailyDrivingDuration

type AvgDailyDrivingDuration struct {
	// contains filtered or unexported fields
}

AvgDailyDrivingDuration contains info for filling in avg daily driving duration per driver queries.

func (*AvgDailyDrivingDuration) Fill

Fill fills in the query.Query with query details.

type AvgDailyDrivingDurationFiller

type AvgDailyDrivingDurationFiller interface {
	AvgDailyDrivingDuration(query.Query)
}

AvgDailyDrivingDurationFiller is a type that can fill in an avg daily driving duration per driver query.

type AvgDailyDrivingSession

type AvgDailyDrivingSession struct {
	// contains filtered or unexported fields
}

AvgDailyDrivingSession contains info for filling in avg daily driving session queries.

func (*AvgDailyDrivingSession) Fill

Fill fills in the query.Query with query details.

type AvgDailyDrivingSessionFiller

type AvgDailyDrivingSessionFiller interface {
	AvgDailyDrivingSession(query.Query)
}

AvgDailyDrivingSessionFiller is a type that can fill in an avg daily driving session query.

type AvgLoad

type AvgLoad struct {
	// contains filtered or unexported fields
}

AvgLoad contains info for filling in avg load queries.

func (*AvgLoad) Fill

func (i *AvgLoad) Fill(q query.Query) query.Query

Fill fills in the query.Query with query details.

type AvgLoadFiller

type AvgLoadFiller interface {
	AvgLoad(query.Query)
}

AvgLoadFiller is a type that can fill in an avg load query.

type AvgVsProjectedFuelConsumption

type AvgVsProjectedFuelConsumption struct {
	// contains filtered or unexported fields
}

AvgVsProjectedFuelConsumption contains info for filling in avg vs projected fuel consumption queries.

func (*AvgVsProjectedFuelConsumption) Fill

Fill fills in the query.Query with query details.

type AvgVsProjectedFuelConsumptionFiller

type AvgVsProjectedFuelConsumptionFiller interface {
	AvgVsProjectedFuelConsumption(query.Query)
}

AvgVsProjectedFuelConsumptionFiller is a type that can fill in an avg vs projected fuel consumption query.

type Core

type Core struct {
	*common.Core
}

Core is the common component of all generators for all systems.

func NewCore

func NewCore(start, end time.Time, scale int) (*Core, error)

NewCore returns a new Core for the given time range and cardinality

func (Core) GetRandomFleet

func (c Core) GetRandomFleet() string

GetRandomFleet returns one of the fleet choices by random.

func (*Core) GetRandomTrucks

func (c *Core) GetRandomTrucks(nTrucks int) ([]string, error)

GetRandomTrucks returns a random set of nTrucks from a given Core

type DailyTruckActivity

type DailyTruckActivity struct {
	// contains filtered or unexported fields
}

DailyTruckActivity contains info for filling in daily truck activity queries.

func (*DailyTruckActivity) Fill

Fill fills in the query.Query with query details.

type DailyTruckActivityFiller

type DailyTruckActivityFiller interface {
	DailyTruckActivity(query.Query)
}

DailyTruckActivityFiller is a type that can fill in the daily truck activity query.

type LastLocByTruckFiller

type LastLocByTruckFiller interface {
	LastLocByTruck(query.Query, int)
}

LastLocByTruckFiller is a type that can fill in a last location query for a number of trucks.

type LastLocFiller

type LastLocFiller interface {
	LastLocPerTruck(query.Query)
}

LastLocFiller is a type that can fill in a last location query.

type LastLocPerTruck

type LastLocPerTruck struct {
	// contains filtered or unexported fields
}

LastLocPerTruck contains info for filling in last location queries.

func (*LastLocPerTruck) Fill

func (i *LastLocPerTruck) Fill(q query.Query) query.Query

Fill fills in the query.Query with query details.

type LastLocSingleTruck

type LastLocSingleTruck struct {
	// contains filtered or unexported fields
}

LastLocSingleTruck contains info for filling in last location query for a single truck.

func (*LastLocSingleTruck) Fill

Fill fills in the query.Query with query details.

type StationaryTrucks

type StationaryTrucks struct {
	// contains filtered or unexported fields
}

StationaryTrucks contains info for filling in stationary trucks queries.

func (*StationaryTrucks) Fill

func (i *StationaryTrucks) Fill(q query.Query) query.Query

Fill fills in the query.Query with query details.

type StationaryTrucksFiller

type StationaryTrucksFiller interface {
	StationaryTrucks(query.Query)
}

StationaryTrucksFiller is a type that can fill in the stationary trucks query.

type TruckBreakdownFrequency

type TruckBreakdownFrequency struct {
	// contains filtered or unexported fields
}

TruckBreakdownFrequency contains info for filling in truck breakdown frequency queries.

func (*TruckBreakdownFrequency) Fill

Fill fills in the query.Query with query details.

type TruckBreakdownFrequencyFiller

type TruckBreakdownFrequencyFiller interface {
	TruckBreakdownFrequency(query.Query)
}

TruckBreakdownFrequencyFiller is a type that can fill in the truck breakdown frequency query.

type TruckHighLoadFiller

type TruckHighLoadFiller interface {
	TrucksWithHighLoad(query.Query)
}

TruckHighLoadFiller is a type that can fill in a trucks with high load query.

type TruckLongDailySessionFiller

type TruckLongDailySessionFiller interface {
	TrucksWithLongDailySessions(query.Query)
}

TruckLongDailySessionFiller is a type that can fill in a trucks with longer daily driving sessions query.

type TruckLongDrivingSessionFiller

type TruckLongDrivingSessionFiller interface {
	TrucksWithLongDrivingSessions(query.Query)
}

TruckLongDrivingSessionFiller is a type that can fill in a trucks with longer driving sessions query.

type TruckLowFuelFiller

type TruckLowFuelFiller interface {
	TrucksWithLowFuel(query.Query)
}

TruckLowFuelFiller is a type that can fill in a trucks with low fuel query.

type TrucksWithHighLoad

type TrucksWithHighLoad struct {
	// contains filtered or unexported fields
}

TrucksWithHighLoad contains info for filling in trucks with high load queries.

func (*TrucksWithHighLoad) Fill

Fill fills in the query.Query with query details.

type TrucksWithLongDailySession

type TrucksWithLongDailySession struct {
	// contains filtered or unexported fields
}

TrucksWithLongDailySession contains info for filling in trucks with longer driving session queries.

func (*TrucksWithLongDailySession) Fill

Fill fills in the query.Query with query details.

type TrucksWithLongDrivingSession

type TrucksWithLongDrivingSession struct {
	// contains filtered or unexported fields
}

TrucksWithLongDrivingSession contains info for filling in trucks with longer driving sessions queries.

func (*TrucksWithLongDrivingSession) Fill

Fill fills in the query.Query with query details.

type TrucksWithLowFuel

type TrucksWithLowFuel struct {
	// contains filtered or unexported fields
}

TrucksWithLowFuel contains info for filling in trucks with low fuel queries.

func (*TrucksWithLowFuel) Fill

Fill fills in the query.Query with query details.

Jump to

Keyboard shortcuts

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