From 9e527ce20737a4d948186408af205f235f9d6899 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Thu, 26 Jun 2025 15:48:12 -0400 Subject: [PATCH 01/36] Xmen first class --- internal/graph/arguments.go | 62 +- internal/graph/generated.go | 2484 ++++++++++++++++++--- internal/graph/model/models_gen.go | 7 + internal/graph/model/signalArgs.go | 16 +- internal/graph/model/signalSetter.tmpl | 16 - internal/graph/model/signalSetter_gen.go | 161 -- internal/graph/model/signal_aggs.go | 15 +- internal/graph/model/tmp.go | 12 + internal/graph/resolver.go | 20 +- internal/graph/signals_gen.resolvers.go | 369 +-- internal/graph/signals_gen.resolvers.tmpl | 6 +- internal/repositories/repositories.go | 5 +- internal/service/ch/ch.go | 2 +- internal/service/ch/queries.go | 52 +- schema/base.graphqls | 10 + schema/signals.tmpl | 3 +- schema/signals_gen.graphqls | 210 +- 17 files changed, 2623 insertions(+), 827 deletions(-) create mode 100644 internal/graph/model/tmp.go diff --git a/internal/graph/arguments.go b/internal/graph/arguments.go index ef856b18..84586973 100644 --- a/internal/graph/arguments.go +++ b/internal/graph/arguments.go @@ -25,12 +25,16 @@ func aggregationArgsFromContext(ctx context.Context, tokenID int, interval strin FromTS: from, ToTS: to, Interval: intervalInt, - FloatArgs: map[model.FloatSignalArgs]struct{}{}, - StringArgs: map[model.StringSignalArgs]struct{}{}, + FloatArgs: make(map[string]model.FloatSignalArgs), + StringArgs: make(map[string]model.StringSignalArgs), } fields := graphql.CollectFieldsCtx(ctx, nil) parentCtx := graphql.GetFieldContext(ctx) + + floatIndex := 0 + stringIndex := 0 + for _, field := range fields { if !isSignal(field) || !hasAggregations(field) { continue @@ -40,44 +44,36 @@ func aggregationArgsFromContext(ctx context.Context, tokenID int, interval strin return nil, fmt.Errorf("failed to get child field: %w", err) } - // check for approximate location fields and force pull the latitude and longitude - if field.Name == model.ApproximateLatField || field.Name == model.ApproximateLongField { - if err := addSignalAggregation(&aggArgs, child, vss.FieldCurrentLocationLatitude); err != nil { - return nil, err + agg := child.Args["agg"] + alias := child.Field.Alias + switch typedAgg := agg.(type) { + case model.FloatAggregation: + handle := fmt.Sprintf("float%d", floatIndex) + filter := child.Args["filter"].(*model.SignalFloatFilter) + aggArgs.FloatArgs[child.Field.Alias] = model.FloatSignalArgs{ + Name: child.Field.Name, + Agg: typedAgg, + Filter: filter, + QueryHandle: handle, } - if err := addSignalAggregation(&aggArgs, child, vss.FieldCurrentLocationLongitude); err != nil { - return nil, err + aggArgs.AliasToHandle[alias] = handle + floatIndex++ + case model.StringAggregation: + handle := fmt.Sprintf("string%d", floatIndex) + aggArgs.StringArgs[child.Field.Alias] = model.StringSignalArgs{ + Name: child.Field.Name, + Agg: typedAgg, + QueryHandle: handle, } - continue - } - - if err := addSignalAggregation(&aggArgs, child, child.Field.Name); err != nil { - return nil, err + aggArgs.AliasToHandle[alias] = handle + stringIndex++ + default: + return nil, fmt.Errorf("unknown aggregation type: %T", agg) } } return &aggArgs, nil } -// addSignalAggregation gets the aggregation arguments from the child field and adds them to the aggregated signal arguments as eiter a float or string aggregation. -func addSignalAggregation(aggArgs *model.AggregatedSignalArgs, child *graphql.FieldContext, name string) error { - agg := child.Args["agg"] - switch typedAgg := agg.(type) { - case model.FloatAggregation: - aggArgs.FloatArgs[model.FloatSignalArgs{ - Name: name, - Agg: typedAgg, - }] = struct{}{} - case model.StringAggregation: - aggArgs.StringArgs[model.StringSignalArgs{ - Name: name, - Agg: typedAgg, - }] = struct{}{} - default: - return fmt.Errorf("unknown aggregation type: %T", agg) - } - return nil -} - // latestArgsFromContext creates a latest signals arguments from the context and the provided arguments. func latestArgsFromContext(ctx context.Context, tokenID int, filter *model.SignalFilter) (*model.LatestSignalsArgs, error) { fields := graphql.CollectFieldsCtx(ctx, nil) diff --git a/internal/graph/generated.go b/internal/graph/generated.go index d03bf994..9bffd23d 100644 --- a/internal/graph/generated.go +++ b/internal/graph/generated.go @@ -89,84 +89,84 @@ type ComplexityRoot struct { } SignalAggregations struct { - AngularVelocityYaw func(childComplexity int, agg model.FloatAggregation) int - CabinDoorRow1DriverSideIsOpen func(childComplexity int, agg model.FloatAggregation) int - CabinDoorRow1DriverSideWindowIsOpen func(childComplexity int, agg model.FloatAggregation) int - CabinDoorRow1PassengerSideIsOpen func(childComplexity int, agg model.FloatAggregation) int - CabinDoorRow1PassengerSideWindowIsOpen func(childComplexity int, agg model.FloatAggregation) int - CabinDoorRow2DriverSideIsOpen func(childComplexity int, agg model.FloatAggregation) int - CabinDoorRow2DriverSideWindowIsOpen func(childComplexity int, agg model.FloatAggregation) int - CabinDoorRow2PassengerSideIsOpen func(childComplexity int, agg model.FloatAggregation) int - CabinDoorRow2PassengerSideWindowIsOpen func(childComplexity int, agg model.FloatAggregation) int - ChassisAxleRow1WheelLeftSpeed func(childComplexity int, agg model.FloatAggregation) int - ChassisAxleRow1WheelLeftTirePressure func(childComplexity int, agg model.FloatAggregation) int - ChassisAxleRow1WheelRightSpeed func(childComplexity int, agg model.FloatAggregation) int - ChassisAxleRow1WheelRightTirePressure func(childComplexity int, agg model.FloatAggregation) int - ChassisAxleRow2WheelLeftTirePressure func(childComplexity int, agg model.FloatAggregation) int - ChassisAxleRow2WheelRightTirePressure func(childComplexity int, agg model.FloatAggregation) int - CurrentLocationAltitude func(childComplexity int, agg model.FloatAggregation) int + AngularVelocityYaw func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + CabinDoorRow1DriverSideIsOpen func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + CabinDoorRow1DriverSideWindowIsOpen func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + CabinDoorRow1PassengerSideIsOpen func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + CabinDoorRow1PassengerSideWindowIsOpen func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + CabinDoorRow2DriverSideIsOpen func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + CabinDoorRow2DriverSideWindowIsOpen func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + CabinDoorRow2PassengerSideIsOpen func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + CabinDoorRow2PassengerSideWindowIsOpen func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + ChassisAxleRow1WheelLeftSpeed func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + ChassisAxleRow1WheelLeftTirePressure func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + ChassisAxleRow1WheelRightSpeed func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + ChassisAxleRow1WheelRightTirePressure func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + ChassisAxleRow2WheelLeftTirePressure func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + ChassisAxleRow2WheelRightTirePressure func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + CurrentLocationAltitude func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int CurrentLocationApproximateLatitude func(childComplexity int, agg model.FloatAggregation) int CurrentLocationApproximateLongitude func(childComplexity int, agg model.FloatAggregation) int - CurrentLocationHeading func(childComplexity int, agg model.FloatAggregation) int - CurrentLocationIsRedacted func(childComplexity int, agg model.FloatAggregation) int - CurrentLocationLatitude func(childComplexity int, agg model.FloatAggregation) int - CurrentLocationLongitude func(childComplexity int, agg model.FloatAggregation) int - DimoAftermarketHdop func(childComplexity int, agg model.FloatAggregation) int - DimoAftermarketNsat func(childComplexity int, agg model.FloatAggregation) int + CurrentLocationHeading func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + CurrentLocationIsRedacted func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + CurrentLocationLatitude func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + CurrentLocationLongitude func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + DimoAftermarketHdop func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + DimoAftermarketNsat func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int DimoAftermarketSsid func(childComplexity int, agg model.StringAggregation) int DimoAftermarketWPAState func(childComplexity int, agg model.StringAggregation) int - ExteriorAirTemperature func(childComplexity int, agg model.FloatAggregation) int - IsIgnitionOn func(childComplexity int, agg model.FloatAggregation) int - LowVoltageBatteryCurrentVoltage func(childComplexity int, agg model.FloatAggregation) int - ObdBarometricPressure func(childComplexity int, agg model.FloatAggregation) int - ObdCommandedEgr func(childComplexity int, agg model.FloatAggregation) int - ObdCommandedEvap func(childComplexity int, agg model.FloatAggregation) int + ExteriorAirTemperature func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + IsIgnitionOn func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + LowVoltageBatteryCurrentVoltage func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + ObdBarometricPressure func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + ObdCommandedEgr func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + ObdCommandedEvap func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int ObdDTCList func(childComplexity int, agg model.StringAggregation) int - ObdDistanceSinceDTCClear func(childComplexity int, agg model.FloatAggregation) int - ObdDistanceWithMil func(childComplexity int, agg model.FloatAggregation) int - ObdEngineLoad func(childComplexity int, agg model.FloatAggregation) int - ObdFuelPressure func(childComplexity int, agg model.FloatAggregation) int - ObdIntakeTemp func(childComplexity int, agg model.FloatAggregation) int - ObdLongTermFuelTrim1 func(childComplexity int, agg model.FloatAggregation) int - ObdMap func(childComplexity int, agg model.FloatAggregation) int - ObdO2WRSensor1Voltage func(childComplexity int, agg model.FloatAggregation) int - ObdO2WRSensor2Voltage func(childComplexity int, agg model.FloatAggregation) int - ObdRunTime func(childComplexity int, agg model.FloatAggregation) int - ObdShortTermFuelTrim1 func(childComplexity int, agg model.FloatAggregation) int - ObdWarmupsSinceDTCClear func(childComplexity int, agg model.FloatAggregation) int - PowertrainCombustionEngineDieselExhaustFluidCapacity func(childComplexity int, agg model.FloatAggregation) int - PowertrainCombustionEngineDieselExhaustFluidLevel func(childComplexity int, agg model.FloatAggregation) int - PowertrainCombustionEngineEct func(childComplexity int, agg model.FloatAggregation) int + ObdDistanceSinceDTCClear func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + ObdDistanceWithMil func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + ObdEngineLoad func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + ObdFuelPressure func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + ObdIntakeTemp func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + ObdLongTermFuelTrim1 func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + ObdMap func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + ObdO2WRSensor1Voltage func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + ObdO2WRSensor2Voltage func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + ObdRunTime func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + ObdShortTermFuelTrim1 func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + ObdWarmupsSinceDTCClear func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + PowertrainCombustionEngineDieselExhaustFluidCapacity func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + PowertrainCombustionEngineDieselExhaustFluidLevel func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + PowertrainCombustionEngineEct func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int PowertrainCombustionEngineEngineOilLevel func(childComplexity int, agg model.StringAggregation) int - PowertrainCombustionEngineEngineOilRelativeLevel func(childComplexity int, agg model.FloatAggregation) int - PowertrainCombustionEngineEop func(childComplexity int, agg model.FloatAggregation) int - PowertrainCombustionEngineEot func(childComplexity int, agg model.FloatAggregation) int - PowertrainCombustionEngineMaf func(childComplexity int, agg model.FloatAggregation) int - PowertrainCombustionEngineSpeed func(childComplexity int, agg model.FloatAggregation) int - PowertrainCombustionEngineTorque func(childComplexity int, agg model.FloatAggregation) int - PowertrainCombustionEngineTps func(childComplexity int, agg model.FloatAggregation) int - PowertrainFuelSystemAbsoluteLevel func(childComplexity int, agg model.FloatAggregation) int - PowertrainFuelSystemRelativeLevel func(childComplexity int, agg model.FloatAggregation) int + PowertrainCombustionEngineEngineOilRelativeLevel func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + PowertrainCombustionEngineEop func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + PowertrainCombustionEngineEot func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + PowertrainCombustionEngineMaf func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + PowertrainCombustionEngineSpeed func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + PowertrainCombustionEngineTorque func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + PowertrainCombustionEngineTps func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + PowertrainFuelSystemAbsoluteLevel func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + PowertrainFuelSystemRelativeLevel func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int PowertrainFuelSystemSupportedFuelTypes func(childComplexity int, agg model.StringAggregation) int - PowertrainRange func(childComplexity int, agg model.FloatAggregation) int - PowertrainTractionBatteryChargingAddedEnergy func(childComplexity int, agg model.FloatAggregation) int - PowertrainTractionBatteryChargingChargeCurrentAc func(childComplexity int, agg model.FloatAggregation) int - PowertrainTractionBatteryChargingChargeLimit func(childComplexity int, agg model.FloatAggregation) int - PowertrainTractionBatteryChargingChargeVoltageUnknownType func(childComplexity int, agg model.FloatAggregation) int - PowertrainTractionBatteryChargingIsCharging func(childComplexity int, agg model.FloatAggregation) int - PowertrainTractionBatteryCurrentPower func(childComplexity int, agg model.FloatAggregation) int - PowertrainTractionBatteryCurrentVoltage func(childComplexity int, agg model.FloatAggregation) int - PowertrainTractionBatteryGrossCapacity func(childComplexity int, agg model.FloatAggregation) int - PowertrainTractionBatteryRange func(childComplexity int, agg model.FloatAggregation) int - PowertrainTractionBatteryStateOfChargeCurrent func(childComplexity int, agg model.FloatAggregation) int - PowertrainTractionBatteryStateOfChargeCurrentEnergy func(childComplexity int, agg model.FloatAggregation) int - PowertrainTractionBatteryTemperatureAverage func(childComplexity int, agg model.FloatAggregation) int - PowertrainTransmissionCurrentGear func(childComplexity int, agg model.FloatAggregation) int - PowertrainTransmissionTemperature func(childComplexity int, agg model.FloatAggregation) int - PowertrainTransmissionTravelledDistance func(childComplexity int, agg model.FloatAggregation) int + PowertrainRange func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + PowertrainTractionBatteryChargingAddedEnergy func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + PowertrainTractionBatteryChargingChargeCurrentAc func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + PowertrainTractionBatteryChargingChargeLimit func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + PowertrainTractionBatteryChargingChargeVoltageUnknownType func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + PowertrainTractionBatteryChargingIsCharging func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + PowertrainTractionBatteryCurrentPower func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + PowertrainTractionBatteryCurrentVoltage func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + PowertrainTractionBatteryGrossCapacity func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + PowertrainTractionBatteryRange func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + PowertrainTractionBatteryStateOfChargeCurrent func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + PowertrainTractionBatteryStateOfChargeCurrentEnergy func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + PowertrainTractionBatteryTemperatureAverage func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + PowertrainTransmissionCurrentGear func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + PowertrainTransmissionTemperature func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + PowertrainTransmissionTravelledDistance func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int PowertrainType func(childComplexity int, agg model.StringAggregation) int - ServiceDistanceToService func(childComplexity int, agg model.FloatAggregation) int - Speed func(childComplexity int, agg model.FloatAggregation) int + ServiceDistanceToService func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + Speed func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int Timestamp func(childComplexity int) int } @@ -287,82 +287,82 @@ type QueryResolver interface { type SignalAggregationsResolver interface { CurrentLocationApproximateLatitude(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) CurrentLocationApproximateLongitude(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - AngularVelocityYaw(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - CabinDoorRow1DriverSideIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - CabinDoorRow1DriverSideWindowIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - CabinDoorRow1PassengerSideIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - CabinDoorRow1PassengerSideWindowIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - CabinDoorRow2DriverSideIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - CabinDoorRow2DriverSideWindowIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - CabinDoorRow2PassengerSideIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - CabinDoorRow2PassengerSideWindowIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - ChassisAxleRow1WheelLeftSpeed(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - ChassisAxleRow1WheelLeftTirePressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - ChassisAxleRow1WheelRightSpeed(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - ChassisAxleRow1WheelRightTirePressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - ChassisAxleRow2WheelLeftTirePressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - ChassisAxleRow2WheelRightTirePressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - CurrentLocationAltitude(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - CurrentLocationHeading(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - CurrentLocationIsRedacted(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - CurrentLocationLatitude(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - CurrentLocationLongitude(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - DimoAftermarketHdop(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - DimoAftermarketNsat(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) + AngularVelocityYaw(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + CabinDoorRow1DriverSideIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + CabinDoorRow1DriverSideWindowIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + CabinDoorRow1PassengerSideIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + CabinDoorRow1PassengerSideWindowIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + CabinDoorRow2DriverSideIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + CabinDoorRow2DriverSideWindowIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + CabinDoorRow2PassengerSideIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + CabinDoorRow2PassengerSideWindowIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + ChassisAxleRow1WheelLeftSpeed(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + ChassisAxleRow1WheelLeftTirePressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + ChassisAxleRow1WheelRightSpeed(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + ChassisAxleRow1WheelRightTirePressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + ChassisAxleRow2WheelLeftTirePressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + ChassisAxleRow2WheelRightTirePressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + CurrentLocationAltitude(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + CurrentLocationHeading(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + CurrentLocationIsRedacted(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + CurrentLocationLatitude(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + CurrentLocationLongitude(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + DimoAftermarketHdop(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + DimoAftermarketNsat(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) DimoAftermarketSsid(ctx context.Context, obj *model.SignalAggregations, agg model.StringAggregation) (*string, error) DimoAftermarketWPAState(ctx context.Context, obj *model.SignalAggregations, agg model.StringAggregation) (*string, error) - ExteriorAirTemperature(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - IsIgnitionOn(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - LowVoltageBatteryCurrentVoltage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - ObdBarometricPressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - ObdCommandedEgr(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - ObdCommandedEvap(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) + ExteriorAirTemperature(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + IsIgnitionOn(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + LowVoltageBatteryCurrentVoltage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + ObdBarometricPressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + ObdCommandedEgr(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + ObdCommandedEvap(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) ObdDTCList(ctx context.Context, obj *model.SignalAggregations, agg model.StringAggregation) (*string, error) - ObdDistanceSinceDTCClear(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - ObdDistanceWithMil(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - ObdEngineLoad(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - ObdFuelPressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - ObdIntakeTemp(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - ObdLongTermFuelTrim1(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - ObdMap(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - ObdO2WRSensor1Voltage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - ObdO2WRSensor2Voltage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - ObdRunTime(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - ObdShortTermFuelTrim1(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - ObdWarmupsSinceDTCClear(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - PowertrainCombustionEngineDieselExhaustFluidCapacity(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - PowertrainCombustionEngineDieselExhaustFluidLevel(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - PowertrainCombustionEngineEct(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - PowertrainCombustionEngineEop(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - PowertrainCombustionEngineEot(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) + ObdDistanceSinceDTCClear(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + ObdDistanceWithMil(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + ObdEngineLoad(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + ObdFuelPressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + ObdIntakeTemp(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + ObdLongTermFuelTrim1(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + ObdMap(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + ObdO2WRSensor1Voltage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + ObdO2WRSensor2Voltage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + ObdRunTime(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + ObdShortTermFuelTrim1(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + ObdWarmupsSinceDTCClear(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + PowertrainCombustionEngineDieselExhaustFluidCapacity(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + PowertrainCombustionEngineDieselExhaustFluidLevel(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + PowertrainCombustionEngineEct(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + PowertrainCombustionEngineEop(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + PowertrainCombustionEngineEot(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) PowertrainCombustionEngineEngineOilLevel(ctx context.Context, obj *model.SignalAggregations, agg model.StringAggregation) (*string, error) - PowertrainCombustionEngineEngineOilRelativeLevel(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - PowertrainCombustionEngineMaf(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - PowertrainCombustionEngineSpeed(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - PowertrainCombustionEngineTps(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - PowertrainCombustionEngineTorque(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - PowertrainFuelSystemAbsoluteLevel(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - PowertrainFuelSystemRelativeLevel(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) + PowertrainCombustionEngineEngineOilRelativeLevel(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + PowertrainCombustionEngineMaf(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + PowertrainCombustionEngineSpeed(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + PowertrainCombustionEngineTps(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + PowertrainCombustionEngineTorque(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + PowertrainFuelSystemAbsoluteLevel(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + PowertrainFuelSystemRelativeLevel(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) PowertrainFuelSystemSupportedFuelTypes(ctx context.Context, obj *model.SignalAggregations, agg model.StringAggregation) (*string, error) - PowertrainRange(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - PowertrainTractionBatteryChargingAddedEnergy(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - PowertrainTractionBatteryChargingChargeCurrentAc(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - PowertrainTractionBatteryChargingChargeLimit(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - PowertrainTractionBatteryChargingChargeVoltageUnknownType(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - PowertrainTractionBatteryChargingIsCharging(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - PowertrainTractionBatteryCurrentPower(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - PowertrainTractionBatteryCurrentVoltage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - PowertrainTractionBatteryGrossCapacity(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - PowertrainTractionBatteryRange(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - PowertrainTractionBatteryStateOfChargeCurrent(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - PowertrainTractionBatteryStateOfChargeCurrentEnergy(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - PowertrainTractionBatteryTemperatureAverage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - PowertrainTransmissionCurrentGear(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - PowertrainTransmissionTemperature(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - PowertrainTransmissionTravelledDistance(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) + PowertrainRange(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + PowertrainTractionBatteryChargingAddedEnergy(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + PowertrainTractionBatteryChargingChargeCurrentAc(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + PowertrainTractionBatteryChargingChargeLimit(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + PowertrainTractionBatteryChargingChargeVoltageUnknownType(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + PowertrainTractionBatteryChargingIsCharging(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + PowertrainTractionBatteryCurrentPower(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + PowertrainTractionBatteryCurrentVoltage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + PowertrainTractionBatteryGrossCapacity(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + PowertrainTractionBatteryRange(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + PowertrainTractionBatteryStateOfChargeCurrent(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + PowertrainTractionBatteryStateOfChargeCurrentEnergy(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + PowertrainTractionBatteryTemperatureAverage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + PowertrainTransmissionCurrentGear(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + PowertrainTransmissionTemperature(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + PowertrainTransmissionTravelledDistance(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) PowertrainType(ctx context.Context, obj *model.SignalAggregations, agg model.StringAggregation) (*string, error) - ServiceDistanceToService(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) - Speed(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) + ServiceDistanceToService(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + Speed(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) } type executableSchema struct { @@ -583,7 +583,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.AngularVelocityYaw(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.AngularVelocityYaw(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.cabinDoorRow1DriverSideIsOpen": if e.complexity.SignalAggregations.CabinDoorRow1DriverSideIsOpen == nil { @@ -595,7 +595,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.CabinDoorRow1DriverSideIsOpen(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.CabinDoorRow1DriverSideIsOpen(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.cabinDoorRow1DriverSideWindowIsOpen": if e.complexity.SignalAggregations.CabinDoorRow1DriverSideWindowIsOpen == nil { @@ -607,7 +607,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.CabinDoorRow1DriverSideWindowIsOpen(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.CabinDoorRow1DriverSideWindowIsOpen(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.cabinDoorRow1PassengerSideIsOpen": if e.complexity.SignalAggregations.CabinDoorRow1PassengerSideIsOpen == nil { @@ -619,7 +619,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.CabinDoorRow1PassengerSideIsOpen(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.CabinDoorRow1PassengerSideIsOpen(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.cabinDoorRow1PassengerSideWindowIsOpen": if e.complexity.SignalAggregations.CabinDoorRow1PassengerSideWindowIsOpen == nil { @@ -631,7 +631,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.CabinDoorRow1PassengerSideWindowIsOpen(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.CabinDoorRow1PassengerSideWindowIsOpen(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.cabinDoorRow2DriverSideIsOpen": if e.complexity.SignalAggregations.CabinDoorRow2DriverSideIsOpen == nil { @@ -643,7 +643,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.CabinDoorRow2DriverSideIsOpen(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.CabinDoorRow2DriverSideIsOpen(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.cabinDoorRow2DriverSideWindowIsOpen": if e.complexity.SignalAggregations.CabinDoorRow2DriverSideWindowIsOpen == nil { @@ -655,7 +655,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.CabinDoorRow2DriverSideWindowIsOpen(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.CabinDoorRow2DriverSideWindowIsOpen(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.cabinDoorRow2PassengerSideIsOpen": if e.complexity.SignalAggregations.CabinDoorRow2PassengerSideIsOpen == nil { @@ -667,7 +667,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.CabinDoorRow2PassengerSideIsOpen(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.CabinDoorRow2PassengerSideIsOpen(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.cabinDoorRow2PassengerSideWindowIsOpen": if e.complexity.SignalAggregations.CabinDoorRow2PassengerSideWindowIsOpen == nil { @@ -679,7 +679,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.CabinDoorRow2PassengerSideWindowIsOpen(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.CabinDoorRow2PassengerSideWindowIsOpen(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.chassisAxleRow1WheelLeftSpeed": if e.complexity.SignalAggregations.ChassisAxleRow1WheelLeftSpeed == nil { @@ -691,7 +691,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.ChassisAxleRow1WheelLeftSpeed(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.ChassisAxleRow1WheelLeftSpeed(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.chassisAxleRow1WheelLeftTirePressure": if e.complexity.SignalAggregations.ChassisAxleRow1WheelLeftTirePressure == nil { @@ -703,7 +703,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.ChassisAxleRow1WheelLeftTirePressure(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.ChassisAxleRow1WheelLeftTirePressure(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.chassisAxleRow1WheelRightSpeed": if e.complexity.SignalAggregations.ChassisAxleRow1WheelRightSpeed == nil { @@ -715,7 +715,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.ChassisAxleRow1WheelRightSpeed(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.ChassisAxleRow1WheelRightSpeed(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.chassisAxleRow1WheelRightTirePressure": if e.complexity.SignalAggregations.ChassisAxleRow1WheelRightTirePressure == nil { @@ -727,7 +727,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.ChassisAxleRow1WheelRightTirePressure(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.ChassisAxleRow1WheelRightTirePressure(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.chassisAxleRow2WheelLeftTirePressure": if e.complexity.SignalAggregations.ChassisAxleRow2WheelLeftTirePressure == nil { @@ -739,7 +739,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.ChassisAxleRow2WheelLeftTirePressure(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.ChassisAxleRow2WheelLeftTirePressure(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.chassisAxleRow2WheelRightTirePressure": if e.complexity.SignalAggregations.ChassisAxleRow2WheelRightTirePressure == nil { @@ -751,7 +751,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.ChassisAxleRow2WheelRightTirePressure(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.ChassisAxleRow2WheelRightTirePressure(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.currentLocationAltitude": if e.complexity.SignalAggregations.CurrentLocationAltitude == nil { @@ -763,7 +763,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.CurrentLocationAltitude(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.CurrentLocationAltitude(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.currentLocationApproximateLatitude": if e.complexity.SignalAggregations.CurrentLocationApproximateLatitude == nil { @@ -799,7 +799,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.CurrentLocationHeading(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.CurrentLocationHeading(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.currentLocationIsRedacted": if e.complexity.SignalAggregations.CurrentLocationIsRedacted == nil { @@ -811,7 +811,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.CurrentLocationIsRedacted(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.CurrentLocationIsRedacted(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.currentLocationLatitude": if e.complexity.SignalAggregations.CurrentLocationLatitude == nil { @@ -823,7 +823,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.CurrentLocationLatitude(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.CurrentLocationLatitude(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.currentLocationLongitude": if e.complexity.SignalAggregations.CurrentLocationLongitude == nil { @@ -835,7 +835,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.CurrentLocationLongitude(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.CurrentLocationLongitude(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.dimoAftermarketHDOP": if e.complexity.SignalAggregations.DimoAftermarketHdop == nil { @@ -847,7 +847,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.DimoAftermarketHdop(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.DimoAftermarketHdop(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.dimoAftermarketNSAT": if e.complexity.SignalAggregations.DimoAftermarketNsat == nil { @@ -859,7 +859,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.DimoAftermarketNsat(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.DimoAftermarketNsat(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.dimoAftermarketSSID": if e.complexity.SignalAggregations.DimoAftermarketSsid == nil { @@ -895,7 +895,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.ExteriorAirTemperature(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.ExteriorAirTemperature(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.isIgnitionOn": if e.complexity.SignalAggregations.IsIgnitionOn == nil { @@ -907,7 +907,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.IsIgnitionOn(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.IsIgnitionOn(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.lowVoltageBatteryCurrentVoltage": if e.complexity.SignalAggregations.LowVoltageBatteryCurrentVoltage == nil { @@ -919,7 +919,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.LowVoltageBatteryCurrentVoltage(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.LowVoltageBatteryCurrentVoltage(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.obdBarometricPressure": if e.complexity.SignalAggregations.ObdBarometricPressure == nil { @@ -931,7 +931,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.ObdBarometricPressure(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.ObdBarometricPressure(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.obdCommandedEGR": if e.complexity.SignalAggregations.ObdCommandedEgr == nil { @@ -943,7 +943,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.ObdCommandedEgr(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.ObdCommandedEgr(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.obdCommandedEVAP": if e.complexity.SignalAggregations.ObdCommandedEvap == nil { @@ -955,7 +955,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.ObdCommandedEvap(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.ObdCommandedEvap(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.obdDTCList": if e.complexity.SignalAggregations.ObdDTCList == nil { @@ -979,7 +979,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.ObdDistanceSinceDTCClear(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.ObdDistanceSinceDTCClear(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.obdDistanceWithMIL": if e.complexity.SignalAggregations.ObdDistanceWithMil == nil { @@ -991,7 +991,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.ObdDistanceWithMil(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.ObdDistanceWithMil(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.obdEngineLoad": if e.complexity.SignalAggregations.ObdEngineLoad == nil { @@ -1003,7 +1003,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.ObdEngineLoad(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.ObdEngineLoad(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.obdFuelPressure": if e.complexity.SignalAggregations.ObdFuelPressure == nil { @@ -1015,7 +1015,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.ObdFuelPressure(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.ObdFuelPressure(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.obdIntakeTemp": if e.complexity.SignalAggregations.ObdIntakeTemp == nil { @@ -1027,7 +1027,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.ObdIntakeTemp(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.ObdIntakeTemp(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.obdLongTermFuelTrim1": if e.complexity.SignalAggregations.ObdLongTermFuelTrim1 == nil { @@ -1039,7 +1039,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.ObdLongTermFuelTrim1(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.ObdLongTermFuelTrim1(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.obdMAP": if e.complexity.SignalAggregations.ObdMap == nil { @@ -1051,7 +1051,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.ObdMap(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.ObdMap(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.obdO2WRSensor1Voltage": if e.complexity.SignalAggregations.ObdO2WRSensor1Voltage == nil { @@ -1063,7 +1063,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.ObdO2WRSensor1Voltage(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.ObdO2WRSensor1Voltage(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.obdO2WRSensor2Voltage": if e.complexity.SignalAggregations.ObdO2WRSensor2Voltage == nil { @@ -1075,7 +1075,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.ObdO2WRSensor2Voltage(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.ObdO2WRSensor2Voltage(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.obdRunTime": if e.complexity.SignalAggregations.ObdRunTime == nil { @@ -1087,7 +1087,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.ObdRunTime(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.ObdRunTime(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.obdShortTermFuelTrim1": if e.complexity.SignalAggregations.ObdShortTermFuelTrim1 == nil { @@ -1099,7 +1099,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.ObdShortTermFuelTrim1(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.ObdShortTermFuelTrim1(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.obdWarmupsSinceDTCClear": if e.complexity.SignalAggregations.ObdWarmupsSinceDTCClear == nil { @@ -1111,7 +1111,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.ObdWarmupsSinceDTCClear(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.ObdWarmupsSinceDTCClear(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainCombustionEngineDieselExhaustFluidCapacity": if e.complexity.SignalAggregations.PowertrainCombustionEngineDieselExhaustFluidCapacity == nil { @@ -1123,7 +1123,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainCombustionEngineDieselExhaustFluidCapacity(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainCombustionEngineDieselExhaustFluidCapacity(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainCombustionEngineDieselExhaustFluidLevel": if e.complexity.SignalAggregations.PowertrainCombustionEngineDieselExhaustFluidLevel == nil { @@ -1135,7 +1135,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainCombustionEngineDieselExhaustFluidLevel(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainCombustionEngineDieselExhaustFluidLevel(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainCombustionEngineECT": if e.complexity.SignalAggregations.PowertrainCombustionEngineEct == nil { @@ -1147,7 +1147,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainCombustionEngineEct(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainCombustionEngineEct(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainCombustionEngineEngineOilLevel": if e.complexity.SignalAggregations.PowertrainCombustionEngineEngineOilLevel == nil { @@ -1171,7 +1171,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainCombustionEngineEngineOilRelativeLevel(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainCombustionEngineEngineOilRelativeLevel(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainCombustionEngineEOP": if e.complexity.SignalAggregations.PowertrainCombustionEngineEop == nil { @@ -1183,7 +1183,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainCombustionEngineEop(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainCombustionEngineEop(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainCombustionEngineEOT": if e.complexity.SignalAggregations.PowertrainCombustionEngineEot == nil { @@ -1195,7 +1195,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainCombustionEngineEot(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainCombustionEngineEot(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainCombustionEngineMAF": if e.complexity.SignalAggregations.PowertrainCombustionEngineMaf == nil { @@ -1207,7 +1207,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainCombustionEngineMaf(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainCombustionEngineMaf(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainCombustionEngineSpeed": if e.complexity.SignalAggregations.PowertrainCombustionEngineSpeed == nil { @@ -1219,7 +1219,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainCombustionEngineSpeed(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainCombustionEngineSpeed(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainCombustionEngineTorque": if e.complexity.SignalAggregations.PowertrainCombustionEngineTorque == nil { @@ -1231,7 +1231,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainCombustionEngineTorque(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainCombustionEngineTorque(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainCombustionEngineTPS": if e.complexity.SignalAggregations.PowertrainCombustionEngineTps == nil { @@ -1243,7 +1243,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainCombustionEngineTps(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainCombustionEngineTps(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainFuelSystemAbsoluteLevel": if e.complexity.SignalAggregations.PowertrainFuelSystemAbsoluteLevel == nil { @@ -1255,7 +1255,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainFuelSystemAbsoluteLevel(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainFuelSystemAbsoluteLevel(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainFuelSystemRelativeLevel": if e.complexity.SignalAggregations.PowertrainFuelSystemRelativeLevel == nil { @@ -1267,7 +1267,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainFuelSystemRelativeLevel(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainFuelSystemRelativeLevel(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainFuelSystemSupportedFuelTypes": if e.complexity.SignalAggregations.PowertrainFuelSystemSupportedFuelTypes == nil { @@ -1291,7 +1291,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainRange(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainRange(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainTractionBatteryChargingAddedEnergy": if e.complexity.SignalAggregations.PowertrainTractionBatteryChargingAddedEnergy == nil { @@ -1303,7 +1303,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainTractionBatteryChargingAddedEnergy(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainTractionBatteryChargingAddedEnergy(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainTractionBatteryChargingChargeCurrentAC": if e.complexity.SignalAggregations.PowertrainTractionBatteryChargingChargeCurrentAc == nil { @@ -1315,7 +1315,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainTractionBatteryChargingChargeCurrentAc(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainTractionBatteryChargingChargeCurrentAc(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainTractionBatteryChargingChargeLimit": if e.complexity.SignalAggregations.PowertrainTractionBatteryChargingChargeLimit == nil { @@ -1327,7 +1327,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainTractionBatteryChargingChargeLimit(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainTractionBatteryChargingChargeLimit(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainTractionBatteryChargingChargeVoltageUnknownType": if e.complexity.SignalAggregations.PowertrainTractionBatteryChargingChargeVoltageUnknownType == nil { @@ -1339,7 +1339,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainTractionBatteryChargingChargeVoltageUnknownType(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainTractionBatteryChargingChargeVoltageUnknownType(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainTractionBatteryChargingIsCharging": if e.complexity.SignalAggregations.PowertrainTractionBatteryChargingIsCharging == nil { @@ -1351,7 +1351,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainTractionBatteryChargingIsCharging(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainTractionBatteryChargingIsCharging(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainTractionBatteryCurrentPower": if e.complexity.SignalAggregations.PowertrainTractionBatteryCurrentPower == nil { @@ -1363,7 +1363,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainTractionBatteryCurrentPower(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainTractionBatteryCurrentPower(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainTractionBatteryCurrentVoltage": if e.complexity.SignalAggregations.PowertrainTractionBatteryCurrentVoltage == nil { @@ -1375,7 +1375,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainTractionBatteryCurrentVoltage(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainTractionBatteryCurrentVoltage(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainTractionBatteryGrossCapacity": if e.complexity.SignalAggregations.PowertrainTractionBatteryGrossCapacity == nil { @@ -1387,7 +1387,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainTractionBatteryGrossCapacity(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainTractionBatteryGrossCapacity(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainTractionBatteryRange": if e.complexity.SignalAggregations.PowertrainTractionBatteryRange == nil { @@ -1399,7 +1399,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainTractionBatteryRange(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainTractionBatteryRange(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainTractionBatteryStateOfChargeCurrent": if e.complexity.SignalAggregations.PowertrainTractionBatteryStateOfChargeCurrent == nil { @@ -1411,7 +1411,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainTractionBatteryStateOfChargeCurrent(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainTractionBatteryStateOfChargeCurrent(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainTractionBatteryStateOfChargeCurrentEnergy": if e.complexity.SignalAggregations.PowertrainTractionBatteryStateOfChargeCurrentEnergy == nil { @@ -1423,7 +1423,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainTractionBatteryStateOfChargeCurrentEnergy(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainTractionBatteryStateOfChargeCurrentEnergy(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainTractionBatteryTemperatureAverage": if e.complexity.SignalAggregations.PowertrainTractionBatteryTemperatureAverage == nil { @@ -1435,7 +1435,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainTractionBatteryTemperatureAverage(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainTractionBatteryTemperatureAverage(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainTransmissionCurrentGear": if e.complexity.SignalAggregations.PowertrainTransmissionCurrentGear == nil { @@ -1447,7 +1447,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainTransmissionCurrentGear(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainTransmissionCurrentGear(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainTransmissionTemperature": if e.complexity.SignalAggregations.PowertrainTransmissionTemperature == nil { @@ -1459,7 +1459,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainTransmissionTemperature(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainTransmissionTemperature(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainTransmissionTravelledDistance": if e.complexity.SignalAggregations.PowertrainTransmissionTravelledDistance == nil { @@ -1471,7 +1471,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.PowertrainTransmissionTravelledDistance(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.PowertrainTransmissionTravelledDistance(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.powertrainType": if e.complexity.SignalAggregations.PowertrainType == nil { @@ -1495,7 +1495,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.ServiceDistanceToService(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.ServiceDistanceToService(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.speed": if e.complexity.SignalAggregations.Speed == nil { @@ -1507,7 +1507,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.SignalAggregations.Speed(childComplexity, args["agg"].(model.FloatAggregation)), true + return e.complexity.SignalAggregations.Speed(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true case "SignalAggregations.timestamp": if e.complexity.SignalAggregations.Timestamp == nil { @@ -2171,6 +2171,7 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { ec.unmarshalInputAftermarketDeviceBy, ec.unmarshalInputAttestationFilter, ec.unmarshalInputSignalFilter, + ec.unmarshalInputSignalFloatFilter, ) first := true @@ -2564,7 +2565,16 @@ input SignalFilter { """ source: String } -`, BuiltIn: false}, + +# TODO(elffjs): Unsure about this exact name. +# TODO(elffjs): Do we need more operators? +# TODO(elffjs): Recursive "or" support. +input SignalFloatFilter { + gt: Float + lt: Float + gte: Float + lte: Float +}`, BuiltIn: false}, {Name: "../../schema/device_activity.graphqls", Input: `extend type Query { """ DeviceActivity indicates when a given device last transmitted data. For privacy, ranges are used rather than exact timestamps. @@ -2603,7 +2613,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ angularVelocityYaw( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "AngularVelocityYaw", forceResolver: true) @isSignal @hasAggregation """ @@ -2611,7 +2622,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ cabinDoorRow1DriverSideIsOpen( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "CabinDoorRow1DriverSideIsOpen", forceResolver: true) @isSignal @hasAggregation """ @@ -2619,7 +2631,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ cabinDoorRow1DriverSideWindowIsOpen( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "CabinDoorRow1DriverSideWindowIsOpen", forceResolver: true) @isSignal @hasAggregation """ @@ -2627,7 +2640,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ cabinDoorRow1PassengerSideIsOpen( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "CabinDoorRow1PassengerSideIsOpen", forceResolver: true) @isSignal @hasAggregation """ @@ -2635,7 +2649,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ cabinDoorRow1PassengerSideWindowIsOpen( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "CabinDoorRow1PassengerSideWindowIsOpen", forceResolver: true) @isSignal @hasAggregation """ @@ -2643,7 +2658,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ cabinDoorRow2DriverSideIsOpen( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "CabinDoorRow2DriverSideIsOpen", forceResolver: true) @isSignal @hasAggregation """ @@ -2651,7 +2667,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ cabinDoorRow2DriverSideWindowIsOpen( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "CabinDoorRow2DriverSideWindowIsOpen", forceResolver: true) @isSignal @hasAggregation """ @@ -2659,7 +2676,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ cabinDoorRow2PassengerSideIsOpen( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "CabinDoorRow2PassengerSideIsOpen", forceResolver: true) @isSignal @hasAggregation """ @@ -2667,7 +2685,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ cabinDoorRow2PassengerSideWindowIsOpen( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "CabinDoorRow2PassengerSideWindowIsOpen", forceResolver: true) @isSignal @hasAggregation """ @@ -2676,7 +2695,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ chassisAxleRow1WheelLeftSpeed( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "ChassisAxleRow1WheelLeftSpeed", forceResolver: true) @isSignal @hasAggregation """ @@ -2685,7 +2705,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ chassisAxleRow1WheelLeftTirePressure( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "ChassisAxleRow1WheelLeftTirePressure", forceResolver: true) @isSignal @hasAggregation """ @@ -2694,7 +2715,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ chassisAxleRow1WheelRightSpeed( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "ChassisAxleRow1WheelRightSpeed", forceResolver: true) @isSignal @hasAggregation """ @@ -2703,7 +2725,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ chassisAxleRow1WheelRightTirePressure( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "ChassisAxleRow1WheelRightTirePressure", forceResolver: true) @isSignal @hasAggregation """ @@ -2712,7 +2735,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ chassisAxleRow2WheelLeftTirePressure( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "ChassisAxleRow2WheelLeftTirePressure", forceResolver: true) @isSignal @hasAggregation """ @@ -2721,7 +2745,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ chassisAxleRow2WheelRightTirePressure( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "ChassisAxleRow2WheelRightTirePressure", forceResolver: true) @isSignal @hasAggregation """ @@ -2730,7 +2755,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_ALL_TIME_LOCATION] """ currentLocationAltitude( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_ALL_TIME_LOCATION]) @goField(name: "CurrentLocationAltitude", forceResolver: true) @isSignal @hasAggregation """ @@ -2739,7 +2765,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_ALL_TIME_LOCATION] """ currentLocationHeading( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_ALL_TIME_LOCATION]) @goField(name: "CurrentLocationHeading", forceResolver: true) @isSignal @hasAggregation """ @@ -2747,7 +2774,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_ALL_TIME_LOCATION] """ currentLocationIsRedacted( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_ALL_TIME_LOCATION]) @goField(name: "CurrentLocationIsRedacted", forceResolver: true) @isSignal @hasAggregation """ @@ -2756,7 +2784,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_ALL_TIME_LOCATION] """ currentLocationLatitude( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_ALL_TIME_LOCATION]) @goField(name: "CurrentLocationLatitude", forceResolver: true) @isSignal @hasAggregation """ @@ -2765,7 +2794,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_ALL_TIME_LOCATION] """ currentLocationLongitude( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_ALL_TIME_LOCATION]) @goField(name: "CurrentLocationLongitude", forceResolver: true) @isSignal @hasAggregation """ @@ -2773,7 +2803,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ dimoAftermarketHDOP( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "DIMOAftermarketHDOP", forceResolver: true) @isSignal @hasAggregation """ @@ -2781,7 +2812,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ dimoAftermarketNSAT( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "DIMOAftermarketNSAT", forceResolver: true) @isSignal @hasAggregation """ @@ -2806,7 +2838,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ exteriorAirTemperature( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "ExteriorAirTemperature", forceResolver: true) @isSignal @hasAggregation """ @@ -2814,7 +2847,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ isIgnitionOn( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "IsIgnitionOn", forceResolver: true) @isSignal @hasAggregation """ @@ -2823,7 +2857,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ lowVoltageBatteryCurrentVoltage( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "LowVoltageBatteryCurrentVoltage", forceResolver: true) @isSignal @hasAggregation """ @@ -2832,7 +2867,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdBarometricPressure( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDBarometricPressure", forceResolver: true) @isSignal @hasAggregation """ @@ -2841,7 +2877,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdCommandedEGR( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDCommandedEGR", forceResolver: true) @isSignal @hasAggregation """ @@ -2850,7 +2887,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdCommandedEVAP( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDCommandedEVAP", forceResolver: true) @isSignal @hasAggregation """ @@ -2867,7 +2905,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdDistanceSinceDTCClear( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDDistanceSinceDTCClear", forceResolver: true) @isSignal @hasAggregation """ @@ -2876,7 +2915,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdDistanceWithMIL( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDDistanceWithMIL", forceResolver: true) @isSignal @hasAggregation """ @@ -2885,7 +2925,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdEngineLoad( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDEngineLoad", forceResolver: true) @isSignal @hasAggregation """ @@ -2894,7 +2935,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdFuelPressure( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDFuelPressure", forceResolver: true) @isSignal @hasAggregation """ @@ -2903,7 +2945,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdIntakeTemp( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDIntakeTemp", forceResolver: true) @isSignal @hasAggregation """ @@ -2912,7 +2955,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdLongTermFuelTrim1( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDLongTermFuelTrim1", forceResolver: true) @isSignal @hasAggregation """ @@ -2921,7 +2965,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdMAP( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDMAP", forceResolver: true) @isSignal @hasAggregation """ @@ -2930,7 +2975,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdO2WRSensor1Voltage( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDO2WRSensor1Voltage", forceResolver: true) @isSignal @hasAggregation """ @@ -2939,7 +2985,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdO2WRSensor2Voltage( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDO2WRSensor2Voltage", forceResolver: true) @isSignal @hasAggregation """ @@ -2948,7 +2995,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdRunTime( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDRunTime", forceResolver: true) @isSignal @hasAggregation """ @@ -2957,7 +3005,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdShortTermFuelTrim1( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDShortTermFuelTrim1", forceResolver: true) @isSignal @hasAggregation """ @@ -2965,7 +3014,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdWarmupsSinceDTCClear( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDWarmupsSinceDTCClear", forceResolver: true) @isSignal @hasAggregation """ @@ -2974,7 +3024,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainCombustionEngineDieselExhaustFluidCapacity( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainCombustionEngineDieselExhaustFluidCapacity", forceResolver: true) @isSignal @hasAggregation """ @@ -2983,7 +3034,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainCombustionEngineDieselExhaustFluidLevel( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainCombustionEngineDieselExhaustFluidLevel", forceResolver: true) @isSignal @hasAggregation """ @@ -2992,7 +3044,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainCombustionEngineECT( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainCombustionEngineECT", forceResolver: true) @isSignal @hasAggregation """ @@ -3001,7 +3054,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainCombustionEngineEOP( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainCombustionEngineEOP", forceResolver: true) @isSignal @hasAggregation """ @@ -3010,7 +3064,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainCombustionEngineEOT( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainCombustionEngineEOT", forceResolver: true) @isSignal @hasAggregation """ @@ -3027,7 +3082,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainCombustionEngineEngineOilRelativeLevel( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainCombustionEngineEngineOilRelativeLevel", forceResolver: true) @isSignal @hasAggregation """ @@ -3036,7 +3092,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainCombustionEngineMAF( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainCombustionEngineMAF", forceResolver: true) @isSignal @hasAggregation """ @@ -3045,7 +3102,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainCombustionEngineSpeed( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainCombustionEngineSpeed", forceResolver: true) @isSignal @hasAggregation """ @@ -3054,7 +3112,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainCombustionEngineTPS( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainCombustionEngineTPS", forceResolver: true) @isSignal @hasAggregation """ @@ -3063,7 +3122,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainCombustionEngineTorque( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainCombustionEngineTorque", forceResolver: true) @isSignal @hasAggregation """ @@ -3072,7 +3132,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainFuelSystemAbsoluteLevel( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainFuelSystemAbsoluteLevel", forceResolver: true) @isSignal @hasAggregation """ @@ -3081,7 +3142,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainFuelSystemRelativeLevel( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainFuelSystemRelativeLevel", forceResolver: true) @isSignal @hasAggregation """ @@ -3098,7 +3160,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainRange( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainRange", forceResolver: true) @isSignal @hasAggregation """ @@ -3107,7 +3170,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryChargingAddedEnergy( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryChargingAddedEnergy", forceResolver: true) @isSignal @hasAggregation """ @@ -3116,7 +3180,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryChargingChargeCurrentAC( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryChargingChargeCurrentAC", forceResolver: true) @isSignal @hasAggregation """ @@ -3125,7 +3190,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryChargingChargeLimit( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryChargingChargeLimit", forceResolver: true) @isSignal @hasAggregation """ @@ -3134,7 +3200,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryChargingChargeVoltageUnknownType( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryChargingChargeVoltageUnknownType", forceResolver: true) @isSignal @hasAggregation """ @@ -3142,7 +3209,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryChargingIsCharging( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryChargingIsCharging", forceResolver: true) @isSignal @hasAggregation """ @@ -3151,7 +3219,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryCurrentPower( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryCurrentPower", forceResolver: true) @isSignal @hasAggregation """ @@ -3160,7 +3229,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryCurrentVoltage( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryCurrentVoltage", forceResolver: true) @isSignal @hasAggregation """ @@ -3169,7 +3239,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryGrossCapacity( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryGrossCapacity", forceResolver: true) @isSignal @hasAggregation """ @@ -3178,7 +3249,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryRange( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryRange", forceResolver: true) @isSignal @hasAggregation """ @@ -3187,7 +3259,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryStateOfChargeCurrent( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryStateOfChargeCurrent", forceResolver: true) @isSignal @hasAggregation """ @@ -3196,7 +3269,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryStateOfChargeCurrentEnergy( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryStateOfChargeCurrentEnergy", forceResolver: true) @isSignal @hasAggregation """ @@ -3205,7 +3279,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryTemperatureAverage( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryTemperatureAverage", forceResolver: true) @isSignal @hasAggregation """ @@ -3213,7 +3288,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTransmissionCurrentGear( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTransmissionCurrentGear", forceResolver: true) @isSignal @hasAggregation """ @@ -3222,7 +3298,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTransmissionTemperature( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTransmissionTemperature", forceResolver: true) @isSignal @hasAggregation """ @@ -3231,7 +3308,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTransmissionTravelledDistance( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTransmissionTravelledDistance", forceResolver: true) @isSignal @hasAggregation """ @@ -3248,7 +3326,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ serviceDistanceToService( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "ServiceDistanceToService", forceResolver: true) @isSignal @hasAggregation """ @@ -3257,7 +3336,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ speed( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "Speed", forceResolver: true) @isSignal @hasAggregation } @@ -4336,6 +4416,11 @@ func (ec *executionContext) field_SignalAggregations_angularVelocityYaw_args(ctx return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_angularVelocityYaw_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_angularVelocityYaw_argsAgg( @@ -4356,6 +4441,24 @@ func (ec *executionContext) field_SignalAggregations_angularVelocityYaw_argsAgg( return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_angularVelocityYaw_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_cabinDoorRow1DriverSideIsOpen_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -4364,6 +4467,11 @@ func (ec *executionContext) field_SignalAggregations_cabinDoorRow1DriverSideIsOp return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_cabinDoorRow1DriverSideIsOpen_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_cabinDoorRow1DriverSideIsOpen_argsAgg( @@ -4384,6 +4492,24 @@ func (ec *executionContext) field_SignalAggregations_cabinDoorRow1DriverSideIsOp return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_cabinDoorRow1DriverSideIsOpen_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_cabinDoorRow1DriverSideWindowIsOpen_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -4392,6 +4518,11 @@ func (ec *executionContext) field_SignalAggregations_cabinDoorRow1DriverSideWind return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_cabinDoorRow1DriverSideWindowIsOpen_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_cabinDoorRow1DriverSideWindowIsOpen_argsAgg( @@ -4412,6 +4543,24 @@ func (ec *executionContext) field_SignalAggregations_cabinDoorRow1DriverSideWind return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_cabinDoorRow1DriverSideWindowIsOpen_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_cabinDoorRow1PassengerSideIsOpen_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -4420,6 +4569,11 @@ func (ec *executionContext) field_SignalAggregations_cabinDoorRow1PassengerSideI return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_cabinDoorRow1PassengerSideIsOpen_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_cabinDoorRow1PassengerSideIsOpen_argsAgg( @@ -4440,6 +4594,24 @@ func (ec *executionContext) field_SignalAggregations_cabinDoorRow1PassengerSideI return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_cabinDoorRow1PassengerSideIsOpen_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_cabinDoorRow1PassengerSideWindowIsOpen_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -4448,6 +4620,11 @@ func (ec *executionContext) field_SignalAggregations_cabinDoorRow1PassengerSideW return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_cabinDoorRow1PassengerSideWindowIsOpen_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_cabinDoorRow1PassengerSideWindowIsOpen_argsAgg( @@ -4468,6 +4645,24 @@ func (ec *executionContext) field_SignalAggregations_cabinDoorRow1PassengerSideW return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_cabinDoorRow1PassengerSideWindowIsOpen_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_cabinDoorRow2DriverSideIsOpen_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -4476,6 +4671,11 @@ func (ec *executionContext) field_SignalAggregations_cabinDoorRow2DriverSideIsOp return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_cabinDoorRow2DriverSideIsOpen_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_cabinDoorRow2DriverSideIsOpen_argsAgg( @@ -4496,6 +4696,24 @@ func (ec *executionContext) field_SignalAggregations_cabinDoorRow2DriverSideIsOp return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_cabinDoorRow2DriverSideIsOpen_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_cabinDoorRow2DriverSideWindowIsOpen_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -4504,6 +4722,11 @@ func (ec *executionContext) field_SignalAggregations_cabinDoorRow2DriverSideWind return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_cabinDoorRow2DriverSideWindowIsOpen_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_cabinDoorRow2DriverSideWindowIsOpen_argsAgg( @@ -4524,6 +4747,24 @@ func (ec *executionContext) field_SignalAggregations_cabinDoorRow2DriverSideWind return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_cabinDoorRow2DriverSideWindowIsOpen_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_cabinDoorRow2PassengerSideIsOpen_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -4532,6 +4773,11 @@ func (ec *executionContext) field_SignalAggregations_cabinDoorRow2PassengerSideI return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_cabinDoorRow2PassengerSideIsOpen_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_cabinDoorRow2PassengerSideIsOpen_argsAgg( @@ -4552,6 +4798,24 @@ func (ec *executionContext) field_SignalAggregations_cabinDoorRow2PassengerSideI return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_cabinDoorRow2PassengerSideIsOpen_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_cabinDoorRow2PassengerSideWindowIsOpen_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -4560,6 +4824,11 @@ func (ec *executionContext) field_SignalAggregations_cabinDoorRow2PassengerSideW return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_cabinDoorRow2PassengerSideWindowIsOpen_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_cabinDoorRow2PassengerSideWindowIsOpen_argsAgg( @@ -4580,6 +4849,24 @@ func (ec *executionContext) field_SignalAggregations_cabinDoorRow2PassengerSideW return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_cabinDoorRow2PassengerSideWindowIsOpen_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_chassisAxleRow1WheelLeftSpeed_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -4588,6 +4875,11 @@ func (ec *executionContext) field_SignalAggregations_chassisAxleRow1WheelLeftSpe return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_chassisAxleRow1WheelLeftSpeed_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_chassisAxleRow1WheelLeftSpeed_argsAgg( @@ -4608,6 +4900,24 @@ func (ec *executionContext) field_SignalAggregations_chassisAxleRow1WheelLeftSpe return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_chassisAxleRow1WheelLeftSpeed_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_chassisAxleRow1WheelLeftTirePressure_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -4616,6 +4926,11 @@ func (ec *executionContext) field_SignalAggregations_chassisAxleRow1WheelLeftTir return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_chassisAxleRow1WheelLeftTirePressure_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_chassisAxleRow1WheelLeftTirePressure_argsAgg( @@ -4636,6 +4951,24 @@ func (ec *executionContext) field_SignalAggregations_chassisAxleRow1WheelLeftTir return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_chassisAxleRow1WheelLeftTirePressure_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_chassisAxleRow1WheelRightSpeed_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -4644,6 +4977,11 @@ func (ec *executionContext) field_SignalAggregations_chassisAxleRow1WheelRightSp return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_chassisAxleRow1WheelRightSpeed_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_chassisAxleRow1WheelRightSpeed_argsAgg( @@ -4664,6 +5002,24 @@ func (ec *executionContext) field_SignalAggregations_chassisAxleRow1WheelRightSp return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_chassisAxleRow1WheelRightSpeed_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_chassisAxleRow1WheelRightTirePressure_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -4672,6 +5028,11 @@ func (ec *executionContext) field_SignalAggregations_chassisAxleRow1WheelRightTi return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_chassisAxleRow1WheelRightTirePressure_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_chassisAxleRow1WheelRightTirePressure_argsAgg( @@ -4692,6 +5053,24 @@ func (ec *executionContext) field_SignalAggregations_chassisAxleRow1WheelRightTi return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_chassisAxleRow1WheelRightTirePressure_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_chassisAxleRow2WheelLeftTirePressure_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -4700,6 +5079,11 @@ func (ec *executionContext) field_SignalAggregations_chassisAxleRow2WheelLeftTir return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_chassisAxleRow2WheelLeftTirePressure_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_chassisAxleRow2WheelLeftTirePressure_argsAgg( @@ -4720,6 +5104,24 @@ func (ec *executionContext) field_SignalAggregations_chassisAxleRow2WheelLeftTir return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_chassisAxleRow2WheelLeftTirePressure_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_chassisAxleRow2WheelRightTirePressure_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -4728,6 +5130,11 @@ func (ec *executionContext) field_SignalAggregations_chassisAxleRow2WheelRightTi return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_chassisAxleRow2WheelRightTirePressure_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_chassisAxleRow2WheelRightTirePressure_argsAgg( @@ -4748,20 +5155,43 @@ func (ec *executionContext) field_SignalAggregations_chassisAxleRow2WheelRightTi return zeroVal, nil } -func (ec *executionContext) field_SignalAggregations_currentLocationAltitude_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { - var err error - args := map[string]any{} - arg0, err := ec.field_SignalAggregations_currentLocationAltitude_argsAgg(ctx, rawArgs) - if err != nil { - return nil, err - } - args["agg"] = arg0 - return args, nil -} -func (ec *executionContext) field_SignalAggregations_currentLocationAltitude_argsAgg( +func (ec *executionContext) field_SignalAggregations_chassisAxleRow2WheelRightTirePressure_argsFilter( ctx context.Context, rawArgs map[string]any, -) (model.FloatAggregation, error) { +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + +func (ec *executionContext) field_SignalAggregations_currentLocationAltitude_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { + var err error + args := map[string]any{} + arg0, err := ec.field_SignalAggregations_currentLocationAltitude_argsAgg(ctx, rawArgs) + if err != nil { + return nil, err + } + args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_currentLocationAltitude_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 + return args, nil +} +func (ec *executionContext) field_SignalAggregations_currentLocationAltitude_argsAgg( + ctx context.Context, + rawArgs map[string]any, +) (model.FloatAggregation, error) { if _, ok := rawArgs["agg"]; !ok { var zeroVal model.FloatAggregation return zeroVal, nil @@ -4776,6 +5206,24 @@ func (ec *executionContext) field_SignalAggregations_currentLocationAltitude_arg return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_currentLocationAltitude_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_currentLocationApproximateLatitude_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -4840,6 +5288,11 @@ func (ec *executionContext) field_SignalAggregations_currentLocationHeading_args return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_currentLocationHeading_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_currentLocationHeading_argsAgg( @@ -4860,6 +5313,24 @@ func (ec *executionContext) field_SignalAggregations_currentLocationHeading_args return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_currentLocationHeading_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_currentLocationIsRedacted_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -4868,6 +5339,11 @@ func (ec *executionContext) field_SignalAggregations_currentLocationIsRedacted_a return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_currentLocationIsRedacted_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_currentLocationIsRedacted_argsAgg( @@ -4888,6 +5364,24 @@ func (ec *executionContext) field_SignalAggregations_currentLocationIsRedacted_a return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_currentLocationIsRedacted_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_currentLocationLatitude_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -4896,6 +5390,11 @@ func (ec *executionContext) field_SignalAggregations_currentLocationLatitude_arg return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_currentLocationLatitude_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_currentLocationLatitude_argsAgg( @@ -4916,6 +5415,24 @@ func (ec *executionContext) field_SignalAggregations_currentLocationLatitude_arg return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_currentLocationLatitude_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_currentLocationLongitude_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -4924,6 +5441,11 @@ func (ec *executionContext) field_SignalAggregations_currentLocationLongitude_ar return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_currentLocationLongitude_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_currentLocationLongitude_argsAgg( @@ -4944,6 +5466,24 @@ func (ec *executionContext) field_SignalAggregations_currentLocationLongitude_ar return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_currentLocationLongitude_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_dimoAftermarketHDOP_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -4952,6 +5492,11 @@ func (ec *executionContext) field_SignalAggregations_dimoAftermarketHDOP_args(ct return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_dimoAftermarketHDOP_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_dimoAftermarketHDOP_argsAgg( @@ -4972,6 +5517,24 @@ func (ec *executionContext) field_SignalAggregations_dimoAftermarketHDOP_argsAgg return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_dimoAftermarketHDOP_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_dimoAftermarketNSAT_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -4980,6 +5543,11 @@ func (ec *executionContext) field_SignalAggregations_dimoAftermarketNSAT_args(ct return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_dimoAftermarketNSAT_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_dimoAftermarketNSAT_argsAgg( @@ -5000,6 +5568,24 @@ func (ec *executionContext) field_SignalAggregations_dimoAftermarketNSAT_argsAgg return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_dimoAftermarketNSAT_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_dimoAftermarketSSID_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5064,6 +5650,11 @@ func (ec *executionContext) field_SignalAggregations_exteriorAirTemperature_args return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_exteriorAirTemperature_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_exteriorAirTemperature_argsAgg( @@ -5084,6 +5675,24 @@ func (ec *executionContext) field_SignalAggregations_exteriorAirTemperature_args return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_exteriorAirTemperature_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_isIgnitionOn_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5092,6 +5701,11 @@ func (ec *executionContext) field_SignalAggregations_isIgnitionOn_args(ctx conte return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_isIgnitionOn_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_isIgnitionOn_argsAgg( @@ -5112,6 +5726,24 @@ func (ec *executionContext) field_SignalAggregations_isIgnitionOn_argsAgg( return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_isIgnitionOn_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_lowVoltageBatteryCurrentVoltage_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5120,6 +5752,11 @@ func (ec *executionContext) field_SignalAggregations_lowVoltageBatteryCurrentVol return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_lowVoltageBatteryCurrentVoltage_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_lowVoltageBatteryCurrentVoltage_argsAgg( @@ -5140,6 +5777,24 @@ func (ec *executionContext) field_SignalAggregations_lowVoltageBatteryCurrentVol return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_lowVoltageBatteryCurrentVoltage_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_obdBarometricPressure_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5148,6 +5803,11 @@ func (ec *executionContext) field_SignalAggregations_obdBarometricPressure_args( return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_obdBarometricPressure_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_obdBarometricPressure_argsAgg( @@ -5168,6 +5828,24 @@ func (ec *executionContext) field_SignalAggregations_obdBarometricPressure_argsA return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_obdBarometricPressure_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_obdCommandedEGR_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5176,6 +5854,11 @@ func (ec *executionContext) field_SignalAggregations_obdCommandedEGR_args(ctx co return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_obdCommandedEGR_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_obdCommandedEGR_argsAgg( @@ -5196,6 +5879,24 @@ func (ec *executionContext) field_SignalAggregations_obdCommandedEGR_argsAgg( return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_obdCommandedEGR_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_obdCommandedEVAP_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5204,6 +5905,11 @@ func (ec *executionContext) field_SignalAggregations_obdCommandedEVAP_args(ctx c return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_obdCommandedEVAP_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_obdCommandedEVAP_argsAgg( @@ -5224,6 +5930,24 @@ func (ec *executionContext) field_SignalAggregations_obdCommandedEVAP_argsAgg( return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_obdCommandedEVAP_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_obdDTCList_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5260,6 +5984,11 @@ func (ec *executionContext) field_SignalAggregations_obdDistanceSinceDTCClear_ar return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_obdDistanceSinceDTCClear_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_obdDistanceSinceDTCClear_argsAgg( @@ -5280,14 +6009,37 @@ func (ec *executionContext) field_SignalAggregations_obdDistanceSinceDTCClear_ar return zeroVal, nil } -func (ec *executionContext) field_SignalAggregations_obdDistanceWithMIL_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { - var err error - args := map[string]any{} - arg0, err := ec.field_SignalAggregations_obdDistanceWithMIL_argsAgg(ctx, rawArgs) - if err != nil { - return nil, err +func (ec *executionContext) field_SignalAggregations_obdDistanceSinceDTCClear_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + +func (ec *executionContext) field_SignalAggregations_obdDistanceWithMIL_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { + var err error + args := map[string]any{} + arg0, err := ec.field_SignalAggregations_obdDistanceWithMIL_argsAgg(ctx, rawArgs) + if err != nil { + return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_obdDistanceWithMIL_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_obdDistanceWithMIL_argsAgg( @@ -5308,6 +6060,24 @@ func (ec *executionContext) field_SignalAggregations_obdDistanceWithMIL_argsAgg( return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_obdDistanceWithMIL_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_obdEngineLoad_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5316,6 +6086,11 @@ func (ec *executionContext) field_SignalAggregations_obdEngineLoad_args(ctx cont return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_obdEngineLoad_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_obdEngineLoad_argsAgg( @@ -5336,6 +6111,24 @@ func (ec *executionContext) field_SignalAggregations_obdEngineLoad_argsAgg( return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_obdEngineLoad_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_obdFuelPressure_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5344,6 +6137,11 @@ func (ec *executionContext) field_SignalAggregations_obdFuelPressure_args(ctx co return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_obdFuelPressure_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_obdFuelPressure_argsAgg( @@ -5364,6 +6162,24 @@ func (ec *executionContext) field_SignalAggregations_obdFuelPressure_argsAgg( return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_obdFuelPressure_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_obdIntakeTemp_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5372,6 +6188,11 @@ func (ec *executionContext) field_SignalAggregations_obdIntakeTemp_args(ctx cont return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_obdIntakeTemp_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_obdIntakeTemp_argsAgg( @@ -5392,6 +6213,24 @@ func (ec *executionContext) field_SignalAggregations_obdIntakeTemp_argsAgg( return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_obdIntakeTemp_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_obdLongTermFuelTrim1_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5400,6 +6239,11 @@ func (ec *executionContext) field_SignalAggregations_obdLongTermFuelTrim1_args(c return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_obdLongTermFuelTrim1_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_obdLongTermFuelTrim1_argsAgg( @@ -5420,6 +6264,24 @@ func (ec *executionContext) field_SignalAggregations_obdLongTermFuelTrim1_argsAg return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_obdLongTermFuelTrim1_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_obdMAP_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5428,6 +6290,11 @@ func (ec *executionContext) field_SignalAggregations_obdMAP_args(ctx context.Con return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_obdMAP_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_obdMAP_argsAgg( @@ -5448,6 +6315,24 @@ func (ec *executionContext) field_SignalAggregations_obdMAP_argsAgg( return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_obdMAP_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_obdO2WRSensor1Voltage_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5456,6 +6341,11 @@ func (ec *executionContext) field_SignalAggregations_obdO2WRSensor1Voltage_args( return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_obdO2WRSensor1Voltage_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_obdO2WRSensor1Voltage_argsAgg( @@ -5476,6 +6366,24 @@ func (ec *executionContext) field_SignalAggregations_obdO2WRSensor1Voltage_argsA return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_obdO2WRSensor1Voltage_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_obdO2WRSensor2Voltage_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5484,6 +6392,11 @@ func (ec *executionContext) field_SignalAggregations_obdO2WRSensor2Voltage_args( return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_obdO2WRSensor2Voltage_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_obdO2WRSensor2Voltage_argsAgg( @@ -5504,6 +6417,24 @@ func (ec *executionContext) field_SignalAggregations_obdO2WRSensor2Voltage_argsA return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_obdO2WRSensor2Voltage_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_obdRunTime_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5512,6 +6443,11 @@ func (ec *executionContext) field_SignalAggregations_obdRunTime_args(ctx context return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_obdRunTime_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_obdRunTime_argsAgg( @@ -5532,6 +6468,24 @@ func (ec *executionContext) field_SignalAggregations_obdRunTime_argsAgg( return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_obdRunTime_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_obdShortTermFuelTrim1_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5540,6 +6494,11 @@ func (ec *executionContext) field_SignalAggregations_obdShortTermFuelTrim1_args( return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_obdShortTermFuelTrim1_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_obdShortTermFuelTrim1_argsAgg( @@ -5560,6 +6519,24 @@ func (ec *executionContext) field_SignalAggregations_obdShortTermFuelTrim1_argsA return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_obdShortTermFuelTrim1_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_obdWarmupsSinceDTCClear_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5568,6 +6545,11 @@ func (ec *executionContext) field_SignalAggregations_obdWarmupsSinceDTCClear_arg return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_obdWarmupsSinceDTCClear_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_obdWarmupsSinceDTCClear_argsAgg( @@ -5588,6 +6570,24 @@ func (ec *executionContext) field_SignalAggregations_obdWarmupsSinceDTCClear_arg return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_obdWarmupsSinceDTCClear_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineDieselExhaustFluidCapacity_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5596,6 +6596,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineD return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainCombustionEngineDieselExhaustFluidCapacity_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineDieselExhaustFluidCapacity_argsAgg( @@ -5616,6 +6621,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineD return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineDieselExhaustFluidCapacity_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineDieselExhaustFluidLevel_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5624,6 +6647,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineD return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainCombustionEngineDieselExhaustFluidLevel_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineDieselExhaustFluidLevel_argsAgg( @@ -5644,6 +6672,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineD return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineDieselExhaustFluidLevel_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineECT_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5652,6 +6698,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineE return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainCombustionEngineECT_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineECT_argsAgg( @@ -5672,6 +6723,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineE return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineECT_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineEOP_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5680,6 +6749,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineE return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainCombustionEngineEOP_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineEOP_argsAgg( @@ -5700,6 +6774,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineE return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineEOP_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineEOT_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5708,6 +6800,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineE return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainCombustionEngineEOT_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineEOT_argsAgg( @@ -5728,6 +6825,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineE return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineEOT_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineEngineOilLevel_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5764,6 +6879,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineE return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainCombustionEngineEngineOilRelativeLevel_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineEngineOilRelativeLevel_argsAgg( @@ -5784,6 +6904,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineE return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineEngineOilRelativeLevel_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineMAF_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5792,6 +6930,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineM return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainCombustionEngineMAF_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineMAF_argsAgg( @@ -5812,6 +6955,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineM return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineMAF_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineSpeed_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5820,6 +6981,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineS return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainCombustionEngineSpeed_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineSpeed_argsAgg( @@ -5840,6 +7006,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineS return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineSpeed_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineTPS_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5848,6 +7032,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineT return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainCombustionEngineTPS_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineTPS_argsAgg( @@ -5868,6 +7057,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineT return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineTPS_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineTorque_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5876,6 +7083,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineT return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainCombustionEngineTorque_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineTorque_argsAgg( @@ -5896,6 +7108,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineT return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainCombustionEngineTorque_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainFuelSystemAbsoluteLevel_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5904,6 +7134,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainFuelSystemAbsolut return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainFuelSystemAbsoluteLevel_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainFuelSystemAbsoluteLevel_argsAgg( @@ -5924,6 +7159,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainFuelSystemAbsolut return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainFuelSystemAbsoluteLevel_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainFuelSystemRelativeLevel_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5932,6 +7185,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainFuelSystemRelativ return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainFuelSystemRelativeLevel_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainFuelSystemRelativeLevel_argsAgg( @@ -5952,6 +7210,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainFuelSystemRelativ return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainFuelSystemRelativeLevel_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainFuelSystemSupportedFuelTypes_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -5988,6 +7264,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainRange_args(ctx co return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainRange_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainRange_argsAgg( @@ -6008,6 +7289,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainRange_argsAgg( return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainRange_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryChargingAddedEnergy_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -6016,6 +7315,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryCh return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainTractionBatteryChargingAddedEnergy_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryChargingAddedEnergy_argsAgg( @@ -6036,6 +7340,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryCh return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryChargingAddedEnergy_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryChargingChargeCurrentAC_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -6044,6 +7366,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryCh return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainTractionBatteryChargingChargeCurrentAC_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryChargingChargeCurrentAC_argsAgg( @@ -6064,6 +7391,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryCh return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryChargingChargeCurrentAC_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryChargingChargeLimit_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -6072,6 +7417,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryCh return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainTractionBatteryChargingChargeLimit_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryChargingChargeLimit_argsAgg( @@ -6092,6 +7442,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryCh return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryChargingChargeLimit_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryChargingChargeVoltageUnknownType_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -6100,6 +7468,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryCh return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainTractionBatteryChargingChargeVoltageUnknownType_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryChargingChargeVoltageUnknownType_argsAgg( @@ -6120,6 +7493,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryCh return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryChargingChargeVoltageUnknownType_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryChargingIsCharging_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -6128,6 +7519,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryCh return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainTractionBatteryChargingIsCharging_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryChargingIsCharging_argsAgg( @@ -6148,6 +7544,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryCh return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryChargingIsCharging_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryCurrentPower_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -6156,6 +7570,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryCu return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainTractionBatteryCurrentPower_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryCurrentPower_argsAgg( @@ -6176,6 +7595,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryCu return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryCurrentPower_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryCurrentVoltage_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -6184,6 +7621,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryCu return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainTractionBatteryCurrentVoltage_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryCurrentVoltage_argsAgg( @@ -6204,6 +7646,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryCu return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryCurrentVoltage_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryGrossCapacity_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -6212,6 +7672,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryGr return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainTractionBatteryGrossCapacity_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryGrossCapacity_argsAgg( @@ -6232,6 +7697,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryGr return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryGrossCapacity_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryRange_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -6240,6 +7723,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryRa return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainTractionBatteryRange_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryRange_argsAgg( @@ -6260,6 +7748,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryRa return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryRange_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryStateOfChargeCurrentEnergy_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -6268,6 +7774,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainTractionBatterySt return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainTractionBatteryStateOfChargeCurrentEnergy_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryStateOfChargeCurrentEnergy_argsAgg( @@ -6288,6 +7799,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainTractionBatterySt return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryStateOfChargeCurrentEnergy_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryStateOfChargeCurrent_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -6296,6 +7825,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainTractionBatterySt return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainTractionBatteryStateOfChargeCurrent_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryStateOfChargeCurrent_argsAgg( @@ -6316,6 +7850,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainTractionBatterySt return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryStateOfChargeCurrent_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryTemperatureAverage_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -6324,6 +7876,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryTe return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainTractionBatteryTemperatureAverage_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryTemperatureAverage_argsAgg( @@ -6344,6 +7901,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryTe return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainTractionBatteryTemperatureAverage_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainTransmissionCurrentGear_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -6352,6 +7927,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainTransmissionCurre return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainTransmissionCurrentGear_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainTransmissionCurrentGear_argsAgg( @@ -6372,6 +7952,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainTransmissionCurre return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainTransmissionCurrentGear_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainTransmissionTemperature_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -6380,6 +7978,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainTransmissionTempe return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainTransmissionTemperature_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainTransmissionTemperature_argsAgg( @@ -6400,6 +8003,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainTransmissionTempe return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainTransmissionTemperature_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainTransmissionTravelledDistance_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -6408,6 +8029,11 @@ func (ec *executionContext) field_SignalAggregations_powertrainTransmissionTrave return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_powertrainTransmissionTravelledDistance_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_powertrainTransmissionTravelledDistance_argsAgg( @@ -6428,6 +8054,24 @@ func (ec *executionContext) field_SignalAggregations_powertrainTransmissionTrave return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_powertrainTransmissionTravelledDistance_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_powertrainType_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -6464,6 +8108,11 @@ func (ec *executionContext) field_SignalAggregations_serviceDistanceToService_ar return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_serviceDistanceToService_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_serviceDistanceToService_argsAgg( @@ -6484,6 +8133,24 @@ func (ec *executionContext) field_SignalAggregations_serviceDistanceToService_ar return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_serviceDistanceToService_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_speed_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -6492,6 +8159,11 @@ func (ec *executionContext) field_SignalAggregations_speed_args(ctx context.Cont return nil, err } args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_speed_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 return args, nil } func (ec *executionContext) field_SignalAggregations_speed_argsAgg( @@ -6512,6 +8184,24 @@ func (ec *executionContext) field_SignalAggregations_speed_argsAgg( return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_speed_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalFloatFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalFloatFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, tmp) + } + + var zeroVal *model.SignalFloatFilter + return zeroVal, nil +} + func (ec *executionContext) field___Directive_args_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -8580,7 +10270,7 @@ func (ec *executionContext) _SignalAggregations_angularVelocityYaw(ctx context.C resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().AngularVelocityYaw(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().AngularVelocityYaw(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -8673,7 +10363,7 @@ func (ec *executionContext) _SignalAggregations_cabinDoorRow1DriverSideIsOpen(ct resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().CabinDoorRow1DriverSideIsOpen(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().CabinDoorRow1DriverSideIsOpen(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -8766,7 +10456,7 @@ func (ec *executionContext) _SignalAggregations_cabinDoorRow1DriverSideWindowIsO resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().CabinDoorRow1DriverSideWindowIsOpen(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().CabinDoorRow1DriverSideWindowIsOpen(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -8859,7 +10549,7 @@ func (ec *executionContext) _SignalAggregations_cabinDoorRow1PassengerSideIsOpen resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().CabinDoorRow1PassengerSideIsOpen(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().CabinDoorRow1PassengerSideIsOpen(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -8952,7 +10642,7 @@ func (ec *executionContext) _SignalAggregations_cabinDoorRow1PassengerSideWindow resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().CabinDoorRow1PassengerSideWindowIsOpen(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().CabinDoorRow1PassengerSideWindowIsOpen(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -9045,7 +10735,7 @@ func (ec *executionContext) _SignalAggregations_cabinDoorRow2DriverSideIsOpen(ct resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().CabinDoorRow2DriverSideIsOpen(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().CabinDoorRow2DriverSideIsOpen(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -9138,7 +10828,7 @@ func (ec *executionContext) _SignalAggregations_cabinDoorRow2DriverSideWindowIsO resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().CabinDoorRow2DriverSideWindowIsOpen(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().CabinDoorRow2DriverSideWindowIsOpen(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -9231,7 +10921,7 @@ func (ec *executionContext) _SignalAggregations_cabinDoorRow2PassengerSideIsOpen resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().CabinDoorRow2PassengerSideIsOpen(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().CabinDoorRow2PassengerSideIsOpen(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -9324,7 +11014,7 @@ func (ec *executionContext) _SignalAggregations_cabinDoorRow2PassengerSideWindow resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().CabinDoorRow2PassengerSideWindowIsOpen(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().CabinDoorRow2PassengerSideWindowIsOpen(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -9417,7 +11107,7 @@ func (ec *executionContext) _SignalAggregations_chassisAxleRow1WheelLeftSpeed(ct resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().ChassisAxleRow1WheelLeftSpeed(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().ChassisAxleRow1WheelLeftSpeed(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -9510,7 +11200,7 @@ func (ec *executionContext) _SignalAggregations_chassisAxleRow1WheelLeftTirePres resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().ChassisAxleRow1WheelLeftTirePressure(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().ChassisAxleRow1WheelLeftTirePressure(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -9603,7 +11293,7 @@ func (ec *executionContext) _SignalAggregations_chassisAxleRow1WheelRightSpeed(c resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().ChassisAxleRow1WheelRightSpeed(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().ChassisAxleRow1WheelRightSpeed(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -9696,7 +11386,7 @@ func (ec *executionContext) _SignalAggregations_chassisAxleRow1WheelRightTirePre resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().ChassisAxleRow1WheelRightTirePressure(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().ChassisAxleRow1WheelRightTirePressure(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -9789,7 +11479,7 @@ func (ec *executionContext) _SignalAggregations_chassisAxleRow2WheelLeftTirePres resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().ChassisAxleRow2WheelLeftTirePressure(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().ChassisAxleRow2WheelLeftTirePressure(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -9882,7 +11572,7 @@ func (ec *executionContext) _SignalAggregations_chassisAxleRow2WheelRightTirePre resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().ChassisAxleRow2WheelRightTirePressure(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().ChassisAxleRow2WheelRightTirePressure(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -9975,7 +11665,7 @@ func (ec *executionContext) _SignalAggregations_currentLocationAltitude(ctx cont resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().CurrentLocationAltitude(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().CurrentLocationAltitude(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -10068,7 +11758,7 @@ func (ec *executionContext) _SignalAggregations_currentLocationHeading(ctx conte resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().CurrentLocationHeading(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().CurrentLocationHeading(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -10161,7 +11851,7 @@ func (ec *executionContext) _SignalAggregations_currentLocationIsRedacted(ctx co resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().CurrentLocationIsRedacted(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().CurrentLocationIsRedacted(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -10254,7 +11944,7 @@ func (ec *executionContext) _SignalAggregations_currentLocationLatitude(ctx cont resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().CurrentLocationLatitude(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().CurrentLocationLatitude(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -10347,7 +12037,7 @@ func (ec *executionContext) _SignalAggregations_currentLocationLongitude(ctx con resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().CurrentLocationLongitude(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().CurrentLocationLongitude(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -10440,7 +12130,7 @@ func (ec *executionContext) _SignalAggregations_dimoAftermarketHDOP(ctx context. resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().DimoAftermarketHdop(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().DimoAftermarketHdop(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -10533,7 +12223,7 @@ func (ec *executionContext) _SignalAggregations_dimoAftermarketNSAT(ctx context. resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().DimoAftermarketNsat(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().DimoAftermarketNsat(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -10812,7 +12502,7 @@ func (ec *executionContext) _SignalAggregations_exteriorAirTemperature(ctx conte resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().ExteriorAirTemperature(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().ExteriorAirTemperature(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -10905,7 +12595,7 @@ func (ec *executionContext) _SignalAggregations_isIgnitionOn(ctx context.Context resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().IsIgnitionOn(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().IsIgnitionOn(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -10998,7 +12688,7 @@ func (ec *executionContext) _SignalAggregations_lowVoltageBatteryCurrentVoltage( resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().LowVoltageBatteryCurrentVoltage(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().LowVoltageBatteryCurrentVoltage(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -11091,7 +12781,7 @@ func (ec *executionContext) _SignalAggregations_obdBarometricPressure(ctx contex resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().ObdBarometricPressure(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().ObdBarometricPressure(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -11184,7 +12874,7 @@ func (ec *executionContext) _SignalAggregations_obdCommandedEGR(ctx context.Cont resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().ObdCommandedEgr(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().ObdCommandedEgr(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -11277,7 +12967,7 @@ func (ec *executionContext) _SignalAggregations_obdCommandedEVAP(ctx context.Con resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().ObdCommandedEvap(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().ObdCommandedEvap(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -11463,7 +13153,7 @@ func (ec *executionContext) _SignalAggregations_obdDistanceSinceDTCClear(ctx con resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().ObdDistanceSinceDTCClear(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().ObdDistanceSinceDTCClear(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -11556,7 +13246,7 @@ func (ec *executionContext) _SignalAggregations_obdDistanceWithMIL(ctx context.C resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().ObdDistanceWithMil(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().ObdDistanceWithMil(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -11649,7 +13339,7 @@ func (ec *executionContext) _SignalAggregations_obdEngineLoad(ctx context.Contex resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().ObdEngineLoad(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().ObdEngineLoad(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -11742,7 +13432,7 @@ func (ec *executionContext) _SignalAggregations_obdFuelPressure(ctx context.Cont resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().ObdFuelPressure(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().ObdFuelPressure(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -11835,7 +13525,7 @@ func (ec *executionContext) _SignalAggregations_obdIntakeTemp(ctx context.Contex resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().ObdIntakeTemp(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().ObdIntakeTemp(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -11928,7 +13618,7 @@ func (ec *executionContext) _SignalAggregations_obdLongTermFuelTrim1(ctx context resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().ObdLongTermFuelTrim1(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().ObdLongTermFuelTrim1(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -12021,7 +13711,7 @@ func (ec *executionContext) _SignalAggregations_obdMAP(ctx context.Context, fiel resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().ObdMap(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().ObdMap(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -12114,7 +13804,7 @@ func (ec *executionContext) _SignalAggregations_obdO2WRSensor1Voltage(ctx contex resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().ObdO2WRSensor1Voltage(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().ObdO2WRSensor1Voltage(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -12207,7 +13897,7 @@ func (ec *executionContext) _SignalAggregations_obdO2WRSensor2Voltage(ctx contex resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().ObdO2WRSensor2Voltage(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().ObdO2WRSensor2Voltage(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -12300,7 +13990,7 @@ func (ec *executionContext) _SignalAggregations_obdRunTime(ctx context.Context, resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().ObdRunTime(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().ObdRunTime(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -12393,7 +14083,7 @@ func (ec *executionContext) _SignalAggregations_obdShortTermFuelTrim1(ctx contex resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().ObdShortTermFuelTrim1(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().ObdShortTermFuelTrim1(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -12486,7 +14176,7 @@ func (ec *executionContext) _SignalAggregations_obdWarmupsSinceDTCClear(ctx cont resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().ObdWarmupsSinceDTCClear(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().ObdWarmupsSinceDTCClear(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -12579,7 +14269,7 @@ func (ec *executionContext) _SignalAggregations_powertrainCombustionEngineDiesel resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainCombustionEngineDieselExhaustFluidCapacity(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainCombustionEngineDieselExhaustFluidCapacity(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -12672,7 +14362,7 @@ func (ec *executionContext) _SignalAggregations_powertrainCombustionEngineDiesel resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainCombustionEngineDieselExhaustFluidLevel(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainCombustionEngineDieselExhaustFluidLevel(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -12765,7 +14455,7 @@ func (ec *executionContext) _SignalAggregations_powertrainCombustionEngineECT(ct resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainCombustionEngineEct(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainCombustionEngineEct(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -12858,7 +14548,7 @@ func (ec *executionContext) _SignalAggregations_powertrainCombustionEngineEOP(ct resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainCombustionEngineEop(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainCombustionEngineEop(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -12951,7 +14641,7 @@ func (ec *executionContext) _SignalAggregations_powertrainCombustionEngineEOT(ct resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainCombustionEngineEot(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainCombustionEngineEot(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -13137,7 +14827,7 @@ func (ec *executionContext) _SignalAggregations_powertrainCombustionEngineEngine resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainCombustionEngineEngineOilRelativeLevel(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainCombustionEngineEngineOilRelativeLevel(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -13230,7 +14920,7 @@ func (ec *executionContext) _SignalAggregations_powertrainCombustionEngineMAF(ct resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainCombustionEngineMaf(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainCombustionEngineMaf(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -13323,7 +15013,7 @@ func (ec *executionContext) _SignalAggregations_powertrainCombustionEngineSpeed( resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainCombustionEngineSpeed(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainCombustionEngineSpeed(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -13416,7 +15106,7 @@ func (ec *executionContext) _SignalAggregations_powertrainCombustionEngineTPS(ct resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainCombustionEngineTps(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainCombustionEngineTps(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -13509,7 +15199,7 @@ func (ec *executionContext) _SignalAggregations_powertrainCombustionEngineTorque resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainCombustionEngineTorque(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainCombustionEngineTorque(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -13602,7 +15292,7 @@ func (ec *executionContext) _SignalAggregations_powertrainFuelSystemAbsoluteLeve resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainFuelSystemAbsoluteLevel(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainFuelSystemAbsoluteLevel(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -13695,7 +15385,7 @@ func (ec *executionContext) _SignalAggregations_powertrainFuelSystemRelativeLeve resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainFuelSystemRelativeLevel(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainFuelSystemRelativeLevel(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -13881,7 +15571,7 @@ func (ec *executionContext) _SignalAggregations_powertrainRange(ctx context.Cont resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainRange(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainRange(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -13974,7 +15664,7 @@ func (ec *executionContext) _SignalAggregations_powertrainTractionBatteryChargin resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainTractionBatteryChargingAddedEnergy(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainTractionBatteryChargingAddedEnergy(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -14067,7 +15757,7 @@ func (ec *executionContext) _SignalAggregations_powertrainTractionBatteryChargin resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainTractionBatteryChargingChargeCurrentAc(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainTractionBatteryChargingChargeCurrentAc(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -14160,7 +15850,7 @@ func (ec *executionContext) _SignalAggregations_powertrainTractionBatteryChargin resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainTractionBatteryChargingChargeLimit(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainTractionBatteryChargingChargeLimit(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -14253,7 +15943,7 @@ func (ec *executionContext) _SignalAggregations_powertrainTractionBatteryChargin resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainTractionBatteryChargingChargeVoltageUnknownType(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainTractionBatteryChargingChargeVoltageUnknownType(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -14346,7 +16036,7 @@ func (ec *executionContext) _SignalAggregations_powertrainTractionBatteryChargin resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainTractionBatteryChargingIsCharging(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainTractionBatteryChargingIsCharging(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -14439,7 +16129,7 @@ func (ec *executionContext) _SignalAggregations_powertrainTractionBatteryCurrent resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainTractionBatteryCurrentPower(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainTractionBatteryCurrentPower(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -14532,7 +16222,7 @@ func (ec *executionContext) _SignalAggregations_powertrainTractionBatteryCurrent resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainTractionBatteryCurrentVoltage(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainTractionBatteryCurrentVoltage(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -14625,7 +16315,7 @@ func (ec *executionContext) _SignalAggregations_powertrainTractionBatteryGrossCa resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainTractionBatteryGrossCapacity(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainTractionBatteryGrossCapacity(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -14718,7 +16408,7 @@ func (ec *executionContext) _SignalAggregations_powertrainTractionBatteryRange(c resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainTractionBatteryRange(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainTractionBatteryRange(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -14811,7 +16501,7 @@ func (ec *executionContext) _SignalAggregations_powertrainTractionBatteryStateOf resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainTractionBatteryStateOfChargeCurrent(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainTractionBatteryStateOfChargeCurrent(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -14904,7 +16594,7 @@ func (ec *executionContext) _SignalAggregations_powertrainTractionBatteryStateOf resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainTractionBatteryStateOfChargeCurrentEnergy(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainTractionBatteryStateOfChargeCurrentEnergy(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -14997,7 +16687,7 @@ func (ec *executionContext) _SignalAggregations_powertrainTractionBatteryTempera resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainTractionBatteryTemperatureAverage(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainTractionBatteryTemperatureAverage(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -15090,7 +16780,7 @@ func (ec *executionContext) _SignalAggregations_powertrainTransmissionCurrentGea resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainTransmissionCurrentGear(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainTransmissionCurrentGear(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -15183,7 +16873,7 @@ func (ec *executionContext) _SignalAggregations_powertrainTransmissionTemperatur resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainTransmissionTemperature(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainTransmissionTemperature(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -15276,7 +16966,7 @@ func (ec *executionContext) _SignalAggregations_powertrainTransmissionTravelledD resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().PowertrainTransmissionTravelledDistance(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().PowertrainTransmissionTravelledDistance(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -15462,7 +17152,7 @@ func (ec *executionContext) _SignalAggregations_serviceDistanceToService(ctx con resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().ServiceDistanceToService(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().ServiceDistanceToService(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -15555,7 +17245,7 @@ func (ec *executionContext) _SignalAggregations_speed(ctx context.Context, field resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { directive0 := func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignalAggregations().Speed(rctx, obj, fc.Args["agg"].(model.FloatAggregation)) + return ec.resolvers.SignalAggregations().Speed(rctx, obj, fc.Args["agg"].(model.FloatAggregation), fc.Args["filter"].(*model.SignalFloatFilter)) } directive1 := func(ctx context.Context) (any, error) { @@ -24628,6 +26318,54 @@ func (ec *executionContext) unmarshalInputSignalFilter(ctx context.Context, obj return it, nil } +func (ec *executionContext) unmarshalInputSignalFloatFilter(ctx context.Context, obj any) (model.SignalFloatFilter, error) { + var it model.SignalFloatFilter + asMap := map[string]any{} + for k, v := range obj.(map[string]any) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"gt", "lt", "gte", "lte"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "gt": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gt")) + data, err := ec.unmarshalOFloat2ᚖfloat64(ctx, v) + if err != nil { + return it, err + } + it.Gt = data + case "lt": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("lt")) + data, err := ec.unmarshalOFloat2ᚖfloat64(ctx, v) + if err != nil { + return it, err + } + it.Lt = data + case "gte": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gte")) + data, err := ec.unmarshalOFloat2ᚖfloat64(ctx, v) + if err != nil { + return it, err + } + it.Gte = data + case "lte": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("lte")) + data, err := ec.unmarshalOFloat2ᚖfloat64(ctx, v) + if err != nil { + return it, err + } + it.Lte = data + } + } + + return it, nil +} + // endregion **************************** input.gotpl ***************************** // region ************************** interface.gotpl *************************** @@ -28936,6 +30674,14 @@ func (ec *executionContext) marshalOSignalFloat2ᚖgithubᚗcomᚋDIMOᚑNetwork return ec._SignalFloat(ctx, sel, v) } +func (ec *executionContext) unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx context.Context, v any) (*model.SignalFloatFilter, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputSignalFloatFilter(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + func (ec *executionContext) marshalOSignalString2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalString(ctx context.Context, sel ast.SelectionSet, v *model.SignalString) graphql.Marshaler { if v == nil { return graphql.Null diff --git a/internal/graph/model/models_gen.go b/internal/graph/model/models_gen.go index 851567b4..f3f339d1 100644 --- a/internal/graph/model/models_gen.go +++ b/internal/graph/model/models_gen.go @@ -394,6 +394,13 @@ type SignalFloat struct { Value float64 `json:"value"` } +type SignalFloatFilter struct { + Gt *float64 `json:"gt,omitempty"` + Lt *float64 `json:"lt,omitempty"` + Gte *float64 `json:"gte,omitempty"` + Lte *float64 `json:"lte,omitempty"` +} + type SignalString struct { // timestamp of when this data was colllected Timestamp time.Time `json:"timestamp"` diff --git a/internal/graph/model/signalArgs.go b/internal/graph/model/signalArgs.go index 7f463438..265c4cd9 100644 --- a/internal/graph/model/signalArgs.go +++ b/internal/graph/model/signalArgs.go @@ -40,17 +40,25 @@ type AggregatedSignalArgs struct { // Interval in which the data is aggregated in milliseconds. Interval int64 // FloatArgs represents arguments for each float signal. - FloatArgs map[FloatSignalArgs]struct{} + // Handle -> Args + FloatArgs map[string]FloatSignalArgs // StringArgs represents arguments for each string signal. - StringArgs map[StringSignalArgs]struct{} + // Handle -> Args + StringArgs map[string]StringSignalArgs + + AliasToHandle map[string]string } // FloatSignalArgs is the arguments for querying a float signals. type FloatSignalArgs struct { - // Name is the signal name. + // Name is the signal name. This is the field name in the API. Name string // Agg is the aggregation type. Agg FloatAggregation + + QueryHandle string + + Filter *SignalFloatFilter } // StringSignalArgs is the arguments for querying a string signals. @@ -59,4 +67,6 @@ type StringSignalArgs struct { Name string // Agg is the aggregation type. Agg StringAggregation + + QueryHandle string } diff --git a/internal/graph/model/signalSetter.tmpl b/internal/graph/model/signalSetter.tmpl index fdb0d4f9..06c6bbd6 100644 --- a/internal/graph/model/signalSetter.tmpl +++ b/internal/graph/model/signalSetter.tmpl @@ -23,19 +23,3 @@ func SetCollectionField(collection *SignalCollection, signal *vss.Signal) { {{- end }} } } -// SetAggregationField find the matching field based on the signal name and set the value based on the signal value. -func SetAggregationField(aggregations *SignalAggregations, signal *AggSignal) { - if aggregations == nil || signal == nil { - return - } - switch signal.Name { -{{- range .Signals }} - case "{{ .JSONName }}": - {{- if eq .GQLType "Float" }} - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - {{- else }} - aggregations.ValueStrings[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueString - {{- end }} -{{- end }} - } -} \ No newline at end of file diff --git a/internal/graph/model/signalSetter_gen.go b/internal/graph/model/signalSetter_gen.go index 29f6359c..4e32f3b9 100644 --- a/internal/graph/model/signalSetter_gen.go +++ b/internal/graph/model/signalSetter_gen.go @@ -391,164 +391,3 @@ func SetCollectionField(collection *SignalCollection, signal *vss.Signal) { } } } - -// SetAggregationField find the matching field based on the signal name and set the value based on the signal value. -func SetAggregationField(aggregations *SignalAggregations, signal *AggSignal) { - if aggregations == nil || signal == nil { - return - } - switch signal.Name { - case "angularVelocityYaw": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "cabinDoorRow1DriverSideIsOpen": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "cabinDoorRow1DriverSideWindowIsOpen": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "cabinDoorRow1PassengerSideIsOpen": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "cabinDoorRow1PassengerSideWindowIsOpen": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "cabinDoorRow2DriverSideIsOpen": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "cabinDoorRow2DriverSideWindowIsOpen": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "cabinDoorRow2PassengerSideIsOpen": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "cabinDoorRow2PassengerSideWindowIsOpen": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "chassisAxleRow1WheelLeftSpeed": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "chassisAxleRow1WheelLeftTirePressure": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "chassisAxleRow1WheelRightSpeed": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "chassisAxleRow1WheelRightTirePressure": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "chassisAxleRow2WheelLeftTirePressure": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "chassisAxleRow2WheelRightTirePressure": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "currentLocationAltitude": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "currentLocationHeading": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "currentLocationIsRedacted": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "currentLocationLatitude": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "currentLocationLongitude": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "dimoAftermarketHDOP": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "dimoAftermarketNSAT": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "dimoAftermarketSSID": - aggregations.ValueStrings[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueString - case "dimoAftermarketWPAState": - aggregations.ValueStrings[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueString - case "exteriorAirTemperature": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "isIgnitionOn": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "lowVoltageBatteryCurrentVoltage": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "obdBarometricPressure": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "obdCommandedEGR": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "obdCommandedEVAP": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "obdDTCList": - aggregations.ValueStrings[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueString - case "obdDistanceSinceDTCClear": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "obdDistanceWithMIL": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "obdEngineLoad": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "obdFuelPressure": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "obdIntakeTemp": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "obdLongTermFuelTrim1": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "obdMAP": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "obdO2WRSensor1Voltage": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "obdO2WRSensor2Voltage": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "obdRunTime": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "obdShortTermFuelTrim1": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "obdWarmupsSinceDTCClear": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainCombustionEngineDieselExhaustFluidCapacity": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainCombustionEngineDieselExhaustFluidLevel": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainCombustionEngineECT": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainCombustionEngineEOP": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainCombustionEngineEOT": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainCombustionEngineEngineOilLevel": - aggregations.ValueStrings[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueString - case "powertrainCombustionEngineEngineOilRelativeLevel": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainCombustionEngineMAF": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainCombustionEngineSpeed": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainCombustionEngineTPS": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainCombustionEngineTorque": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainFuelSystemAbsoluteLevel": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainFuelSystemRelativeLevel": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainFuelSystemSupportedFuelTypes": - aggregations.ValueStrings[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueString - case "powertrainRange": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainTractionBatteryChargingAddedEnergy": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainTractionBatteryChargingChargeCurrentAC": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainTractionBatteryChargingChargeLimit": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainTractionBatteryChargingChargeVoltageUnknownType": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainTractionBatteryChargingIsCharging": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainTractionBatteryCurrentPower": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainTractionBatteryCurrentVoltage": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainTractionBatteryGrossCapacity": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainTractionBatteryRange": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainTractionBatteryStateOfChargeCurrent": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainTractionBatteryStateOfChargeCurrentEnergy": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainTractionBatteryTemperatureAverage": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainTransmissionCurrentGear": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainTransmissionTemperature": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainTransmissionTravelledDistance": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "powertrainType": - aggregations.ValueStrings[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueString - case "serviceDistanceToService": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - case "speed": - aggregations.ValueNumbers[AliasKey{Name: signal.Name, Agg: signal.Agg}] = signal.ValueNumber - } -} diff --git a/internal/graph/model/signal_aggs.go b/internal/graph/model/signal_aggs.go index cdb713b4..661a4de9 100644 --- a/internal/graph/model/signal_aggs.go +++ b/internal/graph/model/signal_aggs.go @@ -15,16 +15,23 @@ type AliasKey struct { type SignalAggregations struct { Timestamp time.Time `json:"timestamp"` - ValueNumbers map[AliasKey]float64 `json:"-"` - ValueStrings map[AliasKey]string `json:"-"` + // Alias to value + ValueNumbers map[string]float64 `json:"-"` + ValueStrings map[string]string `json:"-"` + + SignalArgs *AggregatedSignalArgs `json:"-"` +} + +type FieldInfo struct { + Alias string + Name string } // AggSignal holds the value of an aggregation for a signal in a certain // time bucket. Only one of ValueNumber and ValueString contains a meaningful // value, determined by Name. type AggSignal struct { - Name string - Agg string + Handle string Timestamp time.Time ValueNumber float64 ValueString string diff --git a/internal/graph/model/tmp.go b/internal/graph/model/tmp.go new file mode 100644 index 00000000..b126ba17 --- /dev/null +++ b/internal/graph/model/tmp.go @@ -0,0 +1,12 @@ +package model + +func SetAggregationField(aggregations *SignalAggregations, signal *AggSignal) { + if _, ok := aggregations.SignalArgs.FloatArgs[signal.Handle]; ok { + aggregations.ValueNumbers[signal.Handle] = signal.ValueNumber + return + } + if _, ok := aggregations.SignalArgs.FloatArgs[signal.Handle]; ok { + aggregations.ValueStrings[signal.Handle] = signal.ValueString + return + } +} diff --git a/internal/graph/resolver.go b/internal/graph/resolver.go index 9d587968..9660edf6 100644 --- a/internal/graph/resolver.go +++ b/internal/graph/resolver.go @@ -1,7 +1,6 @@ package graph import ( - "github.com/DIMO-Network/model-garage/pkg/vss" "github.com/DIMO-Network/telemetry-api/internal/graph/model" "github.com/DIMO-Network/telemetry-api/internal/repositories" "github.com/DIMO-Network/telemetry-api/internal/repositories/attestation" @@ -22,13 +21,14 @@ type Resolver struct { } func approximateLocationSignalAggregations(obj *model.SignalAggregations, agg model.FloatAggregation) (*h3.LatLng, bool) { - latVal, ok := obj.ValueNumbers[model.AliasKey{Name: vss.FieldCurrentLocationLatitude, Agg: agg.String()}] - if !ok { - return nil, false - } - lngVal, ok := obj.ValueNumbers[model.AliasKey{Name: vss.FieldCurrentLocationLongitude, Agg: agg.String()}] - if !ok { - return nil, false - } - return repositories.GetApproximateLoc(latVal, lngVal), true + return nil, false + // latVal, ok := obj.ValueNumbers[model.AliasKey{Name: vss.FieldCurrentLocationLatitude, Agg: agg.String()}] + // if !ok { + // return nil, false + // } + // lngVal, ok := obj.ValueNumbers[model.AliasKey{Name: vss.FieldCurrentLocationLongitude, Agg: agg.String()}] + // if !ok { + // return nil, false + // } + // return repositories.GetApproximateLoc(latVal, lngVal), true } diff --git a/internal/graph/signals_gen.resolvers.go b/internal/graph/signals_gen.resolvers.go index 0b6d4323..3777d7cb 100644 --- a/internal/graph/signals_gen.resolvers.go +++ b/internal/graph/signals_gen.resolvers.go @@ -7,12 +7,14 @@ package graph import ( "context" + "github.com/99designs/gqlgen/graphql" "github.com/DIMO-Network/telemetry-api/internal/graph/model" ) // AngularVelocityYaw is the resolver for the angularVelocityYaw -func (r *signalAggregationsResolver) AngularVelocityYaw(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "angularVelocityYaw", Agg: agg.String()}] +func (r *signalAggregationsResolver) AngularVelocityYaw(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -20,8 +22,9 @@ func (r *signalAggregationsResolver) AngularVelocityYaw(ctx context.Context, obj } // CabinDoorRow1DriverSideIsOpen is the resolver for the cabinDoorRow1DriverSideIsOpen -func (r *signalAggregationsResolver) CabinDoorRow1DriverSideIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "cabinDoorRow1DriverSideIsOpen", Agg: agg.String()}] +func (r *signalAggregationsResolver) CabinDoorRow1DriverSideIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -29,8 +32,9 @@ func (r *signalAggregationsResolver) CabinDoorRow1DriverSideIsOpen(ctx context.C } // CabinDoorRow1DriverSideWindowIsOpen is the resolver for the cabinDoorRow1DriverSideWindowIsOpen -func (r *signalAggregationsResolver) CabinDoorRow1DriverSideWindowIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "cabinDoorRow1DriverSideWindowIsOpen", Agg: agg.String()}] +func (r *signalAggregationsResolver) CabinDoorRow1DriverSideWindowIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -38,8 +42,9 @@ func (r *signalAggregationsResolver) CabinDoorRow1DriverSideWindowIsOpen(ctx con } // CabinDoorRow1PassengerSideIsOpen is the resolver for the cabinDoorRow1PassengerSideIsOpen -func (r *signalAggregationsResolver) CabinDoorRow1PassengerSideIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "cabinDoorRow1PassengerSideIsOpen", Agg: agg.String()}] +func (r *signalAggregationsResolver) CabinDoorRow1PassengerSideIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -47,8 +52,9 @@ func (r *signalAggregationsResolver) CabinDoorRow1PassengerSideIsOpen(ctx contex } // CabinDoorRow1PassengerSideWindowIsOpen is the resolver for the cabinDoorRow1PassengerSideWindowIsOpen -func (r *signalAggregationsResolver) CabinDoorRow1PassengerSideWindowIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "cabinDoorRow1PassengerSideWindowIsOpen", Agg: agg.String()}] +func (r *signalAggregationsResolver) CabinDoorRow1PassengerSideWindowIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -56,8 +62,9 @@ func (r *signalAggregationsResolver) CabinDoorRow1PassengerSideWindowIsOpen(ctx } // CabinDoorRow2DriverSideIsOpen is the resolver for the cabinDoorRow2DriverSideIsOpen -func (r *signalAggregationsResolver) CabinDoorRow2DriverSideIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "cabinDoorRow2DriverSideIsOpen", Agg: agg.String()}] +func (r *signalAggregationsResolver) CabinDoorRow2DriverSideIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -65,8 +72,9 @@ func (r *signalAggregationsResolver) CabinDoorRow2DriverSideIsOpen(ctx context.C } // CabinDoorRow2DriverSideWindowIsOpen is the resolver for the cabinDoorRow2DriverSideWindowIsOpen -func (r *signalAggregationsResolver) CabinDoorRow2DriverSideWindowIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "cabinDoorRow2DriverSideWindowIsOpen", Agg: agg.String()}] +func (r *signalAggregationsResolver) CabinDoorRow2DriverSideWindowIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -74,8 +82,9 @@ func (r *signalAggregationsResolver) CabinDoorRow2DriverSideWindowIsOpen(ctx con } // CabinDoorRow2PassengerSideIsOpen is the resolver for the cabinDoorRow2PassengerSideIsOpen -func (r *signalAggregationsResolver) CabinDoorRow2PassengerSideIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "cabinDoorRow2PassengerSideIsOpen", Agg: agg.String()}] +func (r *signalAggregationsResolver) CabinDoorRow2PassengerSideIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -83,8 +92,9 @@ func (r *signalAggregationsResolver) CabinDoorRow2PassengerSideIsOpen(ctx contex } // CabinDoorRow2PassengerSideWindowIsOpen is the resolver for the cabinDoorRow2PassengerSideWindowIsOpen -func (r *signalAggregationsResolver) CabinDoorRow2PassengerSideWindowIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "cabinDoorRow2PassengerSideWindowIsOpen", Agg: agg.String()}] +func (r *signalAggregationsResolver) CabinDoorRow2PassengerSideWindowIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -92,8 +102,9 @@ func (r *signalAggregationsResolver) CabinDoorRow2PassengerSideWindowIsOpen(ctx } // ChassisAxleRow1WheelLeftSpeed is the resolver for the chassisAxleRow1WheelLeftSpeed -func (r *signalAggregationsResolver) ChassisAxleRow1WheelLeftSpeed(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "chassisAxleRow1WheelLeftSpeed", Agg: agg.String()}] +func (r *signalAggregationsResolver) ChassisAxleRow1WheelLeftSpeed(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -101,8 +112,9 @@ func (r *signalAggregationsResolver) ChassisAxleRow1WheelLeftSpeed(ctx context.C } // ChassisAxleRow1WheelLeftTirePressure is the resolver for the chassisAxleRow1WheelLeftTirePressure -func (r *signalAggregationsResolver) ChassisAxleRow1WheelLeftTirePressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "chassisAxleRow1WheelLeftTirePressure", Agg: agg.String()}] +func (r *signalAggregationsResolver) ChassisAxleRow1WheelLeftTirePressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -110,8 +122,9 @@ func (r *signalAggregationsResolver) ChassisAxleRow1WheelLeftTirePressure(ctx co } // ChassisAxleRow1WheelRightSpeed is the resolver for the chassisAxleRow1WheelRightSpeed -func (r *signalAggregationsResolver) ChassisAxleRow1WheelRightSpeed(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "chassisAxleRow1WheelRightSpeed", Agg: agg.String()}] +func (r *signalAggregationsResolver) ChassisAxleRow1WheelRightSpeed(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -119,8 +132,9 @@ func (r *signalAggregationsResolver) ChassisAxleRow1WheelRightSpeed(ctx context. } // ChassisAxleRow1WheelRightTirePressure is the resolver for the chassisAxleRow1WheelRightTirePressure -func (r *signalAggregationsResolver) ChassisAxleRow1WheelRightTirePressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "chassisAxleRow1WheelRightTirePressure", Agg: agg.String()}] +func (r *signalAggregationsResolver) ChassisAxleRow1WheelRightTirePressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -128,8 +142,9 @@ func (r *signalAggregationsResolver) ChassisAxleRow1WheelRightTirePressure(ctx c } // ChassisAxleRow2WheelLeftTirePressure is the resolver for the chassisAxleRow2WheelLeftTirePressure -func (r *signalAggregationsResolver) ChassisAxleRow2WheelLeftTirePressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "chassisAxleRow2WheelLeftTirePressure", Agg: agg.String()}] +func (r *signalAggregationsResolver) ChassisAxleRow2WheelLeftTirePressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -137,8 +152,9 @@ func (r *signalAggregationsResolver) ChassisAxleRow2WheelLeftTirePressure(ctx co } // ChassisAxleRow2WheelRightTirePressure is the resolver for the chassisAxleRow2WheelRightTirePressure -func (r *signalAggregationsResolver) ChassisAxleRow2WheelRightTirePressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "chassisAxleRow2WheelRightTirePressure", Agg: agg.String()}] +func (r *signalAggregationsResolver) ChassisAxleRow2WheelRightTirePressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -146,8 +162,9 @@ func (r *signalAggregationsResolver) ChassisAxleRow2WheelRightTirePressure(ctx c } // CurrentLocationAltitude is the resolver for the currentLocationAltitude -func (r *signalAggregationsResolver) CurrentLocationAltitude(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "currentLocationAltitude", Agg: agg.String()}] +func (r *signalAggregationsResolver) CurrentLocationAltitude(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -155,8 +172,9 @@ func (r *signalAggregationsResolver) CurrentLocationAltitude(ctx context.Context } // CurrentLocationHeading is the resolver for the currentLocationHeading -func (r *signalAggregationsResolver) CurrentLocationHeading(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "currentLocationHeading", Agg: agg.String()}] +func (r *signalAggregationsResolver) CurrentLocationHeading(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -164,8 +182,9 @@ func (r *signalAggregationsResolver) CurrentLocationHeading(ctx context.Context, } // CurrentLocationIsRedacted is the resolver for the currentLocationIsRedacted -func (r *signalAggregationsResolver) CurrentLocationIsRedacted(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "currentLocationIsRedacted", Agg: agg.String()}] +func (r *signalAggregationsResolver) CurrentLocationIsRedacted(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -173,8 +192,9 @@ func (r *signalAggregationsResolver) CurrentLocationIsRedacted(ctx context.Conte } // CurrentLocationLatitude is the resolver for the currentLocationLatitude -func (r *signalAggregationsResolver) CurrentLocationLatitude(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "currentLocationLatitude", Agg: agg.String()}] +func (r *signalAggregationsResolver) CurrentLocationLatitude(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -182,8 +202,9 @@ func (r *signalAggregationsResolver) CurrentLocationLatitude(ctx context.Context } // CurrentLocationLongitude is the resolver for the currentLocationLongitude -func (r *signalAggregationsResolver) CurrentLocationLongitude(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "currentLocationLongitude", Agg: agg.String()}] +func (r *signalAggregationsResolver) CurrentLocationLongitude(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -191,8 +212,9 @@ func (r *signalAggregationsResolver) CurrentLocationLongitude(ctx context.Contex } // DimoAftermarketHdop is the resolver for the dimoAftermarketHDOP -func (r *signalAggregationsResolver) DimoAftermarketHdop(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "dimoAftermarketHDOP", Agg: agg.String()}] +func (r *signalAggregationsResolver) DimoAftermarketHdop(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -200,8 +222,9 @@ func (r *signalAggregationsResolver) DimoAftermarketHdop(ctx context.Context, ob } // DimoAftermarketNsat is the resolver for the dimoAftermarketNSAT -func (r *signalAggregationsResolver) DimoAftermarketNsat(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "dimoAftermarketNSAT", Agg: agg.String()}] +func (r *signalAggregationsResolver) DimoAftermarketNsat(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -210,7 +233,8 @@ func (r *signalAggregationsResolver) DimoAftermarketNsat(ctx context.Context, ob // DimoAftermarketSsid is the resolver for the dimoAftermarketSSID func (r *signalAggregationsResolver) DimoAftermarketSsid(ctx context.Context, obj *model.SignalAggregations, agg model.StringAggregation) (*string, error) { - vs, ok := obj.ValueStrings[model.AliasKey{Name: "dimoAftermarketSSID", Agg: agg.String()}] + fieldCtx := graphql.GetFieldContext(ctx) + vs, ok := obj.ValueStrings[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -219,7 +243,8 @@ func (r *signalAggregationsResolver) DimoAftermarketSsid(ctx context.Context, ob // DimoAftermarketWPAState is the resolver for the dimoAftermarketWPAState func (r *signalAggregationsResolver) DimoAftermarketWPAState(ctx context.Context, obj *model.SignalAggregations, agg model.StringAggregation) (*string, error) { - vs, ok := obj.ValueStrings[model.AliasKey{Name: "dimoAftermarketWPAState", Agg: agg.String()}] + fieldCtx := graphql.GetFieldContext(ctx) + vs, ok := obj.ValueStrings[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -227,8 +252,9 @@ func (r *signalAggregationsResolver) DimoAftermarketWPAState(ctx context.Context } // ExteriorAirTemperature is the resolver for the exteriorAirTemperature -func (r *signalAggregationsResolver) ExteriorAirTemperature(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "exteriorAirTemperature", Agg: agg.String()}] +func (r *signalAggregationsResolver) ExteriorAirTemperature(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -236,8 +262,9 @@ func (r *signalAggregationsResolver) ExteriorAirTemperature(ctx context.Context, } // IsIgnitionOn is the resolver for the isIgnitionOn -func (r *signalAggregationsResolver) IsIgnitionOn(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "isIgnitionOn", Agg: agg.String()}] +func (r *signalAggregationsResolver) IsIgnitionOn(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -245,8 +272,9 @@ func (r *signalAggregationsResolver) IsIgnitionOn(ctx context.Context, obj *mode } // LowVoltageBatteryCurrentVoltage is the resolver for the lowVoltageBatteryCurrentVoltage -func (r *signalAggregationsResolver) LowVoltageBatteryCurrentVoltage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "lowVoltageBatteryCurrentVoltage", Agg: agg.String()}] +func (r *signalAggregationsResolver) LowVoltageBatteryCurrentVoltage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -254,8 +282,9 @@ func (r *signalAggregationsResolver) LowVoltageBatteryCurrentVoltage(ctx context } // ObdBarometricPressure is the resolver for the obdBarometricPressure -func (r *signalAggregationsResolver) ObdBarometricPressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "obdBarometricPressure", Agg: agg.String()}] +func (r *signalAggregationsResolver) ObdBarometricPressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -263,8 +292,9 @@ func (r *signalAggregationsResolver) ObdBarometricPressure(ctx context.Context, } // ObdCommandedEgr is the resolver for the obdCommandedEGR -func (r *signalAggregationsResolver) ObdCommandedEgr(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "obdCommandedEGR", Agg: agg.String()}] +func (r *signalAggregationsResolver) ObdCommandedEgr(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -272,8 +302,9 @@ func (r *signalAggregationsResolver) ObdCommandedEgr(ctx context.Context, obj *m } // ObdCommandedEvap is the resolver for the obdCommandedEVAP -func (r *signalAggregationsResolver) ObdCommandedEvap(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "obdCommandedEVAP", Agg: agg.String()}] +func (r *signalAggregationsResolver) ObdCommandedEvap(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -282,7 +313,8 @@ func (r *signalAggregationsResolver) ObdCommandedEvap(ctx context.Context, obj * // ObdDTCList is the resolver for the obdDTCList func (r *signalAggregationsResolver) ObdDTCList(ctx context.Context, obj *model.SignalAggregations, agg model.StringAggregation) (*string, error) { - vs, ok := obj.ValueStrings[model.AliasKey{Name: "obdDTCList", Agg: agg.String()}] + fieldCtx := graphql.GetFieldContext(ctx) + vs, ok := obj.ValueStrings[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -290,8 +322,9 @@ func (r *signalAggregationsResolver) ObdDTCList(ctx context.Context, obj *model. } // ObdDistanceSinceDTCClear is the resolver for the obdDistanceSinceDTCClear -func (r *signalAggregationsResolver) ObdDistanceSinceDTCClear(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "obdDistanceSinceDTCClear", Agg: agg.String()}] +func (r *signalAggregationsResolver) ObdDistanceSinceDTCClear(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -299,8 +332,9 @@ func (r *signalAggregationsResolver) ObdDistanceSinceDTCClear(ctx context.Contex } // ObdDistanceWithMil is the resolver for the obdDistanceWithMIL -func (r *signalAggregationsResolver) ObdDistanceWithMil(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "obdDistanceWithMIL", Agg: agg.String()}] +func (r *signalAggregationsResolver) ObdDistanceWithMil(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -308,8 +342,9 @@ func (r *signalAggregationsResolver) ObdDistanceWithMil(ctx context.Context, obj } // ObdEngineLoad is the resolver for the obdEngineLoad -func (r *signalAggregationsResolver) ObdEngineLoad(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "obdEngineLoad", Agg: agg.String()}] +func (r *signalAggregationsResolver) ObdEngineLoad(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -317,8 +352,9 @@ func (r *signalAggregationsResolver) ObdEngineLoad(ctx context.Context, obj *mod } // ObdFuelPressure is the resolver for the obdFuelPressure -func (r *signalAggregationsResolver) ObdFuelPressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "obdFuelPressure", Agg: agg.String()}] +func (r *signalAggregationsResolver) ObdFuelPressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -326,8 +362,9 @@ func (r *signalAggregationsResolver) ObdFuelPressure(ctx context.Context, obj *m } // ObdIntakeTemp is the resolver for the obdIntakeTemp -func (r *signalAggregationsResolver) ObdIntakeTemp(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "obdIntakeTemp", Agg: agg.String()}] +func (r *signalAggregationsResolver) ObdIntakeTemp(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -335,8 +372,9 @@ func (r *signalAggregationsResolver) ObdIntakeTemp(ctx context.Context, obj *mod } // ObdLongTermFuelTrim1 is the resolver for the obdLongTermFuelTrim1 -func (r *signalAggregationsResolver) ObdLongTermFuelTrim1(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "obdLongTermFuelTrim1", Agg: agg.String()}] +func (r *signalAggregationsResolver) ObdLongTermFuelTrim1(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -344,8 +382,9 @@ func (r *signalAggregationsResolver) ObdLongTermFuelTrim1(ctx context.Context, o } // ObdMap is the resolver for the obdMAP -func (r *signalAggregationsResolver) ObdMap(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "obdMAP", Agg: agg.String()}] +func (r *signalAggregationsResolver) ObdMap(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -353,8 +392,9 @@ func (r *signalAggregationsResolver) ObdMap(ctx context.Context, obj *model.Sign } // ObdO2WRSensor1Voltage is the resolver for the obdO2WRSensor1Voltage -func (r *signalAggregationsResolver) ObdO2WRSensor1Voltage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "obdO2WRSensor1Voltage", Agg: agg.String()}] +func (r *signalAggregationsResolver) ObdO2WRSensor1Voltage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -362,8 +402,9 @@ func (r *signalAggregationsResolver) ObdO2WRSensor1Voltage(ctx context.Context, } // ObdO2WRSensor2Voltage is the resolver for the obdO2WRSensor2Voltage -func (r *signalAggregationsResolver) ObdO2WRSensor2Voltage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "obdO2WRSensor2Voltage", Agg: agg.String()}] +func (r *signalAggregationsResolver) ObdO2WRSensor2Voltage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -371,8 +412,9 @@ func (r *signalAggregationsResolver) ObdO2WRSensor2Voltage(ctx context.Context, } // ObdRunTime is the resolver for the obdRunTime -func (r *signalAggregationsResolver) ObdRunTime(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "obdRunTime", Agg: agg.String()}] +func (r *signalAggregationsResolver) ObdRunTime(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -380,8 +422,9 @@ func (r *signalAggregationsResolver) ObdRunTime(ctx context.Context, obj *model. } // ObdShortTermFuelTrim1 is the resolver for the obdShortTermFuelTrim1 -func (r *signalAggregationsResolver) ObdShortTermFuelTrim1(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "obdShortTermFuelTrim1", Agg: agg.String()}] +func (r *signalAggregationsResolver) ObdShortTermFuelTrim1(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -389,8 +432,9 @@ func (r *signalAggregationsResolver) ObdShortTermFuelTrim1(ctx context.Context, } // ObdWarmupsSinceDTCClear is the resolver for the obdWarmupsSinceDTCClear -func (r *signalAggregationsResolver) ObdWarmupsSinceDTCClear(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "obdWarmupsSinceDTCClear", Agg: agg.String()}] +func (r *signalAggregationsResolver) ObdWarmupsSinceDTCClear(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -398,8 +442,9 @@ func (r *signalAggregationsResolver) ObdWarmupsSinceDTCClear(ctx context.Context } // PowertrainCombustionEngineDieselExhaustFluidCapacity is the resolver for the powertrainCombustionEngineDieselExhaustFluidCapacity -func (r *signalAggregationsResolver) PowertrainCombustionEngineDieselExhaustFluidCapacity(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainCombustionEngineDieselExhaustFluidCapacity", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainCombustionEngineDieselExhaustFluidCapacity(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -407,8 +452,9 @@ func (r *signalAggregationsResolver) PowertrainCombustionEngineDieselExhaustFlui } // PowertrainCombustionEngineDieselExhaustFluidLevel is the resolver for the powertrainCombustionEngineDieselExhaustFluidLevel -func (r *signalAggregationsResolver) PowertrainCombustionEngineDieselExhaustFluidLevel(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainCombustionEngineDieselExhaustFluidLevel", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainCombustionEngineDieselExhaustFluidLevel(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -416,8 +462,9 @@ func (r *signalAggregationsResolver) PowertrainCombustionEngineDieselExhaustFlui } // PowertrainCombustionEngineEct is the resolver for the powertrainCombustionEngineECT -func (r *signalAggregationsResolver) PowertrainCombustionEngineEct(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainCombustionEngineECT", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainCombustionEngineEct(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -425,8 +472,9 @@ func (r *signalAggregationsResolver) PowertrainCombustionEngineEct(ctx context.C } // PowertrainCombustionEngineEop is the resolver for the powertrainCombustionEngineEOP -func (r *signalAggregationsResolver) PowertrainCombustionEngineEop(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainCombustionEngineEOP", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainCombustionEngineEop(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -434,8 +482,9 @@ func (r *signalAggregationsResolver) PowertrainCombustionEngineEop(ctx context.C } // PowertrainCombustionEngineEot is the resolver for the powertrainCombustionEngineEOT -func (r *signalAggregationsResolver) PowertrainCombustionEngineEot(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainCombustionEngineEOT", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainCombustionEngineEot(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -444,7 +493,8 @@ func (r *signalAggregationsResolver) PowertrainCombustionEngineEot(ctx context.C // PowertrainCombustionEngineEngineOilLevel is the resolver for the powertrainCombustionEngineEngineOilLevel func (r *signalAggregationsResolver) PowertrainCombustionEngineEngineOilLevel(ctx context.Context, obj *model.SignalAggregations, agg model.StringAggregation) (*string, error) { - vs, ok := obj.ValueStrings[model.AliasKey{Name: "powertrainCombustionEngineEngineOilLevel", Agg: agg.String()}] + fieldCtx := graphql.GetFieldContext(ctx) + vs, ok := obj.ValueStrings[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -452,8 +502,9 @@ func (r *signalAggregationsResolver) PowertrainCombustionEngineEngineOilLevel(ct } // PowertrainCombustionEngineEngineOilRelativeLevel is the resolver for the powertrainCombustionEngineEngineOilRelativeLevel -func (r *signalAggregationsResolver) PowertrainCombustionEngineEngineOilRelativeLevel(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainCombustionEngineEngineOilRelativeLevel", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainCombustionEngineEngineOilRelativeLevel(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -461,8 +512,9 @@ func (r *signalAggregationsResolver) PowertrainCombustionEngineEngineOilRelative } // PowertrainCombustionEngineMaf is the resolver for the powertrainCombustionEngineMAF -func (r *signalAggregationsResolver) PowertrainCombustionEngineMaf(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainCombustionEngineMAF", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainCombustionEngineMaf(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -470,8 +522,9 @@ func (r *signalAggregationsResolver) PowertrainCombustionEngineMaf(ctx context.C } // PowertrainCombustionEngineSpeed is the resolver for the powertrainCombustionEngineSpeed -func (r *signalAggregationsResolver) PowertrainCombustionEngineSpeed(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainCombustionEngineSpeed", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainCombustionEngineSpeed(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -479,8 +532,9 @@ func (r *signalAggregationsResolver) PowertrainCombustionEngineSpeed(ctx context } // PowertrainCombustionEngineTps is the resolver for the powertrainCombustionEngineTPS -func (r *signalAggregationsResolver) PowertrainCombustionEngineTps(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainCombustionEngineTPS", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainCombustionEngineTps(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -488,8 +542,9 @@ func (r *signalAggregationsResolver) PowertrainCombustionEngineTps(ctx context.C } // PowertrainCombustionEngineTorque is the resolver for the powertrainCombustionEngineTorque -func (r *signalAggregationsResolver) PowertrainCombustionEngineTorque(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainCombustionEngineTorque", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainCombustionEngineTorque(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -497,8 +552,9 @@ func (r *signalAggregationsResolver) PowertrainCombustionEngineTorque(ctx contex } // PowertrainFuelSystemAbsoluteLevel is the resolver for the powertrainFuelSystemAbsoluteLevel -func (r *signalAggregationsResolver) PowertrainFuelSystemAbsoluteLevel(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainFuelSystemAbsoluteLevel", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainFuelSystemAbsoluteLevel(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -506,8 +562,9 @@ func (r *signalAggregationsResolver) PowertrainFuelSystemAbsoluteLevel(ctx conte } // PowertrainFuelSystemRelativeLevel is the resolver for the powertrainFuelSystemRelativeLevel -func (r *signalAggregationsResolver) PowertrainFuelSystemRelativeLevel(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainFuelSystemRelativeLevel", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainFuelSystemRelativeLevel(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -516,7 +573,8 @@ func (r *signalAggregationsResolver) PowertrainFuelSystemRelativeLevel(ctx conte // PowertrainFuelSystemSupportedFuelTypes is the resolver for the powertrainFuelSystemSupportedFuelTypes func (r *signalAggregationsResolver) PowertrainFuelSystemSupportedFuelTypes(ctx context.Context, obj *model.SignalAggregations, agg model.StringAggregation) (*string, error) { - vs, ok := obj.ValueStrings[model.AliasKey{Name: "powertrainFuelSystemSupportedFuelTypes", Agg: agg.String()}] + fieldCtx := graphql.GetFieldContext(ctx) + vs, ok := obj.ValueStrings[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -524,8 +582,9 @@ func (r *signalAggregationsResolver) PowertrainFuelSystemSupportedFuelTypes(ctx } // PowertrainRange is the resolver for the powertrainRange -func (r *signalAggregationsResolver) PowertrainRange(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainRange", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainRange(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -533,8 +592,9 @@ func (r *signalAggregationsResolver) PowertrainRange(ctx context.Context, obj *m } // PowertrainTractionBatteryChargingAddedEnergy is the resolver for the powertrainTractionBatteryChargingAddedEnergy -func (r *signalAggregationsResolver) PowertrainTractionBatteryChargingAddedEnergy(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainTractionBatteryChargingAddedEnergy", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainTractionBatteryChargingAddedEnergy(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -542,8 +602,9 @@ func (r *signalAggregationsResolver) PowertrainTractionBatteryChargingAddedEnerg } // PowertrainTractionBatteryChargingChargeCurrentAc is the resolver for the powertrainTractionBatteryChargingChargeCurrentAC -func (r *signalAggregationsResolver) PowertrainTractionBatteryChargingChargeCurrentAc(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainTractionBatteryChargingChargeCurrentAC", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainTractionBatteryChargingChargeCurrentAc(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -551,8 +612,9 @@ func (r *signalAggregationsResolver) PowertrainTractionBatteryChargingChargeCurr } // PowertrainTractionBatteryChargingChargeLimit is the resolver for the powertrainTractionBatteryChargingChargeLimit -func (r *signalAggregationsResolver) PowertrainTractionBatteryChargingChargeLimit(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainTractionBatteryChargingChargeLimit", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainTractionBatteryChargingChargeLimit(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -560,8 +622,9 @@ func (r *signalAggregationsResolver) PowertrainTractionBatteryChargingChargeLimi } // PowertrainTractionBatteryChargingChargeVoltageUnknownType is the resolver for the powertrainTractionBatteryChargingChargeVoltageUnknownType -func (r *signalAggregationsResolver) PowertrainTractionBatteryChargingChargeVoltageUnknownType(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainTractionBatteryChargingChargeVoltageUnknownType", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainTractionBatteryChargingChargeVoltageUnknownType(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -569,8 +632,9 @@ func (r *signalAggregationsResolver) PowertrainTractionBatteryChargingChargeVolt } // PowertrainTractionBatteryChargingIsCharging is the resolver for the powertrainTractionBatteryChargingIsCharging -func (r *signalAggregationsResolver) PowertrainTractionBatteryChargingIsCharging(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainTractionBatteryChargingIsCharging", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainTractionBatteryChargingIsCharging(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -578,8 +642,9 @@ func (r *signalAggregationsResolver) PowertrainTractionBatteryChargingIsCharging } // PowertrainTractionBatteryCurrentPower is the resolver for the powertrainTractionBatteryCurrentPower -func (r *signalAggregationsResolver) PowertrainTractionBatteryCurrentPower(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainTractionBatteryCurrentPower", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainTractionBatteryCurrentPower(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -587,8 +652,9 @@ func (r *signalAggregationsResolver) PowertrainTractionBatteryCurrentPower(ctx c } // PowertrainTractionBatteryCurrentVoltage is the resolver for the powertrainTractionBatteryCurrentVoltage -func (r *signalAggregationsResolver) PowertrainTractionBatteryCurrentVoltage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainTractionBatteryCurrentVoltage", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainTractionBatteryCurrentVoltage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -596,8 +662,9 @@ func (r *signalAggregationsResolver) PowertrainTractionBatteryCurrentVoltage(ctx } // PowertrainTractionBatteryGrossCapacity is the resolver for the powertrainTractionBatteryGrossCapacity -func (r *signalAggregationsResolver) PowertrainTractionBatteryGrossCapacity(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainTractionBatteryGrossCapacity", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainTractionBatteryGrossCapacity(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -605,8 +672,9 @@ func (r *signalAggregationsResolver) PowertrainTractionBatteryGrossCapacity(ctx } // PowertrainTractionBatteryRange is the resolver for the powertrainTractionBatteryRange -func (r *signalAggregationsResolver) PowertrainTractionBatteryRange(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainTractionBatteryRange", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainTractionBatteryRange(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -614,8 +682,9 @@ func (r *signalAggregationsResolver) PowertrainTractionBatteryRange(ctx context. } // PowertrainTractionBatteryStateOfChargeCurrent is the resolver for the powertrainTractionBatteryStateOfChargeCurrent -func (r *signalAggregationsResolver) PowertrainTractionBatteryStateOfChargeCurrent(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainTractionBatteryStateOfChargeCurrent", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainTractionBatteryStateOfChargeCurrent(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -623,8 +692,9 @@ func (r *signalAggregationsResolver) PowertrainTractionBatteryStateOfChargeCurre } // PowertrainTractionBatteryStateOfChargeCurrentEnergy is the resolver for the powertrainTractionBatteryStateOfChargeCurrentEnergy -func (r *signalAggregationsResolver) PowertrainTractionBatteryStateOfChargeCurrentEnergy(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainTractionBatteryStateOfChargeCurrentEnergy", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainTractionBatteryStateOfChargeCurrentEnergy(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -632,8 +702,9 @@ func (r *signalAggregationsResolver) PowertrainTractionBatteryStateOfChargeCurre } // PowertrainTractionBatteryTemperatureAverage is the resolver for the powertrainTractionBatteryTemperatureAverage -func (r *signalAggregationsResolver) PowertrainTractionBatteryTemperatureAverage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainTractionBatteryTemperatureAverage", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainTractionBatteryTemperatureAverage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -641,8 +712,9 @@ func (r *signalAggregationsResolver) PowertrainTractionBatteryTemperatureAverage } // PowertrainTransmissionCurrentGear is the resolver for the powertrainTransmissionCurrentGear -func (r *signalAggregationsResolver) PowertrainTransmissionCurrentGear(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainTransmissionCurrentGear", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainTransmissionCurrentGear(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -650,8 +722,9 @@ func (r *signalAggregationsResolver) PowertrainTransmissionCurrentGear(ctx conte } // PowertrainTransmissionTemperature is the resolver for the powertrainTransmissionTemperature -func (r *signalAggregationsResolver) PowertrainTransmissionTemperature(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainTransmissionTemperature", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainTransmissionTemperature(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -659,8 +732,9 @@ func (r *signalAggregationsResolver) PowertrainTransmissionTemperature(ctx conte } // PowertrainTransmissionTravelledDistance is the resolver for the powertrainTransmissionTravelledDistance -func (r *signalAggregationsResolver) PowertrainTransmissionTravelledDistance(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "powertrainTransmissionTravelledDistance", Agg: agg.String()}] +func (r *signalAggregationsResolver) PowertrainTransmissionTravelledDistance(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -669,7 +743,8 @@ func (r *signalAggregationsResolver) PowertrainTransmissionTravelledDistance(ctx // PowertrainType is the resolver for the powertrainType func (r *signalAggregationsResolver) PowertrainType(ctx context.Context, obj *model.SignalAggregations, agg model.StringAggregation) (*string, error) { - vs, ok := obj.ValueStrings[model.AliasKey{Name: "powertrainType", Agg: agg.String()}] + fieldCtx := graphql.GetFieldContext(ctx) + vs, ok := obj.ValueStrings[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -677,8 +752,9 @@ func (r *signalAggregationsResolver) PowertrainType(ctx context.Context, obj *mo } // ServiceDistanceToService is the resolver for the serviceDistanceToService -func (r *signalAggregationsResolver) ServiceDistanceToService(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "serviceDistanceToService", Agg: agg.String()}] +func (r *signalAggregationsResolver) ServiceDistanceToService(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -686,8 +762,9 @@ func (r *signalAggregationsResolver) ServiceDistanceToService(ctx context.Contex } // Speed is the resolver for the speed -func (r *signalAggregationsResolver) Speed(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "speed", Agg: agg.String()}] +func (r *signalAggregationsResolver) Speed(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } diff --git a/internal/graph/signals_gen.resolvers.tmpl b/internal/graph/signals_gen.resolvers.tmpl index cfcdd15b..85719fdb 100644 --- a/internal/graph/signals_gen.resolvers.tmpl +++ b/internal/graph/signals_gen.resolvers.tmpl @@ -12,7 +12,8 @@ import ( // {{ GQLGenResolverName .JSONName }} is the resolver for the {{ .JSONName }} {{- if eq .GQLType "Float" }} func (r *signalAggregationsResolver) {{ GQLGenResolverName .JSONName }}(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { - vn, ok := obj.ValueNumbers[model.AliasKey{Name: "{{ .JSONName }}", Agg: agg.String()}] + fieldCtx := graphql.GetFieldContext(ctx) + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -20,7 +21,8 @@ func (r *signalAggregationsResolver) {{ GQLGenResolverName .JSONName }}(ctx cont } {{ else }} func (r *signalAggregationsResolver) {{ GQLGenResolverName .JSONName }}(ctx context.Context, obj *model.SignalAggregations, agg model.StringAggregation) (*string, error) { - vs, ok := obj.ValueStrings[model.AliasKey{Name: "{{ .JSONName }}", Agg: agg.String()}] + fieldCtx := graphql.GetFieldContext(ctx) + vs, ok := obj.ValueStrings[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } diff --git a/internal/repositories/repositories.go b/internal/repositories/repositories.go index 0dcc0b22..4d221de6 100644 --- a/internal/repositories/repositories.go +++ b/internal/repositories/repositories.go @@ -85,8 +85,9 @@ func (r *Repository) GetSignal(ctx context.Context, aggArgs *model.AggregatedSig lastTS = signal.Timestamp currAggs = &model.SignalAggregations{ Timestamp: signal.Timestamp, - ValueNumbers: make(map[model.AliasKey]float64), - ValueStrings: make(map[model.AliasKey]string), + ValueNumbers: make(map[string]float64), + ValueStrings: make(map[string]string), + SignalArgs: aggArgs, } allAggs = append(allAggs, currAggs) } diff --git a/internal/service/ch/ch.go b/internal/service/ch/ch.go index 6c3886a7..1786f83f 100644 --- a/internal/service/ch/ch.go +++ b/internal/service/ch/ch.go @@ -139,7 +139,7 @@ func (s *Service) getAggSignals(ctx context.Context, stmt string, args []any) ([ signals := []*model.AggSignal{} for rows.Next() { var signal model.AggSignal - err := rows.Scan(&signal.Name, &signal.Agg, &signal.Timestamp, &signal.ValueNumber, &signal.ValueString) + err := rows.Scan(&signal.Handle, &signal.Timestamp, &signal.ValueNumber, &signal.ValueString) if err != nil { _ = rows.Close() return nil, fmt.Errorf("failed scanning clickhouse row: %w", err) diff --git a/internal/service/ch/queries.go b/internal/service/ch/queries.go index 82876871..75c6f494 100644 --- a/internal/service/ch/queries.go +++ b/internal/service/ch/queries.go @@ -11,12 +11,14 @@ import ( "github.com/volatiletech/sqlboiler/v4/drivers" "github.com/volatiletech/sqlboiler/v4/queries" "github.com/volatiletech/sqlboiler/v4/queries/qm" + "github.com/volatiletech/sqlboiler/v4/queries/qmhelper" ) const ( // IntervalGroup is the column alias for the interval group. IntervalGroup = "group_timestamp" AggCol = "agg" + HandleCol = "handle" aggTableName = "agg_table" tokenIDWhere = vss.TokenIDCol + " = ?" nameIn = vss.NameCol + " IN ?" @@ -25,7 +27,7 @@ const ( sourceWhere = vss.SourceCol + " = ?" sourceIn = vss.SourceCol + " IN ?" groupAsc = IntervalGroup + " ASC" - valueTableDef = "name String, agg String" + valueTableDef = vss.NameCol + " String, handle String" ) // varibles for the last seen signal query. @@ -131,7 +133,7 @@ func selectNumberAggs(numberAggs []model.FloatSignalArgs) qm.QueryMod { // Add a CASE statement for each name and its corresponding aggregation function caseStmts := make([]string, len(numberAggs)) for i := range numberAggs { - caseStmts[i] = fmt.Sprintf("WHEN %s = '%s' AND %s = '%s' THEN %s", vss.NameCol, numberAggs[i].Name, AggCol, numberAggs[i].Agg, getFloatAggFunc(numberAggs[i].Agg)) + caseStmts[i] = fmt.Sprintf("WHEN %s = '%s' THEN %s", HandleCol, numberAggs[i].QueryHandle, getFloatAggFunc(numberAggs[i].Agg)) } caseStmt := fmt.Sprintf("CASE %s ELSE NULL END AS %s", strings.Join(caseStmts, " "), vss.ValueNumberCol) return qm.Select(caseStmt) @@ -144,7 +146,7 @@ func selectStringAggs(stringAggs []model.StringSignalArgs) qm.QueryMod { // Add a CASE statement for each name and its corresponding aggregation function caseStmts := make([]string, len(stringAggs)) for i := range stringAggs { - caseStmts[i] = fmt.Sprintf("WHEN %s = '%s' AND %s = '%s' THEN %s", vss.NameCol, stringAggs[i].Name, AggCol, stringAggs[i].Agg, getStringAgg(stringAggs[i].Agg)) + caseStmts[i] = fmt.Sprintf("WHEN %s = '%s' AND %s = '%s' THEN %s", HandleCol, stringAggs[i].QueryHandle, getStringAgg(stringAggs[i].Agg)) } caseStmt := fmt.Sprintf("CASE %s ELSE NULL END AS %s", strings.Join(caseStmts, " "), vss.ValueStringCol) return qm.Select(caseStmt) @@ -321,10 +323,10 @@ func getAggQuery(aggArgs *model.AggregatedSignalArgs) (string, []any, error) { } floatArgs := make([]model.FloatSignalArgs, 0, len(aggArgs.FloatArgs)) stringArgs := make([]model.StringSignalArgs, 0, len(aggArgs.StringArgs)) - for agg := range aggArgs.FloatArgs { + for _, agg := range aggArgs.FloatArgs { floatArgs = append(floatArgs, agg) } - for agg := range aggArgs.StringArgs { + for _, agg := range aggArgs.StringArgs { stringArgs = append(stringArgs, agg) } @@ -333,16 +335,46 @@ func getAggQuery(aggArgs *model.AggregatedSignalArgs) (string, []any, error) { // You can see the alternatives in the issue and they are ugly. valuesArgs := make([]string, 0, numAggs) for _, agg := range floatArgs { - valuesArgs = append(valuesArgs, fmt.Sprintf("('%s', '%s')", agg.Name, agg.Agg)) + valuesArgs = append(valuesArgs, fmt.Sprintf("('%s', '%s')", agg.Name, agg.QueryHandle)) } for _, agg := range stringArgs { - valuesArgs = append(valuesArgs, fmt.Sprintf("('%s', '%s')", agg.Name, agg.Agg)) + valuesArgs = append(valuesArgs, fmt.Sprintf("('%s', '%s')", agg.Name, agg.QueryHandle)) } valueTable := fmt.Sprintf("VALUES('%s', %s) as %s ON %s.%s = %s.%s", valueTableDef, strings.Join(valuesArgs, ", "), aggTableName, vss.TableName, vss.NameCol, aggTableName, vss.NameCol) + var floatFilters []qm.QueryMod + + for i, agg := range floatArgs { + fieldFilters := []qm.QueryMod{qmhelper.Where(HandleCol, qmhelper.EQ, agg.QueryHandle)} + if fil := agg.Filter; fil != nil { + if fil.Gt != nil { + fieldFilters = append(fieldFilters, qmhelper.Where(vss.ValueNumberCol, qmhelper.GT, *fil.Gt)) + } + if fil.Lt != nil { + fieldFilters = append(fieldFilters, qmhelper.Where(vss.ValueNumberCol, qmhelper.LT, *fil.Lt)) + } + if fil.Gte != nil { + fieldFilters = append(fieldFilters, qmhelper.Where(vss.ValueNumberCol, qmhelper.GTE, *fil.Gte)) + } + if fil.Lte != nil { + fieldFilters = append(fieldFilters, qmhelper.Where(vss.ValueNumberCol, qmhelper.LTE, *fil.Lte)) + } + } + + if i == 0 { + floatFilters = append(floatFilters, qm.Expr(floatFilters...)) + } else { + floatFilters = append(floatFilters, qm.Or2(qm.Expr(floatFilters...))) + } + } + + bigWhere := []qm.QueryMod{} + if len(floatArgs) == 0 { + bigWhere = append(bigWhere) + } + mods := []qm.QueryMod{ - qm.Select(vss.NameCol), - qm.Select(AggCol), + qm.Select(HandleCol), selectInterval(aggArgs.Interval, aggArgs.FromTS), selectNumberAggs(floatArgs), selectStringAggs(stringArgs), @@ -357,6 +389,8 @@ func getAggQuery(aggArgs *model.AggregatedSignalArgs) (string, []any, error) { qm.OrderBy(groupAsc), } mods = append(mods, getFilterMods(aggArgs.Filter)...) + mods = append(mods, floatFilters...) + stmt, args := newQuery(mods...) return stmt, args, nil } diff --git a/schema/base.graphqls b/schema/base.graphqls index 0d197031..2c269717 100644 --- a/schema/base.graphqls +++ b/schema/base.graphqls @@ -178,3 +178,13 @@ input SignalFilter { """ source: String } + +# TODO(elffjs): Unsure about this exact name. +# TODO(elffjs): Do we need more operators? +# TODO(elffjs): Recursive "or" support. +input SignalFloatFilter { + gt: Float + lt: Float + gte: Float + lte: Float +} \ No newline at end of file diff --git a/schema/signals.tmpl b/schema/signals.tmpl index e39647ca..722dbdcf 100644 --- a/schema/signals.tmpl +++ b/schema/signals.tmpl @@ -10,7 +10,8 @@ extend type SignalAggregations { """ {{ .JSONName }}( {{- if eq .GQLType "Float" }} - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float {{- else }} agg: StringAggregation! diff --git a/schema/signals_gen.graphqls b/schema/signals_gen.graphqls index c856368a..b8e82708 100644 --- a/schema/signals_gen.graphqls +++ b/schema/signals_gen.graphqls @@ -6,7 +6,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ angularVelocityYaw( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "AngularVelocityYaw", forceResolver: true) @isSignal @hasAggregation """ @@ -14,7 +15,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ cabinDoorRow1DriverSideIsOpen( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "CabinDoorRow1DriverSideIsOpen", forceResolver: true) @isSignal @hasAggregation """ @@ -22,7 +24,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ cabinDoorRow1DriverSideWindowIsOpen( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "CabinDoorRow1DriverSideWindowIsOpen", forceResolver: true) @isSignal @hasAggregation """ @@ -30,7 +33,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ cabinDoorRow1PassengerSideIsOpen( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "CabinDoorRow1PassengerSideIsOpen", forceResolver: true) @isSignal @hasAggregation """ @@ -38,7 +42,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ cabinDoorRow1PassengerSideWindowIsOpen( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "CabinDoorRow1PassengerSideWindowIsOpen", forceResolver: true) @isSignal @hasAggregation """ @@ -46,7 +51,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ cabinDoorRow2DriverSideIsOpen( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "CabinDoorRow2DriverSideIsOpen", forceResolver: true) @isSignal @hasAggregation """ @@ -54,7 +60,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ cabinDoorRow2DriverSideWindowIsOpen( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "CabinDoorRow2DriverSideWindowIsOpen", forceResolver: true) @isSignal @hasAggregation """ @@ -62,7 +69,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ cabinDoorRow2PassengerSideIsOpen( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "CabinDoorRow2PassengerSideIsOpen", forceResolver: true) @isSignal @hasAggregation """ @@ -70,7 +78,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ cabinDoorRow2PassengerSideWindowIsOpen( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "CabinDoorRow2PassengerSideWindowIsOpen", forceResolver: true) @isSignal @hasAggregation """ @@ -79,7 +88,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ chassisAxleRow1WheelLeftSpeed( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "ChassisAxleRow1WheelLeftSpeed", forceResolver: true) @isSignal @hasAggregation """ @@ -88,7 +98,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ chassisAxleRow1WheelLeftTirePressure( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "ChassisAxleRow1WheelLeftTirePressure", forceResolver: true) @isSignal @hasAggregation """ @@ -97,7 +108,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ chassisAxleRow1WheelRightSpeed( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "ChassisAxleRow1WheelRightSpeed", forceResolver: true) @isSignal @hasAggregation """ @@ -106,7 +118,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ chassisAxleRow1WheelRightTirePressure( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "ChassisAxleRow1WheelRightTirePressure", forceResolver: true) @isSignal @hasAggregation """ @@ -115,7 +128,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ chassisAxleRow2WheelLeftTirePressure( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "ChassisAxleRow2WheelLeftTirePressure", forceResolver: true) @isSignal @hasAggregation """ @@ -124,7 +138,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ chassisAxleRow2WheelRightTirePressure( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "ChassisAxleRow2WheelRightTirePressure", forceResolver: true) @isSignal @hasAggregation """ @@ -133,7 +148,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_ALL_TIME_LOCATION] """ currentLocationAltitude( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_ALL_TIME_LOCATION]) @goField(name: "CurrentLocationAltitude", forceResolver: true) @isSignal @hasAggregation """ @@ -142,7 +158,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_ALL_TIME_LOCATION] """ currentLocationHeading( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_ALL_TIME_LOCATION]) @goField(name: "CurrentLocationHeading", forceResolver: true) @isSignal @hasAggregation """ @@ -150,7 +167,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_ALL_TIME_LOCATION] """ currentLocationIsRedacted( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_ALL_TIME_LOCATION]) @goField(name: "CurrentLocationIsRedacted", forceResolver: true) @isSignal @hasAggregation """ @@ -159,7 +177,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_ALL_TIME_LOCATION] """ currentLocationLatitude( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_ALL_TIME_LOCATION]) @goField(name: "CurrentLocationLatitude", forceResolver: true) @isSignal @hasAggregation """ @@ -168,7 +187,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_ALL_TIME_LOCATION] """ currentLocationLongitude( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_ALL_TIME_LOCATION]) @goField(name: "CurrentLocationLongitude", forceResolver: true) @isSignal @hasAggregation """ @@ -176,7 +196,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ dimoAftermarketHDOP( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "DIMOAftermarketHDOP", forceResolver: true) @isSignal @hasAggregation """ @@ -184,7 +205,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ dimoAftermarketNSAT( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "DIMOAftermarketNSAT", forceResolver: true) @isSignal @hasAggregation """ @@ -209,7 +231,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ exteriorAirTemperature( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "ExteriorAirTemperature", forceResolver: true) @isSignal @hasAggregation """ @@ -217,7 +240,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ isIgnitionOn( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "IsIgnitionOn", forceResolver: true) @isSignal @hasAggregation """ @@ -226,7 +250,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ lowVoltageBatteryCurrentVoltage( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "LowVoltageBatteryCurrentVoltage", forceResolver: true) @isSignal @hasAggregation """ @@ -235,7 +260,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdBarometricPressure( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDBarometricPressure", forceResolver: true) @isSignal @hasAggregation """ @@ -244,7 +270,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdCommandedEGR( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDCommandedEGR", forceResolver: true) @isSignal @hasAggregation """ @@ -253,7 +280,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdCommandedEVAP( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDCommandedEVAP", forceResolver: true) @isSignal @hasAggregation """ @@ -270,7 +298,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdDistanceSinceDTCClear( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDDistanceSinceDTCClear", forceResolver: true) @isSignal @hasAggregation """ @@ -279,7 +308,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdDistanceWithMIL( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDDistanceWithMIL", forceResolver: true) @isSignal @hasAggregation """ @@ -288,7 +318,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdEngineLoad( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDEngineLoad", forceResolver: true) @isSignal @hasAggregation """ @@ -297,7 +328,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdFuelPressure( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDFuelPressure", forceResolver: true) @isSignal @hasAggregation """ @@ -306,7 +338,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdIntakeTemp( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDIntakeTemp", forceResolver: true) @isSignal @hasAggregation """ @@ -315,7 +348,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdLongTermFuelTrim1( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDLongTermFuelTrim1", forceResolver: true) @isSignal @hasAggregation """ @@ -324,7 +358,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdMAP( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDMAP", forceResolver: true) @isSignal @hasAggregation """ @@ -333,7 +368,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdO2WRSensor1Voltage( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDO2WRSensor1Voltage", forceResolver: true) @isSignal @hasAggregation """ @@ -342,7 +378,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdO2WRSensor2Voltage( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDO2WRSensor2Voltage", forceResolver: true) @isSignal @hasAggregation """ @@ -351,7 +388,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdRunTime( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDRunTime", forceResolver: true) @isSignal @hasAggregation """ @@ -360,7 +398,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdShortTermFuelTrim1( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDShortTermFuelTrim1", forceResolver: true) @isSignal @hasAggregation """ @@ -368,7 +407,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ obdWarmupsSinceDTCClear( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "OBDWarmupsSinceDTCClear", forceResolver: true) @isSignal @hasAggregation """ @@ -377,7 +417,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainCombustionEngineDieselExhaustFluidCapacity( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainCombustionEngineDieselExhaustFluidCapacity", forceResolver: true) @isSignal @hasAggregation """ @@ -386,7 +427,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainCombustionEngineDieselExhaustFluidLevel( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainCombustionEngineDieselExhaustFluidLevel", forceResolver: true) @isSignal @hasAggregation """ @@ -395,7 +437,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainCombustionEngineECT( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainCombustionEngineECT", forceResolver: true) @isSignal @hasAggregation """ @@ -404,7 +447,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainCombustionEngineEOP( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainCombustionEngineEOP", forceResolver: true) @isSignal @hasAggregation """ @@ -413,7 +457,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainCombustionEngineEOT( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainCombustionEngineEOT", forceResolver: true) @isSignal @hasAggregation """ @@ -430,7 +475,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainCombustionEngineEngineOilRelativeLevel( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainCombustionEngineEngineOilRelativeLevel", forceResolver: true) @isSignal @hasAggregation """ @@ -439,7 +485,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainCombustionEngineMAF( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainCombustionEngineMAF", forceResolver: true) @isSignal @hasAggregation """ @@ -448,7 +495,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainCombustionEngineSpeed( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainCombustionEngineSpeed", forceResolver: true) @isSignal @hasAggregation """ @@ -457,7 +505,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainCombustionEngineTPS( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainCombustionEngineTPS", forceResolver: true) @isSignal @hasAggregation """ @@ -466,7 +515,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainCombustionEngineTorque( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainCombustionEngineTorque", forceResolver: true) @isSignal @hasAggregation """ @@ -475,7 +525,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainFuelSystemAbsoluteLevel( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainFuelSystemAbsoluteLevel", forceResolver: true) @isSignal @hasAggregation """ @@ -484,7 +535,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainFuelSystemRelativeLevel( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainFuelSystemRelativeLevel", forceResolver: true) @isSignal @hasAggregation """ @@ -501,7 +553,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainRange( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainRange", forceResolver: true) @isSignal @hasAggregation """ @@ -510,7 +563,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryChargingAddedEnergy( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryChargingAddedEnergy", forceResolver: true) @isSignal @hasAggregation """ @@ -519,7 +573,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryChargingChargeCurrentAC( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryChargingChargeCurrentAC", forceResolver: true) @isSignal @hasAggregation """ @@ -528,7 +583,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryChargingChargeLimit( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryChargingChargeLimit", forceResolver: true) @isSignal @hasAggregation """ @@ -537,7 +593,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryChargingChargeVoltageUnknownType( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryChargingChargeVoltageUnknownType", forceResolver: true) @isSignal @hasAggregation """ @@ -545,7 +602,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryChargingIsCharging( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryChargingIsCharging", forceResolver: true) @isSignal @hasAggregation """ @@ -554,7 +612,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryCurrentPower( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryCurrentPower", forceResolver: true) @isSignal @hasAggregation """ @@ -563,7 +622,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryCurrentVoltage( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryCurrentVoltage", forceResolver: true) @isSignal @hasAggregation """ @@ -572,7 +632,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryGrossCapacity( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryGrossCapacity", forceResolver: true) @isSignal @hasAggregation """ @@ -581,7 +642,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryRange( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryRange", forceResolver: true) @isSignal @hasAggregation """ @@ -590,7 +652,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryStateOfChargeCurrent( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryStateOfChargeCurrent", forceResolver: true) @isSignal @hasAggregation """ @@ -599,7 +662,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryStateOfChargeCurrentEnergy( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryStateOfChargeCurrentEnergy", forceResolver: true) @isSignal @hasAggregation """ @@ -608,7 +672,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryTemperatureAverage( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryTemperatureAverage", forceResolver: true) @isSignal @hasAggregation """ @@ -616,7 +681,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTransmissionCurrentGear( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTransmissionCurrentGear", forceResolver: true) @isSignal @hasAggregation """ @@ -625,7 +691,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTransmissionTemperature( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTransmissionTemperature", forceResolver: true) @isSignal @hasAggregation """ @@ -634,7 +701,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTransmissionTravelledDistance( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTransmissionTravelledDistance", forceResolver: true) @isSignal @hasAggregation """ @@ -651,7 +719,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ serviceDistanceToService( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "ServiceDistanceToService", forceResolver: true) @isSignal @hasAggregation """ @@ -660,7 +729,8 @@ extend type SignalAggregations { Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ speed( - agg: FloatAggregation! + agg: FloatAggregation!, + filter: SignalFloatFilter ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "Speed", forceResolver: true) @isSignal @hasAggregation } From 3a165a692faca1876f0d4bf55d8e565c6028a98c Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Thu, 26 Jun 2025 15:49:59 -0400 Subject: [PATCH 02/36] Whoops --- internal/service/ch/queries.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/internal/service/ch/queries.go b/internal/service/ch/queries.go index 75c6f494..c398f566 100644 --- a/internal/service/ch/queries.go +++ b/internal/service/ch/queries.go @@ -368,11 +368,6 @@ func getAggQuery(aggArgs *model.AggregatedSignalArgs) (string, []any, error) { } } - bigWhere := []qm.QueryMod{} - if len(floatArgs) == 0 { - bigWhere = append(bigWhere) - } - mods := []qm.QueryMod{ qm.Select(HandleCol), selectInterval(aggArgs.Interval, aggArgs.FromTS), From bcd3b7c16dc4fc723b9afaa2e9df214d763a303b Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Thu, 26 Jun 2025 15:51:23 -0400 Subject: [PATCH 03/36] Template indentation --- internal/graph/signals_gen.resolvers.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/graph/signals_gen.resolvers.tmpl b/internal/graph/signals_gen.resolvers.tmpl index 85719fdb..1f7adef4 100644 --- a/internal/graph/signals_gen.resolvers.tmpl +++ b/internal/graph/signals_gen.resolvers.tmpl @@ -13,7 +13,7 @@ import ( {{- if eq .GQLType "Float" }} func (r *signalAggregationsResolver) {{ GQLGenResolverName .JSONName }}(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } @@ -22,7 +22,7 @@ func (r *signalAggregationsResolver) {{ GQLGenResolverName .JSONName }}(ctx cont {{ else }} func (r *signalAggregationsResolver) {{ GQLGenResolverName .JSONName }}(ctx context.Context, obj *model.SignalAggregations, agg model.StringAggregation) (*string, error) { fieldCtx := graphql.GetFieldContext(ctx) - vs, ok := obj.ValueStrings[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vs, ok := obj.ValueStrings[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] if !ok { return nil, nil } From 17e967622230f86c4eb00dc09bd54666116bbaf4 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Thu, 26 Jun 2025 15:51:48 -0400 Subject: [PATCH 04/36] Newline --- schema/base.graphqls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/base.graphqls b/schema/base.graphqls index 2c269717..82a7cf98 100644 --- a/schema/base.graphqls +++ b/schema/base.graphqls @@ -187,4 +187,4 @@ input SignalFloatFilter { lt: Float gte: Float lte: Float -} \ No newline at end of file +} From cc8bb9eccff0725e58b57c5284a50799b3dbad7c Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Thu, 26 Jun 2025 15:52:59 -0400 Subject: [PATCH 05/36] Types failing me --- internal/service/ch/queries.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/service/ch/queries.go b/internal/service/ch/queries.go index c398f566..04afd941 100644 --- a/internal/service/ch/queries.go +++ b/internal/service/ch/queries.go @@ -362,9 +362,9 @@ func getAggQuery(aggArgs *model.AggregatedSignalArgs) (string, []any, error) { } if i == 0 { - floatFilters = append(floatFilters, qm.Expr(floatFilters...)) + floatFilters = append(floatFilters, qm.Expr(fieldFilters...)) } else { - floatFilters = append(floatFilters, qm.Or2(qm.Expr(floatFilters...))) + floatFilters = append(floatFilters, qm.Or2(qm.Expr(fieldFilters...))) } } From 4e78140448c930ea6576ddf97d2b6d7b0bc8db21 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Thu, 26 Jun 2025 17:27:44 -0400 Subject: [PATCH 06/36] Superfund site --- internal/graph/arguments.go | 42 +++--- internal/graph/generated.go | 3 +- internal/graph/model/signalArgs.go | 19 +-- internal/graph/model/signalSetter.tmpl | 17 +++ internal/graph/model/signalSetter_gen.go | 161 +++++++++++++++++++++ internal/graph/model/signal_aggs.go | 6 +- internal/graph/model/tmp.go | 12 -- internal/graph/signals_gen.resolvers.go | 152 +++++++++---------- internal/graph/signals_gen.resolvers.tmpl | 4 +- internal/repositories/repositories.go | 3 +- internal/repositories/repositories_test.go | 20 +-- internal/service/ch/ch.go | 44 +++++- internal/service/ch/ch_test.go | 25 ++-- internal/service/ch/queries.go | 47 +++--- 14 files changed, 370 insertions(+), 185 deletions(-) delete mode 100644 internal/graph/model/tmp.go diff --git a/internal/graph/arguments.go b/internal/graph/arguments.go index 84586973..dbe9917e 100644 --- a/internal/graph/arguments.go +++ b/internal/graph/arguments.go @@ -22,19 +22,15 @@ func aggregationArgsFromContext(ctx context.Context, tokenID int, interval strin TokenID: uint32(tokenID), Filter: filter, }, - FromTS: from, - ToTS: to, - Interval: intervalInt, - FloatArgs: make(map[string]model.FloatSignalArgs), - StringArgs: make(map[string]model.StringSignalArgs), + FromTS: from, + ToTS: to, + Interval: intervalInt, + AliasToName: make(map[string]string), } fields := graphql.CollectFieldsCtx(ctx, nil) parentCtx := graphql.GetFieldContext(ctx) - floatIndex := 0 - stringIndex := 0 - for _, field := range fields { if !isSignal(field) || !hasAggregations(field) { continue @@ -46,27 +42,23 @@ func aggregationArgsFromContext(ctx context.Context, tokenID int, interval strin agg := child.Args["agg"] alias := child.Field.Alias + name := child.Field.Name + aggArgs.AliasToName[alias] = name switch typedAgg := agg.(type) { case model.FloatAggregation: - handle := fmt.Sprintf("float%d", floatIndex) filter := child.Args["filter"].(*model.SignalFloatFilter) - aggArgs.FloatArgs[child.Field.Alias] = model.FloatSignalArgs{ - Name: child.Field.Name, - Agg: typedAgg, - Filter: filter, - QueryHandle: handle, - } - aggArgs.AliasToHandle[alias] = handle - floatIndex++ + aggArgs.FloatArgs = append(aggArgs.FloatArgs, model.FloatSignalArgs{ + Name: name, + Agg: typedAgg, + Alias: alias, + Filter: filter, + }) case model.StringAggregation: - handle := fmt.Sprintf("string%d", floatIndex) - aggArgs.StringArgs[child.Field.Alias] = model.StringSignalArgs{ - Name: child.Field.Name, - Agg: typedAgg, - QueryHandle: handle, - } - aggArgs.AliasToHandle[alias] = handle - stringIndex++ + aggArgs.StringArgs = append(aggArgs.StringArgs, model.StringSignalArgs{ + Name: name, + Agg: typedAgg, + Alias: alias, + }) default: return nil, fmt.Errorf("unknown aggregation type: %T", agg) } diff --git a/internal/graph/generated.go b/internal/graph/generated.go index 9bffd23d..8330f6a2 100644 --- a/internal/graph/generated.go +++ b/internal/graph/generated.go @@ -2574,7 +2574,8 @@ input SignalFloatFilter { lt: Float gte: Float lte: Float -}`, BuiltIn: false}, +} +`, BuiltIn: false}, {Name: "../../schema/device_activity.graphqls", Input: `extend type Query { """ DeviceActivity indicates when a given device last transmitted data. For privacy, ranges are used rather than exact timestamps. diff --git a/internal/graph/model/signalArgs.go b/internal/graph/model/signalArgs.go index 265c4cd9..864a9db7 100644 --- a/internal/graph/model/signalArgs.go +++ b/internal/graph/model/signalArgs.go @@ -40,13 +40,11 @@ type AggregatedSignalArgs struct { // Interval in which the data is aggregated in milliseconds. Interval int64 // FloatArgs represents arguments for each float signal. - // Handle -> Args - FloatArgs map[string]FloatSignalArgs + FloatArgs []FloatSignalArgs // StringArgs represents arguments for each string signal. - // Handle -> Args - StringArgs map[string]StringSignalArgs - - AliasToHandle map[string]string + StringArgs []StringSignalArgs + // AliasToName maps a GraphQL alias to a normal field name. + AliasToName map[string]string } // FloatSignalArgs is the arguments for querying a float signals. @@ -56,7 +54,9 @@ type FloatSignalArgs struct { // Agg is the aggregation type. Agg FloatAggregation - QueryHandle string + // Alias is the GraphQL field alias. If the client doesn't specify + // an alias then this will be the same as Name. + Alias string Filter *SignalFloatFilter } @@ -67,6 +67,7 @@ type StringSignalArgs struct { Name string // Agg is the aggregation type. Agg StringAggregation - - QueryHandle string + // Alias is the GraphQL field alias. If the client doesn't specify + // an alias then this will be the same as Name. + Alias string } diff --git a/internal/graph/model/signalSetter.tmpl b/internal/graph/model/signalSetter.tmpl index 06c6bbd6..07af99f8 100644 --- a/internal/graph/model/signalSetter.tmpl +++ b/internal/graph/model/signalSetter.tmpl @@ -23,3 +23,20 @@ func SetCollectionField(collection *SignalCollection, signal *vss.Signal) { {{- end }} } } + +// SetAggregationField find the matching field based on the signal name and set the value based on the signal value. +func SetAggregationField(aggregations *SignalAggregations, signal *AggSignal, aliasToName map[string]string) { + if aggregations == nil || signal == nil { + return + } + switch aliasToName[signal.Alias] { +{{- range .Signals }} + case "{{ .JSONName }}": + {{- if eq .GQLType "Float" }} + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + {{- else }} + aggregations.ValueStrings[signal.Alias] = signal.ValueString + {{- end }} +{{- end }} + } +} diff --git a/internal/graph/model/signalSetter_gen.go b/internal/graph/model/signalSetter_gen.go index 4e32f3b9..6f4f7119 100644 --- a/internal/graph/model/signalSetter_gen.go +++ b/internal/graph/model/signalSetter_gen.go @@ -391,3 +391,164 @@ func SetCollectionField(collection *SignalCollection, signal *vss.Signal) { } } } + +// SetAggregationField find the matching field based on the signal name and set the value based on the signal value. +func SetAggregationField(aggregations *SignalAggregations, signal *AggSignal, aliasToName map[string]string) { + if aggregations == nil || signal == nil { + return + } + switch aliasToName[signal.Alias] { + case "angularVelocityYaw": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "cabinDoorRow1DriverSideIsOpen": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "cabinDoorRow1DriverSideWindowIsOpen": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "cabinDoorRow1PassengerSideIsOpen": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "cabinDoorRow1PassengerSideWindowIsOpen": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "cabinDoorRow2DriverSideIsOpen": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "cabinDoorRow2DriverSideWindowIsOpen": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "cabinDoorRow2PassengerSideIsOpen": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "cabinDoorRow2PassengerSideWindowIsOpen": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "chassisAxleRow1WheelLeftSpeed": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "chassisAxleRow1WheelLeftTirePressure": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "chassisAxleRow1WheelRightSpeed": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "chassisAxleRow1WheelRightTirePressure": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "chassisAxleRow2WheelLeftTirePressure": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "chassisAxleRow2WheelRightTirePressure": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "currentLocationAltitude": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "currentLocationHeading": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "currentLocationIsRedacted": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "currentLocationLatitude": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "currentLocationLongitude": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "dimoAftermarketHDOP": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "dimoAftermarketNSAT": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "dimoAftermarketSSID": + aggregations.ValueStrings[signal.Alias] = signal.ValueString + case "dimoAftermarketWPAState": + aggregations.ValueStrings[signal.Alias] = signal.ValueString + case "exteriorAirTemperature": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "isIgnitionOn": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "lowVoltageBatteryCurrentVoltage": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "obdBarometricPressure": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "obdCommandedEGR": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "obdCommandedEVAP": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "obdDTCList": + aggregations.ValueStrings[signal.Alias] = signal.ValueString + case "obdDistanceSinceDTCClear": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "obdDistanceWithMIL": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "obdEngineLoad": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "obdFuelPressure": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "obdIntakeTemp": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "obdLongTermFuelTrim1": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "obdMAP": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "obdO2WRSensor1Voltage": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "obdO2WRSensor2Voltage": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "obdRunTime": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "obdShortTermFuelTrim1": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "obdWarmupsSinceDTCClear": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainCombustionEngineDieselExhaustFluidCapacity": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainCombustionEngineDieselExhaustFluidLevel": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainCombustionEngineECT": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainCombustionEngineEOP": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainCombustionEngineEOT": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainCombustionEngineEngineOilLevel": + aggregations.ValueStrings[signal.Alias] = signal.ValueString + case "powertrainCombustionEngineEngineOilRelativeLevel": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainCombustionEngineMAF": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainCombustionEngineSpeed": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainCombustionEngineTPS": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainCombustionEngineTorque": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainFuelSystemAbsoluteLevel": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainFuelSystemRelativeLevel": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainFuelSystemSupportedFuelTypes": + aggregations.ValueStrings[signal.Alias] = signal.ValueString + case "powertrainRange": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainTractionBatteryChargingAddedEnergy": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainTractionBatteryChargingChargeCurrentAC": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainTractionBatteryChargingChargeLimit": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainTractionBatteryChargingChargeVoltageUnknownType": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainTractionBatteryChargingIsCharging": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainTractionBatteryCurrentPower": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainTractionBatteryCurrentVoltage": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainTractionBatteryGrossCapacity": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainTractionBatteryRange": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainTractionBatteryStateOfChargeCurrent": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainTractionBatteryStateOfChargeCurrentEnergy": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainTractionBatteryTemperatureAverage": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainTransmissionCurrentGear": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainTransmissionTemperature": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainTransmissionTravelledDistance": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "powertrainType": + aggregations.ValueStrings[signal.Alias] = signal.ValueString + case "serviceDistanceToService": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + case "speed": + aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber + } +} diff --git a/internal/graph/model/signal_aggs.go b/internal/graph/model/signal_aggs.go index 661a4de9..eba70c2e 100644 --- a/internal/graph/model/signal_aggs.go +++ b/internal/graph/model/signal_aggs.go @@ -18,8 +18,6 @@ type SignalAggregations struct { // Alias to value ValueNumbers map[string]float64 `json:"-"` ValueStrings map[string]string `json:"-"` - - SignalArgs *AggregatedSignalArgs `json:"-"` } type FieldInfo struct { @@ -29,9 +27,9 @@ type FieldInfo struct { // AggSignal holds the value of an aggregation for a signal in a certain // time bucket. Only one of ValueNumber and ValueString contains a meaningful -// value, determined by Name. +// value. type AggSignal struct { - Handle string + Alias string Timestamp time.Time ValueNumber float64 ValueString string diff --git a/internal/graph/model/tmp.go b/internal/graph/model/tmp.go deleted file mode 100644 index b126ba17..00000000 --- a/internal/graph/model/tmp.go +++ /dev/null @@ -1,12 +0,0 @@ -package model - -func SetAggregationField(aggregations *SignalAggregations, signal *AggSignal) { - if _, ok := aggregations.SignalArgs.FloatArgs[signal.Handle]; ok { - aggregations.ValueNumbers[signal.Handle] = signal.ValueNumber - return - } - if _, ok := aggregations.SignalArgs.FloatArgs[signal.Handle]; ok { - aggregations.ValueStrings[signal.Handle] = signal.ValueString - return - } -} diff --git a/internal/graph/signals_gen.resolvers.go b/internal/graph/signals_gen.resolvers.go index 3777d7cb..1f87fdcb 100644 --- a/internal/graph/signals_gen.resolvers.go +++ b/internal/graph/signals_gen.resolvers.go @@ -14,7 +14,7 @@ import ( // AngularVelocityYaw is the resolver for the angularVelocityYaw func (r *signalAggregationsResolver) AngularVelocityYaw(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -24,7 +24,7 @@ func (r *signalAggregationsResolver) AngularVelocityYaw(ctx context.Context, obj // CabinDoorRow1DriverSideIsOpen is the resolver for the cabinDoorRow1DriverSideIsOpen func (r *signalAggregationsResolver) CabinDoorRow1DriverSideIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -34,7 +34,7 @@ func (r *signalAggregationsResolver) CabinDoorRow1DriverSideIsOpen(ctx context.C // CabinDoorRow1DriverSideWindowIsOpen is the resolver for the cabinDoorRow1DriverSideWindowIsOpen func (r *signalAggregationsResolver) CabinDoorRow1DriverSideWindowIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -44,7 +44,7 @@ func (r *signalAggregationsResolver) CabinDoorRow1DriverSideWindowIsOpen(ctx con // CabinDoorRow1PassengerSideIsOpen is the resolver for the cabinDoorRow1PassengerSideIsOpen func (r *signalAggregationsResolver) CabinDoorRow1PassengerSideIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -54,7 +54,7 @@ func (r *signalAggregationsResolver) CabinDoorRow1PassengerSideIsOpen(ctx contex // CabinDoorRow1PassengerSideWindowIsOpen is the resolver for the cabinDoorRow1PassengerSideWindowIsOpen func (r *signalAggregationsResolver) CabinDoorRow1PassengerSideWindowIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -64,7 +64,7 @@ func (r *signalAggregationsResolver) CabinDoorRow1PassengerSideWindowIsOpen(ctx // CabinDoorRow2DriverSideIsOpen is the resolver for the cabinDoorRow2DriverSideIsOpen func (r *signalAggregationsResolver) CabinDoorRow2DriverSideIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -74,7 +74,7 @@ func (r *signalAggregationsResolver) CabinDoorRow2DriverSideIsOpen(ctx context.C // CabinDoorRow2DriverSideWindowIsOpen is the resolver for the cabinDoorRow2DriverSideWindowIsOpen func (r *signalAggregationsResolver) CabinDoorRow2DriverSideWindowIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -84,7 +84,7 @@ func (r *signalAggregationsResolver) CabinDoorRow2DriverSideWindowIsOpen(ctx con // CabinDoorRow2PassengerSideIsOpen is the resolver for the cabinDoorRow2PassengerSideIsOpen func (r *signalAggregationsResolver) CabinDoorRow2PassengerSideIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -94,7 +94,7 @@ func (r *signalAggregationsResolver) CabinDoorRow2PassengerSideIsOpen(ctx contex // CabinDoorRow2PassengerSideWindowIsOpen is the resolver for the cabinDoorRow2PassengerSideWindowIsOpen func (r *signalAggregationsResolver) CabinDoorRow2PassengerSideWindowIsOpen(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -104,7 +104,7 @@ func (r *signalAggregationsResolver) CabinDoorRow2PassengerSideWindowIsOpen(ctx // ChassisAxleRow1WheelLeftSpeed is the resolver for the chassisAxleRow1WheelLeftSpeed func (r *signalAggregationsResolver) ChassisAxleRow1WheelLeftSpeed(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -114,7 +114,7 @@ func (r *signalAggregationsResolver) ChassisAxleRow1WheelLeftSpeed(ctx context.C // ChassisAxleRow1WheelLeftTirePressure is the resolver for the chassisAxleRow1WheelLeftTirePressure func (r *signalAggregationsResolver) ChassisAxleRow1WheelLeftTirePressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -124,7 +124,7 @@ func (r *signalAggregationsResolver) ChassisAxleRow1WheelLeftTirePressure(ctx co // ChassisAxleRow1WheelRightSpeed is the resolver for the chassisAxleRow1WheelRightSpeed func (r *signalAggregationsResolver) ChassisAxleRow1WheelRightSpeed(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -134,7 +134,7 @@ func (r *signalAggregationsResolver) ChassisAxleRow1WheelRightSpeed(ctx context. // ChassisAxleRow1WheelRightTirePressure is the resolver for the chassisAxleRow1WheelRightTirePressure func (r *signalAggregationsResolver) ChassisAxleRow1WheelRightTirePressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -144,7 +144,7 @@ func (r *signalAggregationsResolver) ChassisAxleRow1WheelRightTirePressure(ctx c // ChassisAxleRow2WheelLeftTirePressure is the resolver for the chassisAxleRow2WheelLeftTirePressure func (r *signalAggregationsResolver) ChassisAxleRow2WheelLeftTirePressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -154,7 +154,7 @@ func (r *signalAggregationsResolver) ChassisAxleRow2WheelLeftTirePressure(ctx co // ChassisAxleRow2WheelRightTirePressure is the resolver for the chassisAxleRow2WheelRightTirePressure func (r *signalAggregationsResolver) ChassisAxleRow2WheelRightTirePressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -164,7 +164,7 @@ func (r *signalAggregationsResolver) ChassisAxleRow2WheelRightTirePressure(ctx c // CurrentLocationAltitude is the resolver for the currentLocationAltitude func (r *signalAggregationsResolver) CurrentLocationAltitude(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -174,7 +174,7 @@ func (r *signalAggregationsResolver) CurrentLocationAltitude(ctx context.Context // CurrentLocationHeading is the resolver for the currentLocationHeading func (r *signalAggregationsResolver) CurrentLocationHeading(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -184,7 +184,7 @@ func (r *signalAggregationsResolver) CurrentLocationHeading(ctx context.Context, // CurrentLocationIsRedacted is the resolver for the currentLocationIsRedacted func (r *signalAggregationsResolver) CurrentLocationIsRedacted(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -194,7 +194,7 @@ func (r *signalAggregationsResolver) CurrentLocationIsRedacted(ctx context.Conte // CurrentLocationLatitude is the resolver for the currentLocationLatitude func (r *signalAggregationsResolver) CurrentLocationLatitude(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -204,7 +204,7 @@ func (r *signalAggregationsResolver) CurrentLocationLatitude(ctx context.Context // CurrentLocationLongitude is the resolver for the currentLocationLongitude func (r *signalAggregationsResolver) CurrentLocationLongitude(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -214,7 +214,7 @@ func (r *signalAggregationsResolver) CurrentLocationLongitude(ctx context.Contex // DimoAftermarketHdop is the resolver for the dimoAftermarketHDOP func (r *signalAggregationsResolver) DimoAftermarketHdop(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -224,7 +224,7 @@ func (r *signalAggregationsResolver) DimoAftermarketHdop(ctx context.Context, ob // DimoAftermarketNsat is the resolver for the dimoAftermarketNSAT func (r *signalAggregationsResolver) DimoAftermarketNsat(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -234,7 +234,7 @@ func (r *signalAggregationsResolver) DimoAftermarketNsat(ctx context.Context, ob // DimoAftermarketSsid is the resolver for the dimoAftermarketSSID func (r *signalAggregationsResolver) DimoAftermarketSsid(ctx context.Context, obj *model.SignalAggregations, agg model.StringAggregation) (*string, error) { fieldCtx := graphql.GetFieldContext(ctx) - vs, ok := obj.ValueStrings[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vs, ok := obj.ValueStrings[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -244,7 +244,7 @@ func (r *signalAggregationsResolver) DimoAftermarketSsid(ctx context.Context, ob // DimoAftermarketWPAState is the resolver for the dimoAftermarketWPAState func (r *signalAggregationsResolver) DimoAftermarketWPAState(ctx context.Context, obj *model.SignalAggregations, agg model.StringAggregation) (*string, error) { fieldCtx := graphql.GetFieldContext(ctx) - vs, ok := obj.ValueStrings[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vs, ok := obj.ValueStrings[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -254,7 +254,7 @@ func (r *signalAggregationsResolver) DimoAftermarketWPAState(ctx context.Context // ExteriorAirTemperature is the resolver for the exteriorAirTemperature func (r *signalAggregationsResolver) ExteriorAirTemperature(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -264,7 +264,7 @@ func (r *signalAggregationsResolver) ExteriorAirTemperature(ctx context.Context, // IsIgnitionOn is the resolver for the isIgnitionOn func (r *signalAggregationsResolver) IsIgnitionOn(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -274,7 +274,7 @@ func (r *signalAggregationsResolver) IsIgnitionOn(ctx context.Context, obj *mode // LowVoltageBatteryCurrentVoltage is the resolver for the lowVoltageBatteryCurrentVoltage func (r *signalAggregationsResolver) LowVoltageBatteryCurrentVoltage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -284,7 +284,7 @@ func (r *signalAggregationsResolver) LowVoltageBatteryCurrentVoltage(ctx context // ObdBarometricPressure is the resolver for the obdBarometricPressure func (r *signalAggregationsResolver) ObdBarometricPressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -294,7 +294,7 @@ func (r *signalAggregationsResolver) ObdBarometricPressure(ctx context.Context, // ObdCommandedEgr is the resolver for the obdCommandedEGR func (r *signalAggregationsResolver) ObdCommandedEgr(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -304,7 +304,7 @@ func (r *signalAggregationsResolver) ObdCommandedEgr(ctx context.Context, obj *m // ObdCommandedEvap is the resolver for the obdCommandedEVAP func (r *signalAggregationsResolver) ObdCommandedEvap(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -314,7 +314,7 @@ func (r *signalAggregationsResolver) ObdCommandedEvap(ctx context.Context, obj * // ObdDTCList is the resolver for the obdDTCList func (r *signalAggregationsResolver) ObdDTCList(ctx context.Context, obj *model.SignalAggregations, agg model.StringAggregation) (*string, error) { fieldCtx := graphql.GetFieldContext(ctx) - vs, ok := obj.ValueStrings[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vs, ok := obj.ValueStrings[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -324,7 +324,7 @@ func (r *signalAggregationsResolver) ObdDTCList(ctx context.Context, obj *model. // ObdDistanceSinceDTCClear is the resolver for the obdDistanceSinceDTCClear func (r *signalAggregationsResolver) ObdDistanceSinceDTCClear(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -334,7 +334,7 @@ func (r *signalAggregationsResolver) ObdDistanceSinceDTCClear(ctx context.Contex // ObdDistanceWithMil is the resolver for the obdDistanceWithMIL func (r *signalAggregationsResolver) ObdDistanceWithMil(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -344,7 +344,7 @@ func (r *signalAggregationsResolver) ObdDistanceWithMil(ctx context.Context, obj // ObdEngineLoad is the resolver for the obdEngineLoad func (r *signalAggregationsResolver) ObdEngineLoad(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -354,7 +354,7 @@ func (r *signalAggregationsResolver) ObdEngineLoad(ctx context.Context, obj *mod // ObdFuelPressure is the resolver for the obdFuelPressure func (r *signalAggregationsResolver) ObdFuelPressure(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -364,7 +364,7 @@ func (r *signalAggregationsResolver) ObdFuelPressure(ctx context.Context, obj *m // ObdIntakeTemp is the resolver for the obdIntakeTemp func (r *signalAggregationsResolver) ObdIntakeTemp(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -374,7 +374,7 @@ func (r *signalAggregationsResolver) ObdIntakeTemp(ctx context.Context, obj *mod // ObdLongTermFuelTrim1 is the resolver for the obdLongTermFuelTrim1 func (r *signalAggregationsResolver) ObdLongTermFuelTrim1(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -384,7 +384,7 @@ func (r *signalAggregationsResolver) ObdLongTermFuelTrim1(ctx context.Context, o // ObdMap is the resolver for the obdMAP func (r *signalAggregationsResolver) ObdMap(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -394,7 +394,7 @@ func (r *signalAggregationsResolver) ObdMap(ctx context.Context, obj *model.Sign // ObdO2WRSensor1Voltage is the resolver for the obdO2WRSensor1Voltage func (r *signalAggregationsResolver) ObdO2WRSensor1Voltage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -404,7 +404,7 @@ func (r *signalAggregationsResolver) ObdO2WRSensor1Voltage(ctx context.Context, // ObdO2WRSensor2Voltage is the resolver for the obdO2WRSensor2Voltage func (r *signalAggregationsResolver) ObdO2WRSensor2Voltage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -414,7 +414,7 @@ func (r *signalAggregationsResolver) ObdO2WRSensor2Voltage(ctx context.Context, // ObdRunTime is the resolver for the obdRunTime func (r *signalAggregationsResolver) ObdRunTime(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -424,7 +424,7 @@ func (r *signalAggregationsResolver) ObdRunTime(ctx context.Context, obj *model. // ObdShortTermFuelTrim1 is the resolver for the obdShortTermFuelTrim1 func (r *signalAggregationsResolver) ObdShortTermFuelTrim1(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -434,7 +434,7 @@ func (r *signalAggregationsResolver) ObdShortTermFuelTrim1(ctx context.Context, // ObdWarmupsSinceDTCClear is the resolver for the obdWarmupsSinceDTCClear func (r *signalAggregationsResolver) ObdWarmupsSinceDTCClear(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -444,7 +444,7 @@ func (r *signalAggregationsResolver) ObdWarmupsSinceDTCClear(ctx context.Context // PowertrainCombustionEngineDieselExhaustFluidCapacity is the resolver for the powertrainCombustionEngineDieselExhaustFluidCapacity func (r *signalAggregationsResolver) PowertrainCombustionEngineDieselExhaustFluidCapacity(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -454,7 +454,7 @@ func (r *signalAggregationsResolver) PowertrainCombustionEngineDieselExhaustFlui // PowertrainCombustionEngineDieselExhaustFluidLevel is the resolver for the powertrainCombustionEngineDieselExhaustFluidLevel func (r *signalAggregationsResolver) PowertrainCombustionEngineDieselExhaustFluidLevel(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -464,7 +464,7 @@ func (r *signalAggregationsResolver) PowertrainCombustionEngineDieselExhaustFlui // PowertrainCombustionEngineEct is the resolver for the powertrainCombustionEngineECT func (r *signalAggregationsResolver) PowertrainCombustionEngineEct(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -474,7 +474,7 @@ func (r *signalAggregationsResolver) PowertrainCombustionEngineEct(ctx context.C // PowertrainCombustionEngineEop is the resolver for the powertrainCombustionEngineEOP func (r *signalAggregationsResolver) PowertrainCombustionEngineEop(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -484,7 +484,7 @@ func (r *signalAggregationsResolver) PowertrainCombustionEngineEop(ctx context.C // PowertrainCombustionEngineEot is the resolver for the powertrainCombustionEngineEOT func (r *signalAggregationsResolver) PowertrainCombustionEngineEot(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -494,7 +494,7 @@ func (r *signalAggregationsResolver) PowertrainCombustionEngineEot(ctx context.C // PowertrainCombustionEngineEngineOilLevel is the resolver for the powertrainCombustionEngineEngineOilLevel func (r *signalAggregationsResolver) PowertrainCombustionEngineEngineOilLevel(ctx context.Context, obj *model.SignalAggregations, agg model.StringAggregation) (*string, error) { fieldCtx := graphql.GetFieldContext(ctx) - vs, ok := obj.ValueStrings[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vs, ok := obj.ValueStrings[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -504,7 +504,7 @@ func (r *signalAggregationsResolver) PowertrainCombustionEngineEngineOilLevel(ct // PowertrainCombustionEngineEngineOilRelativeLevel is the resolver for the powertrainCombustionEngineEngineOilRelativeLevel func (r *signalAggregationsResolver) PowertrainCombustionEngineEngineOilRelativeLevel(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -514,7 +514,7 @@ func (r *signalAggregationsResolver) PowertrainCombustionEngineEngineOilRelative // PowertrainCombustionEngineMaf is the resolver for the powertrainCombustionEngineMAF func (r *signalAggregationsResolver) PowertrainCombustionEngineMaf(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -524,7 +524,7 @@ func (r *signalAggregationsResolver) PowertrainCombustionEngineMaf(ctx context.C // PowertrainCombustionEngineSpeed is the resolver for the powertrainCombustionEngineSpeed func (r *signalAggregationsResolver) PowertrainCombustionEngineSpeed(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -534,7 +534,7 @@ func (r *signalAggregationsResolver) PowertrainCombustionEngineSpeed(ctx context // PowertrainCombustionEngineTps is the resolver for the powertrainCombustionEngineTPS func (r *signalAggregationsResolver) PowertrainCombustionEngineTps(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -544,7 +544,7 @@ func (r *signalAggregationsResolver) PowertrainCombustionEngineTps(ctx context.C // PowertrainCombustionEngineTorque is the resolver for the powertrainCombustionEngineTorque func (r *signalAggregationsResolver) PowertrainCombustionEngineTorque(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -554,7 +554,7 @@ func (r *signalAggregationsResolver) PowertrainCombustionEngineTorque(ctx contex // PowertrainFuelSystemAbsoluteLevel is the resolver for the powertrainFuelSystemAbsoluteLevel func (r *signalAggregationsResolver) PowertrainFuelSystemAbsoluteLevel(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -564,7 +564,7 @@ func (r *signalAggregationsResolver) PowertrainFuelSystemAbsoluteLevel(ctx conte // PowertrainFuelSystemRelativeLevel is the resolver for the powertrainFuelSystemRelativeLevel func (r *signalAggregationsResolver) PowertrainFuelSystemRelativeLevel(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -574,7 +574,7 @@ func (r *signalAggregationsResolver) PowertrainFuelSystemRelativeLevel(ctx conte // PowertrainFuelSystemSupportedFuelTypes is the resolver for the powertrainFuelSystemSupportedFuelTypes func (r *signalAggregationsResolver) PowertrainFuelSystemSupportedFuelTypes(ctx context.Context, obj *model.SignalAggregations, agg model.StringAggregation) (*string, error) { fieldCtx := graphql.GetFieldContext(ctx) - vs, ok := obj.ValueStrings[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vs, ok := obj.ValueStrings[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -584,7 +584,7 @@ func (r *signalAggregationsResolver) PowertrainFuelSystemSupportedFuelTypes(ctx // PowertrainRange is the resolver for the powertrainRange func (r *signalAggregationsResolver) PowertrainRange(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -594,7 +594,7 @@ func (r *signalAggregationsResolver) PowertrainRange(ctx context.Context, obj *m // PowertrainTractionBatteryChargingAddedEnergy is the resolver for the powertrainTractionBatteryChargingAddedEnergy func (r *signalAggregationsResolver) PowertrainTractionBatteryChargingAddedEnergy(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -604,7 +604,7 @@ func (r *signalAggregationsResolver) PowertrainTractionBatteryChargingAddedEnerg // PowertrainTractionBatteryChargingChargeCurrentAc is the resolver for the powertrainTractionBatteryChargingChargeCurrentAC func (r *signalAggregationsResolver) PowertrainTractionBatteryChargingChargeCurrentAc(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -614,7 +614,7 @@ func (r *signalAggregationsResolver) PowertrainTractionBatteryChargingChargeCurr // PowertrainTractionBatteryChargingChargeLimit is the resolver for the powertrainTractionBatteryChargingChargeLimit func (r *signalAggregationsResolver) PowertrainTractionBatteryChargingChargeLimit(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -624,7 +624,7 @@ func (r *signalAggregationsResolver) PowertrainTractionBatteryChargingChargeLimi // PowertrainTractionBatteryChargingChargeVoltageUnknownType is the resolver for the powertrainTractionBatteryChargingChargeVoltageUnknownType func (r *signalAggregationsResolver) PowertrainTractionBatteryChargingChargeVoltageUnknownType(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -634,7 +634,7 @@ func (r *signalAggregationsResolver) PowertrainTractionBatteryChargingChargeVolt // PowertrainTractionBatteryChargingIsCharging is the resolver for the powertrainTractionBatteryChargingIsCharging func (r *signalAggregationsResolver) PowertrainTractionBatteryChargingIsCharging(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -644,7 +644,7 @@ func (r *signalAggregationsResolver) PowertrainTractionBatteryChargingIsCharging // PowertrainTractionBatteryCurrentPower is the resolver for the powertrainTractionBatteryCurrentPower func (r *signalAggregationsResolver) PowertrainTractionBatteryCurrentPower(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -654,7 +654,7 @@ func (r *signalAggregationsResolver) PowertrainTractionBatteryCurrentPower(ctx c // PowertrainTractionBatteryCurrentVoltage is the resolver for the powertrainTractionBatteryCurrentVoltage func (r *signalAggregationsResolver) PowertrainTractionBatteryCurrentVoltage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -664,7 +664,7 @@ func (r *signalAggregationsResolver) PowertrainTractionBatteryCurrentVoltage(ctx // PowertrainTractionBatteryGrossCapacity is the resolver for the powertrainTractionBatteryGrossCapacity func (r *signalAggregationsResolver) PowertrainTractionBatteryGrossCapacity(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -674,7 +674,7 @@ func (r *signalAggregationsResolver) PowertrainTractionBatteryGrossCapacity(ctx // PowertrainTractionBatteryRange is the resolver for the powertrainTractionBatteryRange func (r *signalAggregationsResolver) PowertrainTractionBatteryRange(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -684,7 +684,7 @@ func (r *signalAggregationsResolver) PowertrainTractionBatteryRange(ctx context. // PowertrainTractionBatteryStateOfChargeCurrent is the resolver for the powertrainTractionBatteryStateOfChargeCurrent func (r *signalAggregationsResolver) PowertrainTractionBatteryStateOfChargeCurrent(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -694,7 +694,7 @@ func (r *signalAggregationsResolver) PowertrainTractionBatteryStateOfChargeCurre // PowertrainTractionBatteryStateOfChargeCurrentEnergy is the resolver for the powertrainTractionBatteryStateOfChargeCurrentEnergy func (r *signalAggregationsResolver) PowertrainTractionBatteryStateOfChargeCurrentEnergy(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -704,7 +704,7 @@ func (r *signalAggregationsResolver) PowertrainTractionBatteryStateOfChargeCurre // PowertrainTractionBatteryTemperatureAverage is the resolver for the powertrainTractionBatteryTemperatureAverage func (r *signalAggregationsResolver) PowertrainTractionBatteryTemperatureAverage(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -714,7 +714,7 @@ func (r *signalAggregationsResolver) PowertrainTractionBatteryTemperatureAverage // PowertrainTransmissionCurrentGear is the resolver for the powertrainTransmissionCurrentGear func (r *signalAggregationsResolver) PowertrainTransmissionCurrentGear(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -724,7 +724,7 @@ func (r *signalAggregationsResolver) PowertrainTransmissionCurrentGear(ctx conte // PowertrainTransmissionTemperature is the resolver for the powertrainTransmissionTemperature func (r *signalAggregationsResolver) PowertrainTransmissionTemperature(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -734,7 +734,7 @@ func (r *signalAggregationsResolver) PowertrainTransmissionTemperature(ctx conte // PowertrainTransmissionTravelledDistance is the resolver for the powertrainTransmissionTravelledDistance func (r *signalAggregationsResolver) PowertrainTransmissionTravelledDistance(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -744,7 +744,7 @@ func (r *signalAggregationsResolver) PowertrainTransmissionTravelledDistance(ctx // PowertrainType is the resolver for the powertrainType func (r *signalAggregationsResolver) PowertrainType(ctx context.Context, obj *model.SignalAggregations, agg model.StringAggregation) (*string, error) { fieldCtx := graphql.GetFieldContext(ctx) - vs, ok := obj.ValueStrings[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vs, ok := obj.ValueStrings[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -754,7 +754,7 @@ func (r *signalAggregationsResolver) PowertrainType(ctx context.Context, obj *mo // ServiceDistanceToService is the resolver for the serviceDistanceToService func (r *signalAggregationsResolver) ServiceDistanceToService(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -764,7 +764,7 @@ func (r *signalAggregationsResolver) ServiceDistanceToService(ctx context.Contex // Speed is the resolver for the speed func (r *signalAggregationsResolver) Speed(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } diff --git a/internal/graph/signals_gen.resolvers.tmpl b/internal/graph/signals_gen.resolvers.tmpl index 1f7adef4..162ddb60 100644 --- a/internal/graph/signals_gen.resolvers.tmpl +++ b/internal/graph/signals_gen.resolvers.tmpl @@ -13,7 +13,7 @@ import ( {{- if eq .GQLType "Float" }} func (r *signalAggregationsResolver) {{ GQLGenResolverName .JSONName }}(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation) (*float64, error) { fieldCtx := graphql.GetFieldContext(ctx) - vn, ok := obj.ValueNumbers[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vn, ok := obj.ValueNumbers[fieldCtx.Field.Alias] if !ok { return nil, nil } @@ -22,7 +22,7 @@ func (r *signalAggregationsResolver) {{ GQLGenResolverName .JSONName }}(ctx cont {{ else }} func (r *signalAggregationsResolver) {{ GQLGenResolverName .JSONName }}(ctx context.Context, obj *model.SignalAggregations, agg model.StringAggregation) (*string, error) { fieldCtx := graphql.GetFieldContext(ctx) - vs, ok := obj.ValueStrings[obj.SignalArgs.AliasToHandle[fieldCtx.Field.Alias]] + vs, ok := obj.ValueStrings[fieldCtx.Field.Alias] if !ok { return nil, nil } diff --git a/internal/repositories/repositories.go b/internal/repositories/repositories.go index 4d221de6..ad47e424 100644 --- a/internal/repositories/repositories.go +++ b/internal/repositories/repositories.go @@ -87,12 +87,11 @@ func (r *Repository) GetSignal(ctx context.Context, aggArgs *model.AggregatedSig Timestamp: signal.Timestamp, ValueNumbers: make(map[string]float64), ValueStrings: make(map[string]string), - SignalArgs: aggArgs, } allAggs = append(allAggs, currAggs) } - model.SetAggregationField(currAggs, signal) + model.SetAggregationField(currAggs, signal, aggArgs.AliasToName) } return allAggs, nil diff --git a/internal/repositories/repositories_test.go b/internal/repositories/repositories_test.go index c5acfeb6..6b02a02f 100644 --- a/internal/repositories/repositories_test.go +++ b/internal/repositories/repositories_test.go @@ -57,7 +57,7 @@ func TestGetSignal(t *testing.T) { aggArgs: defaultArgs, mockSetup: func(m *Mocks) { signals := []*model.AggSignal{ - {Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), Name: vss.FieldSpeed, ValueNumber: 1.0}, + {Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), Handle: "float0", ValueNumber: 1.0}, } m.CHService.EXPECT(). GetAggregatedSignals(gomock.Any(), defaultArgs). @@ -75,9 +75,9 @@ func TestGetSignal(t *testing.T) { aggArgs: defaultArgs, mockSetup: func(m *Mocks) { signals := []*model.AggSignal{ - {Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), Name: vss.FieldSpeed, ValueNumber: 1.0}, - {Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), Name: vss.FieldSpeed, ValueNumber: 2.0}, - {Timestamp: time.Date(2024, 6, 11, 1, 0, 0, 0, time.UTC), Name: vss.FieldSpeed, ValueNumber: 3.0}, + {Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), Handle: "float0", ValueNumber: 1.0}, + {Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), Handle: "float0", ValueNumber: 2.0}, + {Timestamp: time.Date(2024, 6, 11, 1, 0, 0, 0, time.UTC), Handle: "float0", ValueNumber: 3.0}, } m.CHService.EXPECT(). GetAggregatedSignals(gomock.Any(), defaultArgs). @@ -98,9 +98,9 @@ func TestGetSignal(t *testing.T) { aggArgs: defaultArgs, mockSetup: func(m *Mocks) { signals := []*model.AggSignal{ - {Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), Name: vss.FieldSpeed, ValueNumber: 1.0}, - {Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), Name: vss.FieldSpeed, ValueNumber: 2.0}, - {Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), Name: vss.FieldSpeed, ValueNumber: 3.0}, + {Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), Handle: "float0", ValueNumber: 1.0}, + {Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), Handle: "float0", ValueNumber: 2.0}, + {Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), Handle: "float0", ValueNumber: 3.0}, } m.CHService.EXPECT(). GetAggregatedSignals(gomock.Any(), defaultArgs). @@ -118,9 +118,9 @@ func TestGetSignal(t *testing.T) { aggArgs: defaultArgs, mockSetup: func(m *Mocks) { signals := []*model.AggSignal{ - {Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), Name: vss.FieldSpeed, ValueNumber: 1.0}, - {Timestamp: time.Date(2024, 6, 11, 1, 0, 0, 0, time.UTC), Name: vss.FieldSpeed, ValueNumber: 2.0}, - {Timestamp: time.Date(2024, 6, 11, 1, 0, 0, 0, time.UTC), Name: vss.FieldSpeed, ValueNumber: 3.0}, + {Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), Handle: "float0", ValueNumber: 1.0}, + {Timestamp: time.Date(2024, 6, 11, 1, 0, 0, 0, time.UTC), Handle: "float0", ValueNumber: 2.0}, + {Timestamp: time.Date(2024, 6, 11, 1, 0, 0, 0, time.UTC), Handle: "float0", ValueNumber: 3.0}, } m.CHService.EXPECT(). GetAggregatedSignals(gomock.Any(), defaultArgs). diff --git a/internal/service/ch/ch.go b/internal/service/ch/ch.go index 1786f83f..b28b6886 100644 --- a/internal/service/ch/ch.go +++ b/internal/service/ch/ch.go @@ -87,6 +87,30 @@ func (s *Service) GetLatestSignals(ctx context.Context, latestArgs *model.Latest return signals, nil } +type AliasHandleMapper struct { + aliasToHandle, handleToAlias map[string]string +} + +func NewAliasHandleMapper() *AliasHandleMapper { + return &AliasHandleMapper{ + aliasToHandle: make(map[string]string), + handleToAlias: make(map[string]string), + } +} + +func (m *AliasHandleMapper) Add(alias, handle string) { + m.aliasToHandle[alias] = handle + m.handleToAlias[handle] = alias +} + +func (m *AliasHandleMapper) Handle(alias string) string { + return m.aliasToHandle[alias] +} + +func (m *AliasHandleMapper) Alias(handle string) string { + return m.handleToAlias[handle] +} + // GetAggregatedSignals returns a slice of aggregated signals based on the provided arguments from the ClickHouse database. // The signals are sorted by timestamp in ascending order. // The timestamp on each signal is for the start of the interval. @@ -95,12 +119,22 @@ func (s *Service) GetAggregatedSignals(ctx context.Context, aggArgs *model.Aggre return []*model.AggSignal{}, nil } - stmt, args, err := getAggQuery(aggArgs) + ahm := NewAliasHandleMapper() + + for i, arg := range aggArgs.FloatArgs { + ahm.Add(arg.Alias, fmt.Sprintf("float%d", i)) + } + + for i, arg := range aggArgs.StringArgs { + ahm.Add(arg.Alias, fmt.Sprintf("string%d", i)) + } + + stmt, args, err := getAggQuery(aggArgs, ahm) if err != nil { return nil, err } - signals, err := s.getAggSignals(ctx, stmt, args) + signals, err := s.getAggSignals(ctx, stmt, args, ahm) if err != nil { return nil, err } @@ -131,7 +165,7 @@ func (s *Service) getSignals(ctx context.Context, stmt string, args []any) ([]*v } // TODO(elffjs): Ugly duplication. -func (s *Service) getAggSignals(ctx context.Context, stmt string, args []any) ([]*model.AggSignal, error) { +func (s *Service) getAggSignals(ctx context.Context, stmt string, args []any, ahm *AliasHandleMapper) ([]*model.AggSignal, error) { rows, err := s.conn.Query(ctx, stmt, args...) if err != nil { return nil, fmt.Errorf("failed querying clickhouse: %w", err) @@ -139,11 +173,13 @@ func (s *Service) getAggSignals(ctx context.Context, stmt string, args []any) ([ signals := []*model.AggSignal{} for rows.Next() { var signal model.AggSignal - err := rows.Scan(&signal.Handle, &signal.Timestamp, &signal.ValueNumber, &signal.ValueString) + var handle string + err := rows.Scan(&handle, &signal.Timestamp, &signal.ValueNumber, &signal.ValueString) if err != nil { _ = rows.Close() return nil, fmt.Errorf("failed scanning clickhouse row: %w", err) } + signal.Alias = ahm.Alias(handle) signals = append(signals, &signal) } _ = rows.Close() diff --git a/internal/service/ch/ch_test.go b/internal/service/ch/ch_test.go index 7e6557d0..cdbd9807 100644 --- a/internal/service/ch/ch_test.go +++ b/internal/service/ch/ch_test.go @@ -93,19 +93,18 @@ func (c *CHServiceTestSuite) TestGetAggSignal() { FromTS: c.dataStartTime, ToTS: endTs, Interval: day.Milliseconds(), - FloatArgs: map[model.FloatSignalArgs]struct{}{ - { + FloatArgs: map[string]model.FloatSignalArgs{ + "float0": { Name: vss.FieldSpeed, Agg: model.FloatAggregationAvg, - }: {}, + }, }, }, expected: []model.AggSignal{ { - Name: vss.FieldSpeed, + Handle: "float0", Timestamp: c.dataStartTime, ValueNumber: 4.5, - Agg: model.FloatAggregationAvg.String(), }, }, }, @@ -118,29 +117,27 @@ func (c *CHServiceTestSuite) TestGetAggSignal() { FromTS: c.dataStartTime, ToTS: endTs, Interval: day.Milliseconds(), - FloatArgs: map[model.FloatSignalArgs]struct{}{ - { + FloatArgs: map[string]model.FloatSignalArgs{ + "float0": { Name: vss.FieldSpeed, Agg: model.FloatAggregationMax, - }: {}, - { + }, + "float1": { Name: vss.FieldSpeed, Agg: model.FloatAggregationMin, - }: {}, + }, }, }, expected: []model.AggSignal{ { - Name: vss.FieldSpeed, + Handle: "float0", Timestamp: c.dataStartTime, ValueNumber: 9, - Agg: model.FloatAggregationMax.String(), }, { - Name: vss.FieldSpeed, + Handle: "float1", Timestamp: c.dataStartTime, ValueNumber: 0, - Agg: model.FloatAggregationMin.String(), }, }, }, diff --git a/internal/service/ch/queries.go b/internal/service/ch/queries.go index 04afd941..b1489383 100644 --- a/internal/service/ch/queries.go +++ b/internal/service/ch/queries.go @@ -27,7 +27,7 @@ const ( sourceWhere = vss.SourceCol + " = ?" sourceIn = vss.SourceCol + " IN ?" groupAsc = IntervalGroup + " ASC" - valueTableDef = vss.NameCol + " String, handle String" + valueTableDef = "handle String, " + vss.NameCol + " String" ) // varibles for the last seen signal query. @@ -126,27 +126,27 @@ func selectInterval(milliSeconds int64, origin time.Time) qm.QueryMod { vss.TimestampCol, origin.UnixMicro(), milliSeconds, origin.UnixMicro(), IntervalGroup)) } -func selectNumberAggs(numberAggs []model.FloatSignalArgs) qm.QueryMod { +func selectNumberAggs(numberAggs []model.FloatSignalArgs, ahm *AliasHandleMapper) qm.QueryMod { if len(numberAggs) == 0 { return qm.Select("NULL AS " + vss.ValueNumberCol) } // Add a CASE statement for each name and its corresponding aggregation function - caseStmts := make([]string, len(numberAggs)) - for i := range numberAggs { - caseStmts[i] = fmt.Sprintf("WHEN %s = '%s' THEN %s", HandleCol, numberAggs[i].QueryHandle, getFloatAggFunc(numberAggs[i].Agg)) + caseStmts := make([]string, 0, len(numberAggs)) + for _, agg := range numberAggs { + caseStmts = append(caseStmts, fmt.Sprintf("WHEN %s = '%s' THEN %s", HandleCol, ahm.Handle(agg.Alias), getFloatAggFunc(agg.Agg))) } caseStmt := fmt.Sprintf("CASE %s ELSE NULL END AS %s", strings.Join(caseStmts, " "), vss.ValueNumberCol) return qm.Select(caseStmt) } -func selectStringAggs(stringAggs []model.StringSignalArgs) qm.QueryMod { +func selectStringAggs(stringAggs []model.StringSignalArgs, ahm *AliasHandleMapper) qm.QueryMod { if len(stringAggs) == 0 { return qm.Select("NULL AS " + vss.ValueStringCol) } // Add a CASE statement for each name and its corresponding aggregation function - caseStmts := make([]string, len(stringAggs)) - for i := range stringAggs { - caseStmts[i] = fmt.Sprintf("WHEN %s = '%s' AND %s = '%s' THEN %s", HandleCol, stringAggs[i].QueryHandle, getStringAgg(stringAggs[i].Agg)) + caseStmts := make([]string, 0, len(stringAggs)) + for _, agg := range stringAggs { + caseStmts = append(caseStmts, fmt.Sprintf("WHEN %s = '%s' AND %s = '%s' THEN %s", HandleCol, ahm.Handle(agg.Alias), getStringAgg(agg.Agg))) } caseStmt := fmt.Sprintf("CASE %s ELSE NULL END AS %s", strings.Join(caseStmts, " "), vss.ValueStringCol) return qm.Select(caseStmt) @@ -312,7 +312,7 @@ ORDER BY name ASC, agg ASC; */ -func getAggQuery(aggArgs *model.AggregatedSignalArgs) (string, []any, error) { +func getAggQuery(aggArgs *model.AggregatedSignalArgs, ahm *AliasHandleMapper) (string, []any, error) { if aggArgs == nil { return "", nil, nil } @@ -321,31 +321,25 @@ func getAggQuery(aggArgs *model.AggregatedSignalArgs) (string, []any, error) { if numAggs == 0 { return "", nil, errors.New("no aggregations requested") } - floatArgs := make([]model.FloatSignalArgs, 0, len(aggArgs.FloatArgs)) - stringArgs := make([]model.StringSignalArgs, 0, len(aggArgs.StringArgs)) - for _, agg := range aggArgs.FloatArgs { - floatArgs = append(floatArgs, agg) - } - for _, agg := range aggArgs.StringArgs { - stringArgs = append(stringArgs, agg) - } // I can't find documentation for this VALUES syntax anywhere besides GitHub // https://github.com/ClickHouse/ClickHouse/issues/5984#issuecomment-513411725 // You can see the alternatives in the issue and they are ugly. valuesArgs := make([]string, 0, numAggs) - for _, agg := range floatArgs { - valuesArgs = append(valuesArgs, fmt.Sprintf("('%s', '%s')", agg.Name, agg.QueryHandle)) + for _, agg := range aggArgs.FloatArgs { + valuesArgs = append(valuesArgs, fmt.Sprintf("('%s', '%s')", ahm.Handle(agg.Alias), agg.Name)) } - for _, agg := range stringArgs { - valuesArgs = append(valuesArgs, fmt.Sprintf("('%s', '%s')", agg.Name, agg.QueryHandle)) + for _, agg := range aggArgs.StringArgs { + valuesArgs = append(valuesArgs, fmt.Sprintf("('%s', '%s')", ahm.Handle(agg.Alias), agg.Name)) } valueTable := fmt.Sprintf("VALUES('%s', %s) as %s ON %s.%s = %s.%s", valueTableDef, strings.Join(valuesArgs, ", "), aggTableName, vss.TableName, vss.NameCol, aggTableName, vss.NameCol) var floatFilters []qm.QueryMod - for i, agg := range floatArgs { - fieldFilters := []qm.QueryMod{qmhelper.Where(HandleCol, qmhelper.EQ, agg.QueryHandle)} + i := 0 + + for _, agg := range aggArgs.FloatArgs { + fieldFilters := []qm.QueryMod{qmhelper.Where(HandleCol, qmhelper.EQ, ahm.Handle(agg.Alias))} if fil := agg.Filter; fil != nil { if fil.Gt != nil { fieldFilters = append(fieldFilters, qmhelper.Where(vss.ValueNumberCol, qmhelper.GT, *fil.Gt)) @@ -366,13 +360,14 @@ func getAggQuery(aggArgs *model.AggregatedSignalArgs) (string, []any, error) { } else { floatFilters = append(floatFilters, qm.Or2(qm.Expr(fieldFilters...))) } + i++ } mods := []qm.QueryMod{ qm.Select(HandleCol), selectInterval(aggArgs.Interval, aggArgs.FromTS), - selectNumberAggs(floatArgs), - selectStringAggs(stringArgs), + selectNumberAggs(aggArgs.FloatArgs, ahm), + selectStringAggs(aggArgs.StringArgs, ahm), qm.Where(tokenIDWhere, aggArgs.TokenID), qm.Where(timestampFrom, aggArgs.FromTS), qm.Where(timestampTo, aggArgs.ToTS), From d566e9f48435a74429f34c1439914de52532d5c1 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Thu, 26 Jun 2025 17:47:45 -0400 Subject: [PATCH 07/36] Fix value construction for string columns --- internal/service/ch/queries.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/service/ch/queries.go b/internal/service/ch/queries.go index b1489383..d4bad100 100644 --- a/internal/service/ch/queries.go +++ b/internal/service/ch/queries.go @@ -146,7 +146,7 @@ func selectStringAggs(stringAggs []model.StringSignalArgs, ahm *AliasHandleMappe // Add a CASE statement for each name and its corresponding aggregation function caseStmts := make([]string, 0, len(stringAggs)) for _, agg := range stringAggs { - caseStmts = append(caseStmts, fmt.Sprintf("WHEN %s = '%s' AND %s = '%s' THEN %s", HandleCol, ahm.Handle(agg.Alias), getStringAgg(agg.Agg))) + caseStmts = append(caseStmts, fmt.Sprintf("WHEN %s = '%s' THEN %s", HandleCol, ahm.Handle(agg.Alias), getStringAgg(agg.Agg))) } caseStmt := fmt.Sprintf("CASE %s ELSE NULL END AS %s", strings.Join(caseStmts, " "), vss.ValueStringCol) return qm.Select(caseStmt) From db4a45a7a4f0e62edb4353c6b9e2677beccbb74d Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Thu, 26 Jun 2025 21:42:34 -0400 Subject: [PATCH 08/36] Fix column shadowing --- internal/service/ch/queries.go | 10 +++++----- uuid | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 uuid diff --git a/internal/service/ch/queries.go b/internal/service/ch/queries.go index d4bad100..fdfb97b1 100644 --- a/internal/service/ch/queries.go +++ b/internal/service/ch/queries.go @@ -17,7 +17,8 @@ import ( const ( // IntervalGroup is the column alias for the interval group. IntervalGroup = "group_timestamp" - AggCol = "agg" + AggNumberCol = "agg_number" + AggStringCol = "agg_string" HandleCol = "handle" aggTableName = "agg_table" tokenIDWhere = vss.TokenIDCol + " = ?" @@ -135,7 +136,7 @@ func selectNumberAggs(numberAggs []model.FloatSignalArgs, ahm *AliasHandleMapper for _, agg := range numberAggs { caseStmts = append(caseStmts, fmt.Sprintf("WHEN %s = '%s' THEN %s", HandleCol, ahm.Handle(agg.Alias), getFloatAggFunc(agg.Agg))) } - caseStmt := fmt.Sprintf("CASE %s ELSE NULL END AS %s", strings.Join(caseStmts, " "), vss.ValueNumberCol) + caseStmt := fmt.Sprintf("CASE %s ELSE NULL END AS %s", strings.Join(caseStmts, " "), AggNumberCol) return qm.Select(caseStmt) } @@ -148,7 +149,7 @@ func selectStringAggs(stringAggs []model.StringSignalArgs, ahm *AliasHandleMappe for _, agg := range stringAggs { caseStmts = append(caseStmts, fmt.Sprintf("WHEN %s = '%s' THEN %s", HandleCol, ahm.Handle(agg.Alias), getStringAgg(agg.Agg))) } - caseStmt := fmt.Sprintf("CASE %s ELSE NULL END AS %s", strings.Join(caseStmts, " "), vss.ValueStringCol) + caseStmt := fmt.Sprintf("CASE %s ELSE NULL END AS %s", strings.Join(caseStmts, " "), AggStringCol) return qm.Select(caseStmt) } @@ -374,8 +375,7 @@ func getAggQuery(aggArgs *model.AggregatedSignalArgs, ahm *AliasHandleMapper) (s qm.From(vss.TableName), qm.InnerJoin(valueTable), qm.GroupBy(IntervalGroup), - qm.GroupBy(vss.NameCol), - qm.GroupBy(AggCol), + qm.GroupBy(HandleCol), qm.OrderBy(groupAsc), } mods = append(mods, getFilterMods(aggArgs.Filter)...) diff --git a/uuid b/uuid new file mode 100644 index 00000000..bf4bd36d --- /dev/null +++ b/uuid @@ -0,0 +1 @@ +66338421-9578-44b7-bc5c-25f44e9c9bb4 \ No newline at end of file From e33238bd14a608480862c9fd55bbd4118996578d Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Thu, 26 Jun 2025 22:23:09 -0400 Subject: [PATCH 09/36] Add float neq and notIn filters --- internal/graph/generated.go | 54 +++++++++++++++++++++++++++++- internal/graph/model/models_gen.go | 10 +++--- internal/graph/model/signalArgs.go | 5 ++- internal/service/ch/queries.go | 6 ++++ schema/base.graphqls | 2 ++ 5 files changed, 69 insertions(+), 8 deletions(-) diff --git a/internal/graph/generated.go b/internal/graph/generated.go index 8330f6a2..b03af889 100644 --- a/internal/graph/generated.go +++ b/internal/graph/generated.go @@ -2574,6 +2574,8 @@ input SignalFloatFilter { lt: Float gte: Float lte: Float + neq: Float + notIn: [Float!] } `, BuiltIn: false}, {Name: "../../schema/device_activity.graphqls", Input: `extend type Query { @@ -26326,7 +26328,7 @@ func (ec *executionContext) unmarshalInputSignalFloatFilter(ctx context.Context, asMap[k] = v } - fieldsInOrder := [...]string{"gt", "lt", "gte", "lte"} + fieldsInOrder := [...]string{"gt", "lt", "gte", "lte", "neq", "notIn"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -26361,6 +26363,20 @@ func (ec *executionContext) unmarshalInputSignalFloatFilter(ctx context.Context, return it, err } it.Lte = data + case "neq": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("neq")) + data, err := ec.unmarshalOFloat2ᚖfloat64(ctx, v) + if err != nil { + return it, err + } + it.Neq = data + case "notIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("notIn")) + data, err := ec.unmarshalOFloat2ᚕfloat64ᚄ(ctx, v) + if err != nil { + return it, err + } + it.NotIn = data } } @@ -30564,6 +30580,42 @@ func (ec *executionContext) marshalODeviceActivity2ᚖgithubᚗcomᚋDIMOᚑNetw return ec._DeviceActivity(ctx, sel, v) } +func (ec *executionContext) unmarshalOFloat2ᚕfloat64ᚄ(ctx context.Context, v any) ([]float64, error) { + if v == nil { + return nil, nil + } + var vSlice []any + vSlice = graphql.CoerceList(v) + var err error + res := make([]float64, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNFloat2float64(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOFloat2ᚕfloat64ᚄ(ctx context.Context, sel ast.SelectionSet, v []float64) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNFloat2float64(ctx, sel, v[i]) + } + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + func (ec *executionContext) unmarshalOFloat2ᚖfloat64(ctx context.Context, v any) (*float64, error) { if v == nil { return nil, nil diff --git a/internal/graph/model/models_gen.go b/internal/graph/model/models_gen.go index f3f339d1..0491ad32 100644 --- a/internal/graph/model/models_gen.go +++ b/internal/graph/model/models_gen.go @@ -395,10 +395,12 @@ type SignalFloat struct { } type SignalFloatFilter struct { - Gt *float64 `json:"gt,omitempty"` - Lt *float64 `json:"lt,omitempty"` - Gte *float64 `json:"gte,omitempty"` - Lte *float64 `json:"lte,omitempty"` + Gt *float64 `json:"gt,omitempty"` + Lt *float64 `json:"lt,omitempty"` + Gte *float64 `json:"gte,omitempty"` + Lte *float64 `json:"lte,omitempty"` + Neq *float64 `json:"neq,omitempty"` + NotIn []float64 `json:"notIn,omitempty"` } type SignalString struct { diff --git a/internal/graph/model/signalArgs.go b/internal/graph/model/signalArgs.go index 864a9db7..b3d6fe50 100644 --- a/internal/graph/model/signalArgs.go +++ b/internal/graph/model/signalArgs.go @@ -43,7 +43,7 @@ type AggregatedSignalArgs struct { FloatArgs []FloatSignalArgs // StringArgs represents arguments for each string signal. StringArgs []StringSignalArgs - // AliasToName maps a GraphQL alias to a normal field name. + // AliasToName maps each GraphQL alias to a normal field name. AliasToName map[string]string } @@ -53,11 +53,10 @@ type FloatSignalArgs struct { Name string // Agg is the aggregation type. Agg FloatAggregation - // Alias is the GraphQL field alias. If the client doesn't specify // an alias then this will be the same as Name. Alias string - + // Filter is an optional set of float value filters. Filter *SignalFloatFilter } diff --git a/internal/service/ch/queries.go b/internal/service/ch/queries.go index fdfb97b1..43dbcc74 100644 --- a/internal/service/ch/queries.go +++ b/internal/service/ch/queries.go @@ -354,6 +354,12 @@ func getAggQuery(aggArgs *model.AggregatedSignalArgs, ahm *AliasHandleMapper) (s if fil.Lte != nil { fieldFilters = append(fieldFilters, qmhelper.Where(vss.ValueNumberCol, qmhelper.LTE, *fil.Lte)) } + if fil.Neq != nil { + fieldFilters = append(fieldFilters, qmhelper.Where(vss.ValueNumberCol, qmhelper.NEQ, *fil.Neq)) + } + if len(fil.NotIn) != 0 { + fieldFilters = append(fieldFilters, qm.WhereNotIn(vss.ValueNumberCol+" NOT IN ?", fil.NotIn)) + } } if i == 0 { diff --git a/schema/base.graphqls b/schema/base.graphqls index 82a7cf98..d1711f73 100644 --- a/schema/base.graphqls +++ b/schema/base.graphqls @@ -187,4 +187,6 @@ input SignalFloatFilter { lt: Float gte: Float lte: Float + neq: Float + notIn: [Float!] } From b4b7a872ae446b46609c1fb13f2d1f0803899668 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Fri, 27 Jun 2025 15:25:10 -0400 Subject: [PATCH 10/36] Add eq and in operators --- internal/graph/generated.go | 34 ++++++++++++++++++++++-------- internal/graph/model/models_gen.go | 4 +++- internal/service/ch/queries.go | 12 ++++++++--- schema/base.graphqls | 4 +++- 4 files changed, 40 insertions(+), 14 deletions(-) diff --git a/internal/graph/generated.go b/internal/graph/generated.go index b03af889..79316a13 100644 --- a/internal/graph/generated.go +++ b/internal/graph/generated.go @@ -2570,12 +2570,14 @@ input SignalFilter { # TODO(elffjs): Do we need more operators? # TODO(elffjs): Recursive "or" support. input SignalFloatFilter { + eq: Float + neq: Float gt: Float lt: Float gte: Float lte: Float - neq: Float notIn: [Float!] + in: [Float!] } `, BuiltIn: false}, {Name: "../../schema/device_activity.graphqls", Input: `extend type Query { @@ -26328,13 +26330,27 @@ func (ec *executionContext) unmarshalInputSignalFloatFilter(ctx context.Context, asMap[k] = v } - fieldsInOrder := [...]string{"gt", "lt", "gte", "lte", "neq", "notIn"} + fieldsInOrder := [...]string{"eq", "neq", "gt", "lt", "gte", "lte", "notIn", "in"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { continue } switch k { + case "eq": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("eq")) + data, err := ec.unmarshalOFloat2ᚖfloat64(ctx, v) + if err != nil { + return it, err + } + it.Eq = data + case "neq": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("neq")) + data, err := ec.unmarshalOFloat2ᚖfloat64(ctx, v) + if err != nil { + return it, err + } + it.Neq = data case "gt": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gt")) data, err := ec.unmarshalOFloat2ᚖfloat64(ctx, v) @@ -26363,13 +26379,6 @@ func (ec *executionContext) unmarshalInputSignalFloatFilter(ctx context.Context, return it, err } it.Lte = data - case "neq": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("neq")) - data, err := ec.unmarshalOFloat2ᚖfloat64(ctx, v) - if err != nil { - return it, err - } - it.Neq = data case "notIn": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("notIn")) data, err := ec.unmarshalOFloat2ᚕfloat64ᚄ(ctx, v) @@ -26377,6 +26386,13 @@ func (ec *executionContext) unmarshalInputSignalFloatFilter(ctx context.Context, return it, err } it.NotIn = data + case "in": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + data, err := ec.unmarshalOFloat2ᚕfloat64ᚄ(ctx, v) + if err != nil { + return it, err + } + it.In = data } } diff --git a/internal/graph/model/models_gen.go b/internal/graph/model/models_gen.go index 0491ad32..55e4cde0 100644 --- a/internal/graph/model/models_gen.go +++ b/internal/graph/model/models_gen.go @@ -395,12 +395,14 @@ type SignalFloat struct { } type SignalFloatFilter struct { + Eq *float64 `json:"eq,omitempty"` + Neq *float64 `json:"neq,omitempty"` Gt *float64 `json:"gt,omitempty"` Lt *float64 `json:"lt,omitempty"` Gte *float64 `json:"gte,omitempty"` Lte *float64 `json:"lte,omitempty"` - Neq *float64 `json:"neq,omitempty"` NotIn []float64 `json:"notIn,omitempty"` + In []float64 `json:"in,omitempty"` } type SignalString struct { diff --git a/internal/service/ch/queries.go b/internal/service/ch/queries.go index 43dbcc74..4e9a24d5 100644 --- a/internal/service/ch/queries.go +++ b/internal/service/ch/queries.go @@ -342,6 +342,12 @@ func getAggQuery(aggArgs *model.AggregatedSignalArgs, ahm *AliasHandleMapper) (s for _, agg := range aggArgs.FloatArgs { fieldFilters := []qm.QueryMod{qmhelper.Where(HandleCol, qmhelper.EQ, ahm.Handle(agg.Alias))} if fil := agg.Filter; fil != nil { + if fil.Eq != nil { + fieldFilters = append(fieldFilters, qmhelper.Where(vss.ValueNumberCol, qmhelper.EQ, *fil.Eq)) + } + if fil.Neq != nil { + fieldFilters = append(fieldFilters, qmhelper.Where(vss.ValueNumberCol, qmhelper.NEQ, *fil.Neq)) + } if fil.Gt != nil { fieldFilters = append(fieldFilters, qmhelper.Where(vss.ValueNumberCol, qmhelper.GT, *fil.Gt)) } @@ -354,12 +360,12 @@ func getAggQuery(aggArgs *model.AggregatedSignalArgs, ahm *AliasHandleMapper) (s if fil.Lte != nil { fieldFilters = append(fieldFilters, qmhelper.Where(vss.ValueNumberCol, qmhelper.LTE, *fil.Lte)) } - if fil.Neq != nil { - fieldFilters = append(fieldFilters, qmhelper.Where(vss.ValueNumberCol, qmhelper.NEQ, *fil.Neq)) - } if len(fil.NotIn) != 0 { fieldFilters = append(fieldFilters, qm.WhereNotIn(vss.ValueNumberCol+" NOT IN ?", fil.NotIn)) } + if len(fil.In) != 0 { + fieldFilters = append(fieldFilters, qm.WhereNotIn(vss.ValueNumberCol+" IN ?", fil.In)) + } } if i == 0 { diff --git a/schema/base.graphqls b/schema/base.graphqls index d1711f73..0e921385 100644 --- a/schema/base.graphqls +++ b/schema/base.graphqls @@ -183,10 +183,12 @@ input SignalFilter { # TODO(elffjs): Do we need more operators? # TODO(elffjs): Recursive "or" support. input SignalFloatFilter { + eq: Float + neq: Float gt: Float lt: Float gte: Float lte: Float - neq: Float notIn: [Float!] + in: [Float!] } From 138efa475e2c48e69e25d31ea7654453217c459d Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Fri, 27 Jun 2025 15:32:29 -0400 Subject: [PATCH 11/36] Don't change spaces if we don't have to --- internal/graph/arguments.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/graph/arguments.go b/internal/graph/arguments.go index dbe9917e..66c80601 100644 --- a/internal/graph/arguments.go +++ b/internal/graph/arguments.go @@ -30,7 +30,6 @@ func aggregationArgsFromContext(ctx context.Context, tokenID int, interval strin fields := graphql.CollectFieldsCtx(ctx, nil) parentCtx := graphql.GetFieldContext(ctx) - for _, field := range fields { if !isSignal(field) || !hasAggregations(field) { continue From 693f46b5d9620787438a86e7b130b86b315319f2 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Sat, 28 Jun 2025 01:59:58 -0400 Subject: [PATCH 12/36] Get approximate location working Maybe, at least --- internal/graph/arguments.go | 16 +- internal/graph/model/signalArgs.go | 4 +- internal/graph/model/signalSetter.tmpl | 17 -- internal/graph/model/signalSetter_gen.go | 161 ------------------ internal/graph/model/signal_aggs.go | 20 +-- internal/graph/resolver.go | 21 +-- internal/repositories/repositories.go | 17 +- .../repositories/repositories_mocks_test.go | 5 +- internal/service/ch/ch.go | 45 +++-- internal/service/ch/queries.go | 109 ++++++++---- 10 files changed, 143 insertions(+), 272 deletions(-) diff --git a/internal/graph/arguments.go b/internal/graph/arguments.go index 66c80601..c2646e19 100644 --- a/internal/graph/arguments.go +++ b/internal/graph/arguments.go @@ -22,10 +22,10 @@ func aggregationArgsFromContext(ctx context.Context, tokenID int, interval strin TokenID: uint32(tokenID), Filter: filter, }, - FromTS: from, - ToTS: to, - Interval: intervalInt, - AliasToName: make(map[string]string), + FromTS: from, + ToTS: to, + Interval: intervalInt, + ApproxLocArgs: make(map[model.FloatAggregation]struct{}), } fields := graphql.CollectFieldsCtx(ctx, nil) @@ -42,10 +42,14 @@ func aggregationArgsFromContext(ctx context.Context, tokenID int, interval strin agg := child.Args["agg"] alias := child.Field.Alias name := child.Field.Name - aggArgs.AliasToName[alias] = name switch typedAgg := agg.(type) { case model.FloatAggregation: - filter := child.Args["filter"].(*model.SignalFloatFilter) + if name == model.ApproximateLongField || name == model.ApproximateLatField { + aggArgs.ApproxLocArgs[typedAgg] = struct{}{} + continue + } + + filter, _ := child.Args["filter"].(*model.SignalFloatFilter) aggArgs.FloatArgs = append(aggArgs.FloatArgs, model.FloatSignalArgs{ Name: name, Agg: typedAgg, diff --git a/internal/graph/model/signalArgs.go b/internal/graph/model/signalArgs.go index b3d6fe50..dbb81df2 100644 --- a/internal/graph/model/signalArgs.go +++ b/internal/graph/model/signalArgs.go @@ -43,8 +43,8 @@ type AggregatedSignalArgs struct { FloatArgs []FloatSignalArgs // StringArgs represents arguments for each string signal. StringArgs []StringSignalArgs - // AliasToName maps each GraphQL alias to a normal field name. - AliasToName map[string]string + // ApproxLocArgs + ApproxLocArgs map[FloatAggregation]struct{} } // FloatSignalArgs is the arguments for querying a float signals. diff --git a/internal/graph/model/signalSetter.tmpl b/internal/graph/model/signalSetter.tmpl index 07af99f8..06c6bbd6 100644 --- a/internal/graph/model/signalSetter.tmpl +++ b/internal/graph/model/signalSetter.tmpl @@ -23,20 +23,3 @@ func SetCollectionField(collection *SignalCollection, signal *vss.Signal) { {{- end }} } } - -// SetAggregationField find the matching field based on the signal name and set the value based on the signal value. -func SetAggregationField(aggregations *SignalAggregations, signal *AggSignal, aliasToName map[string]string) { - if aggregations == nil || signal == nil { - return - } - switch aliasToName[signal.Alias] { -{{- range .Signals }} - case "{{ .JSONName }}": - {{- if eq .GQLType "Float" }} - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - {{- else }} - aggregations.ValueStrings[signal.Alias] = signal.ValueString - {{- end }} -{{- end }} - } -} diff --git a/internal/graph/model/signalSetter_gen.go b/internal/graph/model/signalSetter_gen.go index 6f4f7119..4e32f3b9 100644 --- a/internal/graph/model/signalSetter_gen.go +++ b/internal/graph/model/signalSetter_gen.go @@ -391,164 +391,3 @@ func SetCollectionField(collection *SignalCollection, signal *vss.Signal) { } } } - -// SetAggregationField find the matching field based on the signal name and set the value based on the signal value. -func SetAggregationField(aggregations *SignalAggregations, signal *AggSignal, aliasToName map[string]string) { - if aggregations == nil || signal == nil { - return - } - switch aliasToName[signal.Alias] { - case "angularVelocityYaw": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "cabinDoorRow1DriverSideIsOpen": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "cabinDoorRow1DriverSideWindowIsOpen": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "cabinDoorRow1PassengerSideIsOpen": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "cabinDoorRow1PassengerSideWindowIsOpen": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "cabinDoorRow2DriverSideIsOpen": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "cabinDoorRow2DriverSideWindowIsOpen": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "cabinDoorRow2PassengerSideIsOpen": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "cabinDoorRow2PassengerSideWindowIsOpen": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "chassisAxleRow1WheelLeftSpeed": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "chassisAxleRow1WheelLeftTirePressure": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "chassisAxleRow1WheelRightSpeed": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "chassisAxleRow1WheelRightTirePressure": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "chassisAxleRow2WheelLeftTirePressure": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "chassisAxleRow2WheelRightTirePressure": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "currentLocationAltitude": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "currentLocationHeading": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "currentLocationIsRedacted": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "currentLocationLatitude": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "currentLocationLongitude": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "dimoAftermarketHDOP": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "dimoAftermarketNSAT": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "dimoAftermarketSSID": - aggregations.ValueStrings[signal.Alias] = signal.ValueString - case "dimoAftermarketWPAState": - aggregations.ValueStrings[signal.Alias] = signal.ValueString - case "exteriorAirTemperature": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "isIgnitionOn": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "lowVoltageBatteryCurrentVoltage": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "obdBarometricPressure": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "obdCommandedEGR": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "obdCommandedEVAP": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "obdDTCList": - aggregations.ValueStrings[signal.Alias] = signal.ValueString - case "obdDistanceSinceDTCClear": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "obdDistanceWithMIL": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "obdEngineLoad": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "obdFuelPressure": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "obdIntakeTemp": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "obdLongTermFuelTrim1": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "obdMAP": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "obdO2WRSensor1Voltage": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "obdO2WRSensor2Voltage": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "obdRunTime": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "obdShortTermFuelTrim1": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "obdWarmupsSinceDTCClear": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainCombustionEngineDieselExhaustFluidCapacity": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainCombustionEngineDieselExhaustFluidLevel": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainCombustionEngineECT": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainCombustionEngineEOP": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainCombustionEngineEOT": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainCombustionEngineEngineOilLevel": - aggregations.ValueStrings[signal.Alias] = signal.ValueString - case "powertrainCombustionEngineEngineOilRelativeLevel": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainCombustionEngineMAF": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainCombustionEngineSpeed": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainCombustionEngineTPS": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainCombustionEngineTorque": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainFuelSystemAbsoluteLevel": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainFuelSystemRelativeLevel": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainFuelSystemSupportedFuelTypes": - aggregations.ValueStrings[signal.Alias] = signal.ValueString - case "powertrainRange": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainTractionBatteryChargingAddedEnergy": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainTractionBatteryChargingChargeCurrentAC": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainTractionBatteryChargingChargeLimit": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainTractionBatteryChargingChargeVoltageUnknownType": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainTractionBatteryChargingIsCharging": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainTractionBatteryCurrentPower": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainTractionBatteryCurrentVoltage": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainTractionBatteryGrossCapacity": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainTractionBatteryRange": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainTractionBatteryStateOfChargeCurrent": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainTractionBatteryStateOfChargeCurrentEnergy": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainTractionBatteryTemperatureAverage": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainTransmissionCurrentGear": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainTransmissionTemperature": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainTransmissionTravelledDistance": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "powertrainType": - aggregations.ValueStrings[signal.Alias] = signal.ValueString - case "serviceDistanceToService": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - case "speed": - aggregations.ValueNumbers[signal.Alias] = signal.ValueNumber - } -} diff --git a/internal/graph/model/signal_aggs.go b/internal/graph/model/signal_aggs.go index eba70c2e..06ef9a8a 100644 --- a/internal/graph/model/signal_aggs.go +++ b/internal/graph/model/signal_aggs.go @@ -17,20 +17,14 @@ type SignalAggregations struct { // Alias to value ValueNumbers map[string]float64 `json:"-"` - ValueStrings map[string]string `json:"-"` -} + // Alias to value + ValueStrings map[string]string `json:"-"` -type FieldInfo struct { - Alias string - Name string + // Alias to value + AppLocNumbers map[AppLocKey]float64 `json:"-"` } -// AggSignal holds the value of an aggregation for a signal in a certain -// time bucket. Only one of ValueNumber and ValueString contains a meaningful -// value. -type AggSignal struct { - Alias string - Timestamp time.Time - ValueNumber float64 - ValueString string +type AppLocKey struct { + Aggregation FloatAggregation + Name string } diff --git a/internal/graph/resolver.go b/internal/graph/resolver.go index 9660edf6..a32d15bc 100644 --- a/internal/graph/resolver.go +++ b/internal/graph/resolver.go @@ -1,6 +1,7 @@ package graph import ( + "github.com/DIMO-Network/model-garage/pkg/vss" "github.com/DIMO-Network/telemetry-api/internal/graph/model" "github.com/DIMO-Network/telemetry-api/internal/repositories" "github.com/DIMO-Network/telemetry-api/internal/repositories/attestation" @@ -21,14 +22,14 @@ type Resolver struct { } func approximateLocationSignalAggregations(obj *model.SignalAggregations, agg model.FloatAggregation) (*h3.LatLng, bool) { - return nil, false - // latVal, ok := obj.ValueNumbers[model.AliasKey{Name: vss.FieldCurrentLocationLatitude, Agg: agg.String()}] - // if !ok { - // return nil, false - // } - // lngVal, ok := obj.ValueNumbers[model.AliasKey{Name: vss.FieldCurrentLocationLongitude, Agg: agg.String()}] - // if !ok { - // return nil, false - // } - // return repositories.GetApproximateLoc(latVal, lngVal), true + lngVal, ok := obj.AppLocNumbers[model.AppLocKey{Aggregation: agg, Name: vss.FieldCurrentLocationLongitude}] + if !ok { + return nil, false + } + latVal, ok := obj.AppLocNumbers[model.AppLocKey{Aggregation: agg, Name: vss.FieldCurrentLocationLatitude}] + if !ok { + return nil, false + } + + return repositories.GetApproximateLoc(latVal, lngVal), true } diff --git a/internal/repositories/repositories.go b/internal/repositories/repositories.go index ad47e424..cc4cf4ea 100644 --- a/internal/repositories/repositories.go +++ b/internal/repositories/repositories.go @@ -31,7 +31,7 @@ var ManufacturerSourceTranslations = map[string]string{ // //go:generate go tool mockgen -source=./repositories.go -destination=repositories_mocks_test.go -package=repositories_test type CHService interface { - GetAggregatedSignals(ctx context.Context, aggArgs *model.AggregatedSignalArgs) ([]*model.AggSignal, error) + GetAggregatedSignals(ctx context.Context, aggArgs *model.AggregatedSignalArgs) ([]*ch.AggSignal, error) GetLatestSignals(ctx context.Context, latestArgs *model.LatestSignalsArgs) ([]*vss.Signal, error) GetAvailableSignals(ctx context.Context, tokenID uint32, filter *model.SignalFilter) ([]string, error) } @@ -91,7 +91,20 @@ func (r *Repository) GetSignal(ctx context.Context, aggArgs *model.AggregatedSig allAggs = append(allAggs, currAggs) } - model.SetAggregationField(currAggs, signal, aggArgs.AliasToName) + switch signal.SignalType { + case ch.FloatType: + currAggs.ValueNumbers[aggArgs.FloatArgs[signal.SignalIndex].Alias] = signal.ValueNumber + case ch.StringType: + currAggs.ValueStrings[aggArgs.StringArgs[signal.SignalIndex].Alias] = signal.ValueString + case ch.AppLocType: + var name string + if signal.SignalIndex%2 == 0 { + name = vss.FieldCurrentLocationLongitude + } else { + name = vss.FieldCurrentLocationLatitude + } + currAggs.AppLocNumbers[model.AppLocKey{Aggregation: model.AllFloatAggregation[signal.SignalIndex/2], Name: name}] = signal.ValueNumber + } } return allAggs, nil diff --git a/internal/repositories/repositories_mocks_test.go b/internal/repositories/repositories_mocks_test.go index 871d9923..6ef8477f 100644 --- a/internal/repositories/repositories_mocks_test.go +++ b/internal/repositories/repositories_mocks_test.go @@ -15,6 +15,7 @@ import ( vss "github.com/DIMO-Network/model-garage/pkg/vss" model "github.com/DIMO-Network/telemetry-api/internal/graph/model" + ch "github.com/DIMO-Network/telemetry-api/internal/service/ch" gomock "go.uber.org/mock/gomock" ) @@ -43,10 +44,10 @@ func (m *MockCHService) EXPECT() *MockCHServiceMockRecorder { } // GetAggregatedSignals mocks base method. -func (m *MockCHService) GetAggregatedSignals(ctx context.Context, aggArgs *model.AggregatedSignalArgs) ([]*model.AggSignal, error) { +func (m *MockCHService) GetAggregatedSignals(ctx context.Context, aggArgs *model.AggregatedSignalArgs) ([]*ch.AggSignal, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetAggregatedSignals", ctx, aggArgs) - ret0, _ := ret[0].([]*model.AggSignal) + ret0, _ := ret[0].([]*ch.AggSignal) ret1, _ := ret[1].(error) return ret0, ret1 } diff --git a/internal/service/ch/ch.go b/internal/service/ch/ch.go index b28b6886..a04d6108 100644 --- a/internal/service/ch/ch.go +++ b/internal/service/ch/ch.go @@ -3,7 +3,6 @@ package ch import ( "context" - "crypto/tls" "fmt" "time" @@ -40,9 +39,9 @@ func NewService(settings config.Settings) (*Service, error) { Password: settings.Clickhouse.Password, Database: settings.Clickhouse.Database, }, - TLS: &tls.Config{ - RootCAs: settings.Clickhouse.RootCAs, - }, + // TLS: &tls.Config{ + // RootCAs: settings.Clickhouse.RootCAs, + // }, Settings: map[string]any{ // ClickHouse will interrupt a query if the projected execution time exceeds the specified max_execution_time. // The estimated execution time is calculated after `timeout_before_checking_execution_speed` @@ -114,27 +113,17 @@ func (m *AliasHandleMapper) Alias(handle string) string { // GetAggregatedSignals returns a slice of aggregated signals based on the provided arguments from the ClickHouse database. // The signals are sorted by timestamp in ascending order. // The timestamp on each signal is for the start of the interval. -func (s *Service) GetAggregatedSignals(ctx context.Context, aggArgs *model.AggregatedSignalArgs) ([]*model.AggSignal, error) { - if len(aggArgs.FloatArgs) == 0 && len(aggArgs.StringArgs) == 0 { - return []*model.AggSignal{}, nil - } - - ahm := NewAliasHandleMapper() - - for i, arg := range aggArgs.FloatArgs { - ahm.Add(arg.Alias, fmt.Sprintf("float%d", i)) +func (s *Service) GetAggregatedSignals(ctx context.Context, aggArgs *model.AggregatedSignalArgs) ([]*AggSignal, error) { + if len(aggArgs.FloatArgs) == 0 && len(aggArgs.StringArgs) == 0 && len(aggArgs.ApproxLocArgs) == 0 { + return []*AggSignal{}, nil } - for i, arg := range aggArgs.StringArgs { - ahm.Add(arg.Alias, fmt.Sprintf("string%d", i)) - } - - stmt, args, err := getAggQuery(aggArgs, ahm) + stmt, args, err := getAggQuery(aggArgs) if err != nil { return nil, err } - signals, err := s.getAggSignals(ctx, stmt, args, ahm) + signals, err := s.getAggSignals(ctx, stmt, args) if err != nil { return nil, err } @@ -164,22 +153,28 @@ func (s *Service) getSignals(ctx context.Context, stmt string, args []any) ([]*v return signals, nil } +type AggSignal struct { + SignalType FieldType + SignalIndex uint8 + Timestamp time.Time + ValueNumber float64 + ValueString string +} + // TODO(elffjs): Ugly duplication. -func (s *Service) getAggSignals(ctx context.Context, stmt string, args []any, ahm *AliasHandleMapper) ([]*model.AggSignal, error) { +func (s *Service) getAggSignals(ctx context.Context, stmt string, args []any) ([]*AggSignal, error) { rows, err := s.conn.Query(ctx, stmt, args...) if err != nil { return nil, fmt.Errorf("failed querying clickhouse: %w", err) } - signals := []*model.AggSignal{} + signals := []*AggSignal{} for rows.Next() { - var signal model.AggSignal - var handle string - err := rows.Scan(&handle, &signal.Timestamp, &signal.ValueNumber, &signal.ValueString) + var signal AggSignal + err := rows.Scan(&signal.SignalType, &signal.SignalIndex, &signal.Timestamp, &signal.ValueNumber, &signal.ValueString) if err != nil { _ = rows.Close() return nil, fmt.Errorf("failed scanning clickhouse row: %w", err) } - signal.Alias = ahm.Alias(handle) signals = append(signals, &signal) } _ = rows.Close() diff --git a/internal/service/ch/queries.go b/internal/service/ch/queries.go index 4e9a24d5..561ae6b8 100644 --- a/internal/service/ch/queries.go +++ b/internal/service/ch/queries.go @@ -16,19 +16,21 @@ import ( const ( // IntervalGroup is the column alias for the interval group. - IntervalGroup = "group_timestamp" - AggNumberCol = "agg_number" - AggStringCol = "agg_string" - HandleCol = "handle" - aggTableName = "agg_table" - tokenIDWhere = vss.TokenIDCol + " = ?" - nameIn = vss.NameCol + " IN ?" - timestampFrom = vss.TimestampCol + " >= ?" - timestampTo = vss.TimestampCol + " < ?" - sourceWhere = vss.SourceCol + " = ?" - sourceIn = vss.SourceCol + " IN ?" - groupAsc = IntervalGroup + " ASC" - valueTableDef = "handle String, " + vss.NameCol + " String" + IntervalGroup = "group_timestamp" + AggNumberCol = "agg_number" + AggStringCol = "agg_string" + aggTableName = "agg_table" + tokenIDWhere = vss.TokenIDCol + " = ?" + nameIn = vss.NameCol + " IN ?" + timestampFrom = vss.TimestampCol + " >= ?" + timestampTo = vss.TimestampCol + " < ?" + sourceWhere = vss.SourceCol + " = ?" + sourceIn = vss.SourceCol + " IN ?" + groupAsc = IntervalGroup + " ASC" + signalTypeCol = "signal_type" + signalIndexCol = "signal_index" + + valueTableDef = signalTypeCol + " UInt8, " + signalIndexCol + " UInt8," + vss.NameCol + " String" ) // varibles for the last seen signal query. @@ -76,6 +78,28 @@ var SourceTranslations = map[string][]string{ "motorq": {"0x5879B43D88Fa93CE8072d6612cBc8dE93E98CE5d"}, } +type FieldType uint8 + +func (t *FieldType) Scan(value any) error { + w, ok := value.(uint8) + if !ok { + return fmt.Errorf("expected value of type uint8, but got type %T", value) + } + + if w == 0 || w > 3 { + return fmt.Errorf("invalid value %d for field type", w) + } + + *t = FieldType(w) + return nil +} + +const ( + FloatType FieldType = 1 + StringType FieldType = 2 + AppLocType FieldType = 3 +) + var dialect = drivers.Dialect{ LQ: '`', RQ: '`', @@ -127,27 +151,34 @@ func selectInterval(milliSeconds int64, origin time.Time) qm.QueryMod { vss.TimestampCol, origin.UnixMicro(), milliSeconds, origin.UnixMicro(), IntervalGroup)) } -func selectNumberAggs(numberAggs []model.FloatSignalArgs, ahm *AliasHandleMapper) qm.QueryMod { +func selectNumberAggs(numberAggs []model.FloatSignalArgs, appLocAggs map[model.FloatAggregation]struct{}) qm.QueryMod { if len(numberAggs) == 0 { return qm.Select("NULL AS " + vss.ValueNumberCol) } // Add a CASE statement for each name and its corresponding aggregation function - caseStmts := make([]string, 0, len(numberAggs)) - for _, agg := range numberAggs { - caseStmts = append(caseStmts, fmt.Sprintf("WHEN %s = '%s' THEN %s", HandleCol, ahm.Handle(agg.Alias), getFloatAggFunc(agg.Agg))) + caseStmts := make([]string, 0, len(numberAggs)+2*len(appLocAggs)) + for i, agg := range numberAggs { + caseStmts = append(caseStmts, fmt.Sprintf("WHEN %s = %d AND %s = %d THEN %s", signalTypeCol, FloatType, signalIndexCol, i, getFloatAggFunc(agg.Agg))) + } + for i, agg := range model.AllFloatAggregation { + if _, ok := appLocAggs[agg]; ok { + caseStmts = append(caseStmts, + fmt.Sprintf("WHEN %s = %d AND %s = %d THEN %s", signalTypeCol, AppLocType, signalIndexCol, 2*i, getFloatAggFunc(agg)), + fmt.Sprintf("WHEN %s = %d AND %s = %d THEN %s", signalTypeCol, AppLocType, signalIndexCol, 2*i+1, getFloatAggFunc(agg))) + } } caseStmt := fmt.Sprintf("CASE %s ELSE NULL END AS %s", strings.Join(caseStmts, " "), AggNumberCol) return qm.Select(caseStmt) } -func selectStringAggs(stringAggs []model.StringSignalArgs, ahm *AliasHandleMapper) qm.QueryMod { +func selectStringAggs(stringAggs []model.StringSignalArgs) qm.QueryMod { if len(stringAggs) == 0 { return qm.Select("NULL AS " + vss.ValueStringCol) } // Add a CASE statement for each name and its corresponding aggregation function caseStmts := make([]string, 0, len(stringAggs)) - for _, agg := range stringAggs { - caseStmts = append(caseStmts, fmt.Sprintf("WHEN %s = '%s' THEN %s", HandleCol, ahm.Handle(agg.Alias), getStringAgg(agg.Agg))) + for i, agg := range stringAggs { + caseStmts = append(caseStmts, fmt.Sprintf("WHEN %s = %d AND %s = %d THEN %s", signalTypeCol, StringType, signalIndexCol, i, getStringAgg(agg.Agg))) } caseStmt := fmt.Sprintf("CASE %s ELSE NULL END AS %s", strings.Join(caseStmts, " "), AggStringCol) return qm.Select(caseStmt) @@ -313,12 +344,12 @@ ORDER BY name ASC, agg ASC; */ -func getAggQuery(aggArgs *model.AggregatedSignalArgs, ahm *AliasHandleMapper) (string, []any, error) { +func getAggQuery(aggArgs *model.AggregatedSignalArgs) (string, []any, error) { if aggArgs == nil { return "", nil, nil } - numAggs := len(aggArgs.FloatArgs) + len(aggArgs.StringArgs) + numAggs := len(aggArgs.FloatArgs) + len(aggArgs.StringArgs) + 2*len(aggArgs.ApproxLocArgs) if numAggs == 0 { return "", nil, errors.New("no aggregations requested") } @@ -327,20 +358,28 @@ func getAggQuery(aggArgs *model.AggregatedSignalArgs, ahm *AliasHandleMapper) (s // https://github.com/ClickHouse/ClickHouse/issues/5984#issuecomment-513411725 // You can see the alternatives in the issue and they are ugly. valuesArgs := make([]string, 0, numAggs) - for _, agg := range aggArgs.FloatArgs { - valuesArgs = append(valuesArgs, fmt.Sprintf("('%s', '%s')", ahm.Handle(agg.Alias), agg.Name)) + for i, agg := range aggArgs.FloatArgs { + valuesArgs = append(valuesArgs, fmt.Sprintf("(%d, %d, '%s')", FloatType, i, agg.Name)) } - for _, agg := range aggArgs.StringArgs { - valuesArgs = append(valuesArgs, fmt.Sprintf("('%s', '%s')", ahm.Handle(agg.Alias), agg.Name)) + for i, agg := range aggArgs.StringArgs { + valuesArgs = append(valuesArgs, fmt.Sprintf("(%d', %d, '%s')", StringType, i, agg.Name)) + } + for i, agg := range model.AllFloatAggregation { + if _, ok := aggArgs.ApproxLocArgs[agg]; ok { + valuesArgs = append(valuesArgs, + fmt.Sprintf("(%d, %d, %s)", AppLocType, 2*i, vss.FieldCurrentLocationLongitude), + fmt.Sprintf("(%d, %d, %s)", AppLocType, 2*i+1, vss.FieldCurrentLocationLatitude)) + } } valueTable := fmt.Sprintf("VALUES('%s', %s) as %s ON %s.%s = %s.%s", valueTableDef, strings.Join(valuesArgs, ", "), aggTableName, vss.TableName, vss.NameCol, aggTableName, vss.NameCol) var floatFilters []qm.QueryMod - i := 0 - - for _, agg := range aggArgs.FloatArgs { - fieldFilters := []qm.QueryMod{qmhelper.Where(HandleCol, qmhelper.EQ, ahm.Handle(agg.Alias))} + for i, agg := range aggArgs.FloatArgs { + fieldFilters := []qm.QueryMod{ + qmhelper.Where(signalTypeCol, qmhelper.EQ, FloatType), + qmhelper.Where(signalIndexCol, qmhelper.EQ, i), + } if fil := agg.Filter; fil != nil { if fil.Eq != nil { fieldFilters = append(fieldFilters, qmhelper.Where(vss.ValueNumberCol, qmhelper.EQ, *fil.Eq)) @@ -377,17 +416,19 @@ func getAggQuery(aggArgs *model.AggregatedSignalArgs, ahm *AliasHandleMapper) (s } mods := []qm.QueryMod{ - qm.Select(HandleCol), + qm.Select(signalTypeCol), + qm.Select(signalIndexCol), selectInterval(aggArgs.Interval, aggArgs.FromTS), - selectNumberAggs(aggArgs.FloatArgs, ahm), - selectStringAggs(aggArgs.StringArgs, ahm), + selectNumberAggs(aggArgs.FloatArgs, aggArgs.ApproxLocArgs), + selectStringAggs(aggArgs.StringArgs), qm.Where(tokenIDWhere, aggArgs.TokenID), qm.Where(timestampFrom, aggArgs.FromTS), qm.Where(timestampTo, aggArgs.ToTS), qm.From(vss.TableName), qm.InnerJoin(valueTable), qm.GroupBy(IntervalGroup), - qm.GroupBy(HandleCol), + qm.GroupBy(signalTypeCol), + qm.GroupBy(signalIndexCol), qm.OrderBy(groupAsc), } mods = append(mods, getFilterMods(aggArgs.Filter)...) From 0f86da4117a9511fdf928d9596c1bc3ced2a2706 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Sat, 28 Jun 2025 02:01:31 -0400 Subject: [PATCH 13/36] Fix the comment --- internal/graph/model/signal_aggs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/graph/model/signal_aggs.go b/internal/graph/model/signal_aggs.go index 06ef9a8a..5950c5a1 100644 --- a/internal/graph/model/signal_aggs.go +++ b/internal/graph/model/signal_aggs.go @@ -20,7 +20,7 @@ type SignalAggregations struct { // Alias to value ValueStrings map[string]string `json:"-"` - // Alias to value + // Aggregation cross non-approximate field name to value AppLocNumbers map[AppLocKey]float64 `json:"-"` } From 575510939b675fe097c93f160160b94c87b378c5 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Sat, 28 Jun 2025 18:08:46 -0400 Subject: [PATCH 14/36] Remove this weird file that ClickHouse made --- uuid | 1 - 1 file changed, 1 deletion(-) delete mode 100644 uuid diff --git a/uuid b/uuid deleted file mode 100644 index bf4bd36d..00000000 --- a/uuid +++ /dev/null @@ -1 +0,0 @@ -66338421-9578-44b7-bc5c-25f44e9c9bb4 \ No newline at end of file From c2aa128508ab16e164854ee4d4884baa08da5162 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Sat, 28 Jun 2025 18:18:08 -0400 Subject: [PATCH 15/36] Bounds checks on the signal indexes Any violation of these is a bad program bug --- internal/repositories/repositories.go | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/internal/repositories/repositories.go b/internal/repositories/repositories.go index cc4cf4ea..2df58871 100644 --- a/internal/repositories/repositories.go +++ b/internal/repositories/repositories.go @@ -93,23 +93,31 @@ func (r *Repository) GetSignal(ctx context.Context, aggArgs *model.AggregatedSig switch signal.SignalType { case ch.FloatType: + if len(aggArgs.FloatArgs) <= int(signal.SignalIndex) { + return nil, fmt.Errorf("only %d float signal requests, but the query returned index %d", len(aggArgs.FloatArgs), signal.SignalIndex) + } currAggs.ValueNumbers[aggArgs.FloatArgs[signal.SignalIndex].Alias] = signal.ValueNumber case ch.StringType: + if len(aggArgs.StringArgs) <= int(signal.SignalIndex) { + return nil, fmt.Errorf("only %d string signal requests, but the query returned index %d", len(aggArgs.FloatArgs), signal.SignalIndex) + } currAggs.ValueStrings[aggArgs.StringArgs[signal.SignalIndex].Alias] = signal.ValueString case ch.AppLocType: - var name string - if signal.SignalIndex%2 == 0 { - name = vss.FieldCurrentLocationLongitude - } else { - name = vss.FieldCurrentLocationLatitude + aggIndex, aggParity := signal.SignalIndex/2, signal.SignalIndex%2 + if int(aggIndex) >= len(model.AllFloatAggregation) { + return nil, fmt.Errorf("scanned an approximate location row with aggregation index %d, but there are only %d types", signal.SignalIndex, len(model.AllFloatAggregation)) } - currAggs.AppLocNumbers[model.AppLocKey{Aggregation: model.AllFloatAggregation[signal.SignalIndex/2], Name: name}] = signal.ValueNumber + name := parityToLocationSignalName[aggParity] + agg := model.AllFloatAggregation[aggIndex] + currAggs.AppLocNumbers[model.AppLocKey{Aggregation: agg, Name: name}] = signal.ValueNumber } } return allAggs, nil } +var parityToLocationSignalName = [2]string{vss.FieldCurrentLocationLongitude, vss.FieldCurrentLocationLatitude} + // GetSignalLatest returns the latest signals for the given tokenID and filter. func (r *Repository) GetSignalLatest(ctx context.Context, latestArgs *model.LatestSignalsArgs) (*model.SignalCollection, error) { if err := validateLatestSigArgs(latestArgs); err != nil { From ab92caebd21344708a60b1326fe591280ff9d02f Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Sat, 28 Jun 2025 18:20:16 -0400 Subject: [PATCH 16/36] One last check --- internal/repositories/repositories.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/repositories/repositories.go b/internal/repositories/repositories.go index 2df58871..9e256a33 100644 --- a/internal/repositories/repositories.go +++ b/internal/repositories/repositories.go @@ -110,6 +110,8 @@ func (r *Repository) GetSignal(ctx context.Context, aggArgs *model.AggregatedSig name := parityToLocationSignalName[aggParity] agg := model.AllFloatAggregation[aggIndex] currAggs.AppLocNumbers[model.AppLocKey{Aggregation: agg, Name: name}] = signal.ValueNumber + default: + return nil, fmt.Errorf("scanned a row with unrecognized type number %d", signal.SignalType) } } From d437c6fe82a8070b159acbaa34ccae7cd074b76f Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Sat, 28 Jun 2025 18:44:13 -0400 Subject: [PATCH 17/36] Remove bad (but harmless) increment --- internal/service/ch/queries.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/service/ch/queries.go b/internal/service/ch/queries.go index 561ae6b8..0e44149f 100644 --- a/internal/service/ch/queries.go +++ b/internal/service/ch/queries.go @@ -412,7 +412,6 @@ func getAggQuery(aggArgs *model.AggregatedSignalArgs) (string, []any, error) { } else { floatFilters = append(floatFilters, qm.Or2(qm.Expr(fieldFilters...))) } - i++ } mods := []qm.QueryMod{ From 5f14e0a4be9e2eebf605d80894ab4a0d23161938 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Sat, 28 Jun 2025 18:48:02 -0400 Subject: [PATCH 18/36] Restore TLS --- internal/service/ch/ch.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/service/ch/ch.go b/internal/service/ch/ch.go index a04d6108..24071ab6 100644 --- a/internal/service/ch/ch.go +++ b/internal/service/ch/ch.go @@ -3,6 +3,7 @@ package ch import ( "context" + "crypto/tls" "fmt" "time" @@ -39,9 +40,9 @@ func NewService(settings config.Settings) (*Service, error) { Password: settings.Clickhouse.Password, Database: settings.Clickhouse.Database, }, - // TLS: &tls.Config{ - // RootCAs: settings.Clickhouse.RootCAs, - // }, + TLS: &tls.Config{ + RootCAs: settings.Clickhouse.RootCAs, + }, Settings: map[string]any{ // ClickHouse will interrupt a query if the projected execution time exceeds the specified max_execution_time. // The estimated execution time is calculated after `timeout_before_checking_execution_speed` From e43d6780a578918a2ddd8f9a51e49009eab606eb Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Sat, 28 Jun 2025 18:53:29 -0400 Subject: [PATCH 19/36] Cut the diff down, since we don't need all these captures --- internal/graph/arguments.go | 42 +++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/internal/graph/arguments.go b/internal/graph/arguments.go index c2646e19..0b001316 100644 --- a/internal/graph/arguments.go +++ b/internal/graph/arguments.go @@ -39,16 +39,22 @@ func aggregationArgsFromContext(ctx context.Context, tokenID int, interval strin return nil, fmt.Errorf("failed to get child field: %w", err) } - agg := child.Args["agg"] - alias := child.Field.Alias - name := child.Field.Name - switch typedAgg := agg.(type) { - case model.FloatAggregation: - if name == model.ApproximateLongField || name == model.ApproximateLatField { - aggArgs.ApproxLocArgs[typedAgg] = struct{}{} - continue - } + if err := addSignalAggregation(&aggArgs, child, child.Field.Name); err != nil { + return nil, err + } + } + return &aggArgs, nil +} +// addSignalAggregation gets the aggregation arguments from the child field and adds them to the aggregated signal arguments as eiter a float or string aggregation. +func addSignalAggregation(aggArgs *model.AggregatedSignalArgs, child *graphql.FieldContext, name string) error { + agg := child.Args["agg"] + alias := child.Field.Alias + switch typedAgg := agg.(type) { + case model.FloatAggregation: + if name == model.ApproximateLongField || name == model.ApproximateLatField { + aggArgs.ApproxLocArgs[typedAgg] = struct{}{} + } else { filter, _ := child.Args["filter"].(*model.SignalFloatFilter) aggArgs.FloatArgs = append(aggArgs.FloatArgs, model.FloatSignalArgs{ Name: name, @@ -56,17 +62,17 @@ func aggregationArgsFromContext(ctx context.Context, tokenID int, interval strin Alias: alias, Filter: filter, }) - case model.StringAggregation: - aggArgs.StringArgs = append(aggArgs.StringArgs, model.StringSignalArgs{ - Name: name, - Agg: typedAgg, - Alias: alias, - }) - default: - return nil, fmt.Errorf("unknown aggregation type: %T", agg) } + case model.StringAggregation: + aggArgs.StringArgs = append(aggArgs.StringArgs, model.StringSignalArgs{ + Name: name, + Agg: typedAgg, + Alias: alias, + }) + default: + return fmt.Errorf("unknown aggregation type: %T", agg) } - return &aggArgs, nil + return nil } // latestArgsFromContext creates a latest signals arguments from the context and the provided arguments. From b0f691e28d085e0c6c1489905997474ccd61d12f Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Sat, 28 Jun 2025 18:57:18 -0400 Subject: [PATCH 20/36] Remove completed todo about more operators --- schema/base.graphqls | 1 - 1 file changed, 1 deletion(-) diff --git a/schema/base.graphqls b/schema/base.graphqls index 0e921385..21a49c9f 100644 --- a/schema/base.graphqls +++ b/schema/base.graphqls @@ -180,7 +180,6 @@ input SignalFilter { } # TODO(elffjs): Unsure about this exact name. -# TODO(elffjs): Do we need more operators? # TODO(elffjs): Recursive "or" support. input SignalFloatFilter { eq: Float From db74c09cf129304a4041ce3b2b6c68f95862b928 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Sat, 28 Jun 2025 18:58:19 -0400 Subject: [PATCH 21/36] Removed completed todo --- internal/graph/generated.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/graph/generated.go b/internal/graph/generated.go index 79316a13..b674dea0 100644 --- a/internal/graph/generated.go +++ b/internal/graph/generated.go @@ -2567,7 +2567,6 @@ input SignalFilter { } # TODO(elffjs): Unsure about this exact name. -# TODO(elffjs): Do we need more operators? # TODO(elffjs): Recursive "or" support. input SignalFloatFilter { eq: Float From 6f6e5a1a161b23edf059022d8f8e0978daa55f89 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Sat, 28 Jun 2025 19:16:03 -0400 Subject: [PATCH 22/36] One test file fixed up --- internal/service/ch/ch_test.go | 163 ++++++++++++++++++--------------- 1 file changed, 87 insertions(+), 76 deletions(-) diff --git a/internal/service/ch/ch_test.go b/internal/service/ch/ch_test.go index cdbd9807..19af9e17 100644 --- a/internal/service/ch/ch_test.go +++ b/internal/service/ch/ch_test.go @@ -70,7 +70,7 @@ func (c *CHServiceTestSuite) TestGetAggSignal() { testCases := []struct { name string aggArgs model.AggregatedSignalArgs - expected []model.AggSignal + expected []AggSignal }{ { name: "no aggs", @@ -82,7 +82,7 @@ func (c *CHServiceTestSuite) TestGetAggSignal() { ToTS: endTs, Interval: day.Milliseconds(), }, - expected: []model.AggSignal{}, + expected: []AggSignal{}, }, { name: "average", @@ -93,16 +93,18 @@ func (c *CHServiceTestSuite) TestGetAggSignal() { FromTS: c.dataStartTime, ToTS: endTs, Interval: day.Milliseconds(), - FloatArgs: map[string]model.FloatSignalArgs{ - "float0": { - Name: vss.FieldSpeed, - Agg: model.FloatAggregationAvg, + FloatArgs: []model.FloatSignalArgs{ + { + Name: vss.FieldSpeed, + Agg: model.FloatAggregationAvg, + Alias: vss.FieldSpeed, }, }, }, - expected: []model.AggSignal{ + expected: []AggSignal{ { - Handle: "float0", + SignalType: FloatType, + SignalIndex: 0, Timestamp: c.dataStartTime, ValueNumber: 4.5, }, @@ -117,25 +119,29 @@ func (c *CHServiceTestSuite) TestGetAggSignal() { FromTS: c.dataStartTime, ToTS: endTs, Interval: day.Milliseconds(), - FloatArgs: map[string]model.FloatSignalArgs{ - "float0": { - Name: vss.FieldSpeed, - Agg: model.FloatAggregationMax, + FloatArgs: []model.FloatSignalArgs{ + { + Name: vss.FieldSpeed, + Agg: model.FloatAggregationMax, + Alias: vss.FieldSpeed, }, - "float1": { - Name: vss.FieldSpeed, - Agg: model.FloatAggregationMin, + { + Name: vss.FieldSpeed, + Agg: model.FloatAggregationMin, + Alias: vss.FieldSpeed, }, }, }, - expected: []model.AggSignal{ + expected: []AggSignal{ { - Handle: "float0", + SignalType: FloatType, + SignalIndex: 0, Timestamp: c.dataStartTime, ValueNumber: 9, }, { - Handle: "float1", + SignalType: FloatType, + SignalIndex: 1, Timestamp: c.dataStartTime, ValueNumber: 0, }, @@ -153,19 +159,20 @@ func (c *CHServiceTestSuite) TestGetAggSignal() { FromTS: c.dataStartTime, ToTS: endTs, Interval: day.Milliseconds(), - FloatArgs: map[model.FloatSignalArgs]struct{}{ + FloatArgs: []model.FloatSignalArgs{ { - Name: vss.FieldSpeed, - Agg: model.FloatAggregationMax, - }: {}, + Name: vss.FieldSpeed, + Agg: model.FloatAggregationMax, + Alias: vss.FieldSpeed, + }, }, }, - expected: []model.AggSignal{ + expected: []AggSignal{ { - Name: vss.FieldSpeed, + SignalType: FloatType, + SignalIndex: 0, Timestamp: c.dataStartTime, ValueNumber: 8.0, - Agg: model.FloatAggregationMax.String(), }, }, }, @@ -178,19 +185,20 @@ func (c *CHServiceTestSuite) TestGetAggSignal() { FromTS: c.dataStartTime, ToTS: endTs, Interval: day.Milliseconds(), - StringArgs: map[model.StringSignalArgs]struct{}{ + StringArgs: []model.StringSignalArgs{ { - Name: vss.FieldPowertrainType, - Agg: model.StringAggregationUnique, - }: {}, + Name: vss.FieldPowertrainType, + Agg: model.StringAggregationUnique, + Alias: vss.FieldPowertrainType, + }, }, }, - expected: []model.AggSignal{ + expected: []AggSignal{ { - Name: vss.FieldPowertrainType, + SignalType: FloatType, + SignalIndex: 0, Timestamp: c.dataStartTime, ValueString: "value10,value3,value2,value9,value7,value5,value4,value8,value1,value6", - Agg: model.StringAggregationUnique.String(), }, }, }, @@ -206,19 +214,20 @@ func (c *CHServiceTestSuite) TestGetAggSignal() { FromTS: c.dataStartTime, ToTS: c.dataStartTime.Add(time.Hour), Interval: day.Milliseconds(), - StringArgs: map[model.StringSignalArgs]struct{}{ + StringArgs: []model.StringSignalArgs{ { - Name: vss.FieldPowertrainType, - Agg: model.StringAggregationTop, - }: {}, + Name: vss.FieldPowertrainType, + Agg: model.StringAggregationTop, + Alias: vss.FieldPowertrainType, + }, }, }, - expected: []model.AggSignal{ + expected: []AggSignal{ { - Name: vss.FieldPowertrainType, + SignalType: StringType, + SignalIndex: 0, Timestamp: c.dataStartTime, ValueString: "value2", - Agg: model.StringAggregationTop.String(), }, }, }, @@ -231,19 +240,20 @@ func (c *CHServiceTestSuite) TestGetAggSignal() { FromTS: c.dataStartTime, ToTS: endTs, Interval: day.Milliseconds(), - FloatArgs: map[model.FloatSignalArgs]struct{}{ + FloatArgs: []model.FloatSignalArgs{ { - Name: vss.FieldSpeed, - Agg: model.FloatAggregationFirst, - }: {}, + Name: vss.FieldSpeed, + Agg: model.FloatAggregationFirst, + Alias: vss.FieldSpeed, + }, }, }, - expected: []model.AggSignal{ + expected: []AggSignal{ { - Name: vss.FieldSpeed, + SignalType: FloatType, + SignalIndex: 0, Timestamp: c.dataStartTime, ValueNumber: 0, - Agg: model.FloatAggregationFirst.String(), }, }, }, @@ -256,19 +266,20 @@ func (c *CHServiceTestSuite) TestGetAggSignal() { FromTS: c.dataStartTime, ToTS: endTs, Interval: day.Milliseconds(), - FloatArgs: map[model.FloatSignalArgs]struct{}{ + FloatArgs: []model.FloatSignalArgs{ { - Name: vss.FieldSpeed, - Agg: model.FloatAggregationLast, - }: {}, + Name: vss.FieldSpeed, + Agg: model.FloatAggregationLast, + Alias: vss.FieldSpeed, + }, }, }, - expected: []model.AggSignal{ + expected: []AggSignal{ { - Name: vss.FieldSpeed, + SignalType: FloatType, + SignalIndex: 0, Timestamp: c.dataStartTime, ValueNumber: dataPoints - 1, - Agg: model.FloatAggregationLast.String(), }, }, }, @@ -281,19 +292,20 @@ func (c *CHServiceTestSuite) TestGetAggSignal() { FromTS: c.dataStartTime, ToTS: endTs, Interval: day.Milliseconds(), - StringArgs: map[model.StringSignalArgs]struct{}{ + StringArgs: []model.StringSignalArgs{ { - Name: vss.FieldPowertrainType, - Agg: model.StringAggregationFirst, - }: {}, + Name: vss.FieldPowertrainType, + Agg: model.StringAggregationFirst, + Alias: vss.FieldPowertrainType, + }, }, }, - expected: []model.AggSignal{ + expected: []AggSignal{ { - Name: vss.FieldPowertrainType, + SignalType: StringType, + SignalIndex: 0, Timestamp: c.dataStartTime, ValueString: "value1", - Agg: model.StringAggregationFirst.String(), }, }, }, @@ -306,19 +318,20 @@ func (c *CHServiceTestSuite) TestGetAggSignal() { FromTS: c.dataStartTime, ToTS: endTs, Interval: day.Milliseconds(), - StringArgs: map[model.StringSignalArgs]struct{}{ + StringArgs: []model.StringSignalArgs{ { - Name: vss.FieldPowertrainType, - Agg: model.StringAggregationLast, - }: {}, + Name: vss.FieldPowertrainType, + Agg: model.StringAggregationLast, + Alias: vss.FieldPowertrainType, + }, }, }, - expected: []model.AggSignal{ + expected: []AggSignal{ { - Name: vss.FieldPowertrainType, + SignalType: StringType, + SignalIndex: 0, Timestamp: c.dataStartTime, ValueString: fmt.Sprintf("value%d", dataPoints), - Agg: model.StringAggregationLast.String(), }, }, }, @@ -330,11 +343,8 @@ func (c *CHServiceTestSuite) TestGetAggSignal() { c.Require().Len(result, len(tc.expected)) - slices.SortFunc(result, func(a, b *model.AggSignal) int { - if cmpName := cmp.Compare(a.Name, b.Name); cmpName != 0 { - return cmpName - } - return cmp.Compare(a.Agg, b.Agg) + slices.SortFunc(result, func(a, b *AggSignal) int { + return cmp.Or(cmp.Compare(a.SignalType, b.SignalType), cmp.Compare(a.SignalIndex, b.SignalIndex)) }) for i, sig := range result { @@ -510,11 +520,12 @@ func (c *CHServiceTestSuite) TestOrginGrouping() { FromTS: startTime, ToTS: endTime, Interval: 28 * day.Milliseconds(), - FloatArgs: map[model.FloatSignalArgs]struct{}{ + FloatArgs: []model.FloatSignalArgs{ { - Name: vss.FieldSpeed, - Agg: model.FloatAggregationAvg, - }: {}, + Name: vss.FieldSpeed, + Agg: model.FloatAggregationAvg, + Alias: vss.FieldSpeed, + }, }, } From ff1aeb4673ad410edd0a354c63f32820aca030d1 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Sat, 28 Jun 2025 19:19:29 -0400 Subject: [PATCH 23/36] All tests compile --- internal/repositories/repositories_test.go | 31 +++++++++++----------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/internal/repositories/repositories_test.go b/internal/repositories/repositories_test.go index 6b02a02f..c46aa8d1 100644 --- a/internal/repositories/repositories_test.go +++ b/internal/repositories/repositories_test.go @@ -9,6 +9,7 @@ import ( "github.com/DIMO-Network/model-garage/pkg/vss" "github.com/DIMO-Network/telemetry-api/internal/graph/model" "github.com/DIMO-Network/telemetry-api/internal/repositories" + "github.com/DIMO-Network/telemetry-api/internal/service/ch" "github.com/stretchr/testify/require" gomock "go.uber.org/mock/gomock" ) @@ -47,7 +48,7 @@ func TestGetSignal(t *testing.T) { mockSetup: func(m *Mocks) { m.CHService.EXPECT(). GetAggregatedSignals(gomock.Any(), defaultArgs). - Return([]*model.AggSignal{}, nil) + Return([]*ch.AggSignal{}, nil) }, expectedResult: []*model.SignalAggregations{}, expectError: false, @@ -56,8 +57,8 @@ func TestGetSignal(t *testing.T) { name: "Success case - One signal", aggArgs: defaultArgs, mockSetup: func(m *Mocks) { - signals := []*model.AggSignal{ - {Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), Handle: "float0", ValueNumber: 1.0}, + signals := []*ch.AggSignal{ + {SignalType: ch.FloatType, SignalIndex: 0, Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), ValueNumber: 1.0}, } m.CHService.EXPECT(). GetAggregatedSignals(gomock.Any(), defaultArgs). @@ -74,10 +75,10 @@ func TestGetSignal(t *testing.T) { name: "Success case - Combine signals last signal has different timestamp", aggArgs: defaultArgs, mockSetup: func(m *Mocks) { - signals := []*model.AggSignal{ - {Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), Handle: "float0", ValueNumber: 1.0}, - {Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), Handle: "float0", ValueNumber: 2.0}, - {Timestamp: time.Date(2024, 6, 11, 1, 0, 0, 0, time.UTC), Handle: "float0", ValueNumber: 3.0}, + signals := []*ch.AggSignal{ + {SignalType: ch.FloatType, SignalIndex: 0, Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), ValueNumber: 1.0}, + {SignalType: ch.FloatType, SignalIndex: 0, Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), ValueNumber: 2.0}, + {SignalType: ch.FloatType, SignalIndex: 0, Timestamp: time.Date(2024, 6, 11, 1, 0, 0, 0, time.UTC), ValueNumber: 3.0}, } m.CHService.EXPECT(). GetAggregatedSignals(gomock.Any(), defaultArgs). @@ -97,10 +98,10 @@ func TestGetSignal(t *testing.T) { name: "Success case - Combine signals all signal have the same timestamp", aggArgs: defaultArgs, mockSetup: func(m *Mocks) { - signals := []*model.AggSignal{ - {Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), Handle: "float0", ValueNumber: 1.0}, - {Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), Handle: "float0", ValueNumber: 2.0}, - {Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), Handle: "float0", ValueNumber: 3.0}, + signals := []*ch.AggSignal{ + {SignalType: ch.FloatType, SignalIndex: 0, Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), ValueNumber: 1.0}, + {SignalType: ch.FloatType, SignalIndex: 0, Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), ValueNumber: 2.0}, + {SignalType: ch.FloatType, SignalIndex: 0, Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), ValueNumber: 3.0}, } m.CHService.EXPECT(). GetAggregatedSignals(gomock.Any(), defaultArgs). @@ -117,10 +118,10 @@ func TestGetSignal(t *testing.T) { name: "Success case - Combine signals first signal has different timestamp", aggArgs: defaultArgs, mockSetup: func(m *Mocks) { - signals := []*model.AggSignal{ - {Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), Handle: "float0", ValueNumber: 1.0}, - {Timestamp: time.Date(2024, 6, 11, 1, 0, 0, 0, time.UTC), Handle: "float0", ValueNumber: 2.0}, - {Timestamp: time.Date(2024, 6, 11, 1, 0, 0, 0, time.UTC), Handle: "float0", ValueNumber: 3.0}, + signals := []*ch.AggSignal{ + {SignalType: ch.FloatType, SignalIndex: 0, Timestamp: time.Date(2024, 6, 11, 0, 0, 0, 0, time.UTC), ValueNumber: 1.0}, + {SignalType: ch.FloatType, SignalIndex: 0, Timestamp: time.Date(2024, 6, 11, 1, 0, 0, 0, time.UTC), ValueNumber: 2.0}, + {SignalType: ch.FloatType, SignalIndex: 0, Timestamp: time.Date(2024, 6, 11, 1, 0, 0, 0, time.UTC), ValueNumber: 3.0}, } m.CHService.EXPECT(). GetAggregatedSignals(gomock.Any(), defaultArgs). From 79018df28bef898366bf222d4927f44d07f13255 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Sat, 28 Jun 2025 19:27:50 -0400 Subject: [PATCH 24/36] Remove errant single quote --- internal/service/ch/queries.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/service/ch/queries.go b/internal/service/ch/queries.go index 0e44149f..62ad0dc4 100644 --- a/internal/service/ch/queries.go +++ b/internal/service/ch/queries.go @@ -362,7 +362,7 @@ func getAggQuery(aggArgs *model.AggregatedSignalArgs) (string, []any, error) { valuesArgs = append(valuesArgs, fmt.Sprintf("(%d, %d, '%s')", FloatType, i, agg.Name)) } for i, agg := range aggArgs.StringArgs { - valuesArgs = append(valuesArgs, fmt.Sprintf("(%d', %d, '%s')", StringType, i, agg.Name)) + valuesArgs = append(valuesArgs, fmt.Sprintf("(%d, %d, '%s')", StringType, i, agg.Name)) } for i, agg := range model.AllFloatAggregation { if _, ok := aggArgs.ApproxLocArgs[agg]; ok { From 5af9a95ae5f873a569970ae9d1d18fc8420284d1 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Sat, 28 Jun 2025 19:34:17 -0400 Subject: [PATCH 25/36] String type, not float --- internal/service/ch/ch_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/service/ch/ch_test.go b/internal/service/ch/ch_test.go index 19af9e17..d1f25bf8 100644 --- a/internal/service/ch/ch_test.go +++ b/internal/service/ch/ch_test.go @@ -195,7 +195,7 @@ func (c *CHServiceTestSuite) TestGetAggSignal() { }, expected: []AggSignal{ { - SignalType: FloatType, + SignalType: StringType, SignalIndex: 0, Timestamp: c.dataStartTime, ValueString: "value10,value3,value2,value9,value7,value5,value4,value8,value1,value6", From e9ab9d041e198f1948bd9931d0e4f32450d7a8bf Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Sat, 28 Jun 2025 19:47:00 -0400 Subject: [PATCH 26/36] Fix up signal args test setup One integration test left to fix --- internal/repositories/repositories_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/repositories/repositories_test.go b/internal/repositories/repositories_test.go index c46aa8d1..323bbaeb 100644 --- a/internal/repositories/repositories_test.go +++ b/internal/repositories/repositories_test.go @@ -33,6 +33,13 @@ func TestGetSignal(t *testing.T) { FromTS: time.Now(), ToTS: time.Now().Add(time.Hour), Interval: 1, + FloatArgs: []model.FloatSignalArgs{ + { + Name: vss.FieldSpeed, + Agg: model.FloatAggregationAvg, + Alias: vss.FieldSpeed, + }, + }, } tests := []struct { From c039ecaaf71890d4c5217769a6f875ea62e1f437 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Sat, 28 Jun 2025 22:24:09 -0400 Subject: [PATCH 27/36] Fix query when approximate location is the only request --- e2e/approximate_location_test.go | 1 + internal/repositories/repositories.go | 7 ++++--- internal/service/ch/queries.go | 16 ++++++++++------ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/e2e/approximate_location_test.go b/e2e/approximate_location_test.go index 64839f9a..435d3cd7 100644 --- a/e2e/approximate_location_test.go +++ b/e2e/approximate_location_test.go @@ -128,6 +128,7 @@ func TestApproximateLocation(t *testing.T) { assert.Equal(t, expectedEndLatLong.Lng, result.SignalLatest.ApproxLong.Value) assert.Nil(t, result.SignalLatest.Lat) assert.Nil(t, result.SignalLatest.Long) + fromTime := "2024-11-19T09:21:19Z" fromtTimePlus24 := "2024-11-20T09:21:19Z" query = fmt.Sprintf(`query { diff --git a/internal/repositories/repositories.go b/internal/repositories/repositories.go index 9e256a33..2d14726d 100644 --- a/internal/repositories/repositories.go +++ b/internal/repositories/repositories.go @@ -84,9 +84,10 @@ func (r *Repository) GetSignal(ctx context.Context, aggArgs *model.AggregatedSig if !lastTS.Equal(signal.Timestamp) { lastTS = signal.Timestamp currAggs = &model.SignalAggregations{ - Timestamp: signal.Timestamp, - ValueNumbers: make(map[string]float64), - ValueStrings: make(map[string]string), + Timestamp: signal.Timestamp, + ValueNumbers: make(map[string]float64), + ValueStrings: make(map[string]string), + AppLocNumbers: make(map[model.AppLocKey]float64), } allAggs = append(allAggs, currAggs) } diff --git a/internal/service/ch/queries.go b/internal/service/ch/queries.go index 62ad0dc4..95784802 100644 --- a/internal/service/ch/queries.go +++ b/internal/service/ch/queries.go @@ -30,7 +30,7 @@ const ( signalTypeCol = "signal_type" signalIndexCol = "signal_index" - valueTableDef = signalTypeCol + " UInt8, " + signalIndexCol + " UInt8," + vss.NameCol + " String" + valueTableDef = signalTypeCol + " UInt8, " + signalIndexCol + " UInt8, " + vss.NameCol + " String" ) // varibles for the last seen signal query. @@ -152,7 +152,7 @@ func selectInterval(milliSeconds int64, origin time.Time) qm.QueryMod { } func selectNumberAggs(numberAggs []model.FloatSignalArgs, appLocAggs map[model.FloatAggregation]struct{}) qm.QueryMod { - if len(numberAggs) == 0 { + if len(numberAggs) == 0 && len(appLocAggs) == 0 { return qm.Select("NULL AS " + vss.ValueNumberCol) } // Add a CASE statement for each name and its corresponding aggregation function @@ -359,16 +359,16 @@ func getAggQuery(aggArgs *model.AggregatedSignalArgs) (string, []any, error) { // You can see the alternatives in the issue and they are ugly. valuesArgs := make([]string, 0, numAggs) for i, agg := range aggArgs.FloatArgs { - valuesArgs = append(valuesArgs, fmt.Sprintf("(%d, %d, '%s')", FloatType, i, agg.Name)) + valuesArgs = append(valuesArgs, aggTableEntry(FloatType, i, agg.Name)) } for i, agg := range aggArgs.StringArgs { - valuesArgs = append(valuesArgs, fmt.Sprintf("(%d, %d, '%s')", StringType, i, agg.Name)) + valuesArgs = append(valuesArgs, aggTableEntry(StringType, i, agg.Name)) } for i, agg := range model.AllFloatAggregation { if _, ok := aggArgs.ApproxLocArgs[agg]; ok { valuesArgs = append(valuesArgs, - fmt.Sprintf("(%d, %d, %s)", AppLocType, 2*i, vss.FieldCurrentLocationLongitude), - fmt.Sprintf("(%d, %d, %s)", AppLocType, 2*i+1, vss.FieldCurrentLocationLatitude)) + aggTableEntry(AppLocType, 2*i, vss.FieldCurrentLocationLongitude), + aggTableEntry(AppLocType, 2*i+1, vss.FieldCurrentLocationLatitude)) } } valueTable := fmt.Sprintf("VALUES('%s', %s) as %s ON %s.%s = %s.%s", valueTableDef, strings.Join(valuesArgs, ", "), aggTableName, vss.TableName, vss.NameCol, aggTableName, vss.NameCol) @@ -437,6 +437,10 @@ func getAggQuery(aggArgs *model.AggregatedSignalArgs) (string, []any, error) { return stmt, args, nil } +func aggTableEntry(ft FieldType, index int, name string) string { + return fmt.Sprintf("(%d, %d, '%s')", ft, index, name) +} + func getDistinctQuery(tokenId uint32, filter *model.SignalFilter) (string, []any) { mods := []qm.QueryMod{ qm.Distinct(vss.NameCol), From d4c9db9b07c12c7bd5564fd768afa4fa71ab5ac5 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Sat, 28 Jun 2025 22:58:24 -0400 Subject: [PATCH 28/36] Fix the parenthesization --- internal/service/ch/queries.go | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/internal/service/ch/queries.go b/internal/service/ch/queries.go index 95784802..f09e2a47 100644 --- a/internal/service/ch/queries.go +++ b/internal/service/ch/queries.go @@ -373,7 +373,9 @@ func getAggQuery(aggArgs *model.AggregatedSignalArgs) (string, []any, error) { } valueTable := fmt.Sprintf("VALUES('%s', %s) as %s ON %s.%s = %s.%s", valueTableDef, strings.Join(valuesArgs, ", "), aggTableName, vss.TableName, vss.NameCol, aggTableName, vss.NameCol) - var floatFilters []qm.QueryMod + floatFilters := []qm.QueryMod{ + qmhelper.Where(signalTypeCol, qmhelper.NEQ, FloatType), + } for i, agg := range aggArgs.FloatArgs { fieldFilters := []qm.QueryMod{ @@ -407,11 +409,7 @@ func getAggQuery(aggArgs *model.AggregatedSignalArgs) (string, []any, error) { } } - if i == 0 { - floatFilters = append(floatFilters, qm.Expr(fieldFilters...)) - } else { - floatFilters = append(floatFilters, qm.Or2(qm.Expr(fieldFilters...))) - } + floatFilters = append(floatFilters, qm.Or2(qm.Expr(fieldFilters...))) } mods := []qm.QueryMod{ @@ -431,7 +429,7 @@ func getAggQuery(aggArgs *model.AggregatedSignalArgs) (string, []any, error) { qm.OrderBy(groupAsc), } mods = append(mods, getFilterMods(aggArgs.Filter)...) - mods = append(mods, floatFilters...) + mods = append(mods, qm.Expr(floatFilters...)) stmt, args := newQuery(mods...) return stmt, args, nil From 2ff97652a397e2f3e3e51beb2bd03e35efa7b391 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Sun, 29 Jun 2025 15:43:11 -0400 Subject: [PATCH 29/36] Test a few float filters --- internal/service/ch/ch_test.go | 58 ++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/internal/service/ch/ch_test.go b/internal/service/ch/ch_test.go index d1f25bf8..570b932c 100644 --- a/internal/service/ch/ch_test.go +++ b/internal/service/ch/ch_test.go @@ -283,6 +283,64 @@ func (c *CHServiceTestSuite) TestGetAggSignal() { }, }, }, + { + name: "lt filter", + aggArgs: model.AggregatedSignalArgs{ + SignalArgs: model.SignalArgs{ + TokenID: 1, + }, + FromTS: c.dataStartTime, + ToTS: endTs, + Interval: day.Milliseconds(), + FloatArgs: []model.FloatSignalArgs{ + { + Name: vss.FieldSpeed, + Agg: model.FloatAggregationAvg, + Alias: vss.FieldSpeed, + Filter: &model.SignalFloatFilter{ + Lt: ref(float64(5)), + }, + }, + }, + }, + expected: []AggSignal{ + { + SignalType: FloatType, + SignalIndex: 0, + Timestamp: c.dataStartTime, + ValueNumber: 2, + }, + }, + }, + { + name: "gte filter", + aggArgs: model.AggregatedSignalArgs{ + SignalArgs: model.SignalArgs{ + TokenID: 1, + }, + FromTS: c.dataStartTime, + ToTS: endTs, + Interval: day.Milliseconds(), + FloatArgs: []model.FloatSignalArgs{ + { + Name: vss.FieldSpeed, + Agg: model.FloatAggregationAvg, + Alias: vss.FieldSpeed, + Filter: &model.SignalFloatFilter{ + Gte: ref(float64(5)), + }, + }, + }, + }, + expected: []AggSignal{ + { + SignalType: FloatType, + SignalIndex: 0, + Timestamp: c.dataStartTime, + ValueNumber: 7, + }, + }, + }, { name: "first string", aggArgs: model.AggregatedSignalArgs{ From bb0be24df8b22169c0cd75d89c5afcaf309cc3b8 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Mon, 30 Jun 2025 15:33:58 -0400 Subject: [PATCH 30/36] Update signals SQL example --- internal/service/ch/queries.go | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/internal/service/ch/queries.go b/internal/service/ch/queries.go index 2aaf00b2..4c4b3757 100644 --- a/internal/service/ch/queries.go +++ b/internal/service/ch/queries.go @@ -298,27 +298,28 @@ func unionAll(allStatements []string, allArgs [][]any) (string, []any) { // This function returns an error if no aggregations are provided. /* SELECT - `name`, - toStartOfInterval(timestamp, toIntervalMillisecond(30000)) AS group_timestamp, + signal_type, + signal_id, + toStartOfInterval(timestamp, toIntervalMicrosecond(60000000), fromUnixTimestamp64Micro(1751274600000000)) AS group_timestamp, CASE - WHEN name = 'speed' AND agg = 'MAX' THEN max(value_number) - WHEN name = 'obdRunTime' AND agg = 'MEDIAN' THEN median(value_number) + WHEN signal_type = 1 AND signal_index = 0 THEN max(value_number) + WHEN signal_type = 1 AND signal_index = 1 THEN median(value_number) ELSE NULL END AS value_number, CASE - WHEN name = 'powertrainType' AND agg = 'UNIQUE' THEN arrayStringConcat(groupUniqArray(value_string),',') - WHEN name = 'powertrainFuelSystemSupportedFuelTypes' AND agg = 'RAND' THEN groupArraySample(1, 1716404995385)(value_string)[1] + WHEN signal_type = 2 AND signal_index = 0 THEN arrayStringConcat(groupUniqArray(value_string),',') + WHEN signal_type = 2 AND signal_index = 1 THEN groupArraySample(1, 1716404995385)(value_string)[1] ELSE NULL END AS value_string FROM - `signal` + signal JOIN VALUES( - 'name String, agg String', - ('speed, 'MAX'), - ('obdRunTime', 'MEDIAN'), - ('powertrainType', 'UNIQUE'), - ('powertrainFuelSystemSupportedFuelTypes', 'RAND') + 'signal_type UInt8, signal_index UInt8, name String', + (1, 0, 'speed'), + (1, 1, 'obdRunTime'), + (2, 0, 'powertrainType'), + (2, 1, 'powertrainFuelSystemSupportedFuelTypes') ) AS agg_table ON signal.name = agg_table.name @@ -328,12 +329,12 @@ WHERE AND timestamp < toDateTime('2024-04-27 09:21:19') GROUP BY group_timestamp, - name, - agg + signal_type, + signal_index ORDER BY group_timestamp ASC, - name ASC, - agg ASC; + signal_type ASC, + signal_index ASC; */ func getAggQuery(aggArgs *model.AggregatedSignalArgs) (string, []any, error) { if aggArgs == nil { From a2430b608c2454ad1d313c0082fc4d16d00b5ada Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Mon, 30 Jun 2025 16:10:28 -0400 Subject: [PATCH 31/36] Many more doc strings --- internal/repositories/validate.go | 9 +++++++++ internal/service/ch/ch.go | 20 +++++++++++++++++--- internal/service/ch/queries.go | 23 ++++++++++++++++------- 3 files changed, 42 insertions(+), 10 deletions(-) diff --git a/internal/repositories/validate.go b/internal/repositories/validate.go index 79e9f1a8..cf078f8f 100644 --- a/internal/repositories/validate.go +++ b/internal/repositories/validate.go @@ -2,6 +2,7 @@ package repositories import ( "fmt" + "math" "github.com/DIMO-Network/telemetry-api/internal/graph/model" "github.com/DIMO-Network/telemetry-api/internal/service/ch" @@ -30,6 +31,14 @@ func validateAggSigArgs(args *model.AggregatedSignalArgs) error { if args.Interval < 1 { return ValidationError("interval is not a positive integer") } + + if len(args.FloatArgs) > math.MaxUint16 { + return ValidationError("too many float aggregations") + } + if len(args.StringArgs) > math.MaxUint16 { + return ValidationError("too many string aggregations, maximum is ") + } + return validateSignalArgs(&args.SignalArgs) } diff --git a/internal/service/ch/ch.go b/internal/service/ch/ch.go index 24071ab6..a25bda26 100644 --- a/internal/service/ch/ch.go +++ b/internal/service/ch/ch.go @@ -155,10 +155,24 @@ func (s *Service) getSignals(ctx context.Context, stmt string, args []any) ([]*v } type AggSignal struct { - SignalType FieldType - SignalIndex uint8 - Timestamp time.Time + // SignalType describes the type of values in the aggregation: + // float, string, or approximate location. + SignalType FieldType + // SignalIndex is an identifier for the aggregation within its + // type. + // + // For float and string aggregations this is simply an index + // into the corresponding argument array. For approximate location, + // we imagine expanding the slice model.AllFloatAggregation into + // two: first the longitude and then the latitude. + SignalIndex uint16 + // Timestamp is the timestamp for the bucket, the leftmost point. + Timestamp time.Time + // ValueNumber is the value for this row if it is of float or + // approximate location type. ValueNumber float64 + // ValueNumber is the value for this row if it is of float or + // approximate location type. ValueString string } diff --git a/internal/service/ch/queries.go b/internal/service/ch/queries.go index 4c4b3757..ab05fb9a 100644 --- a/internal/service/ch/queries.go +++ b/internal/service/ch/queries.go @@ -30,7 +30,7 @@ const ( signalTypeCol = "signal_type" signalIndexCol = "signal_index" - valueTableDef = signalTypeCol + " UInt8, " + signalIndexCol + " UInt8, " + vss.NameCol + " String" + valueTableDef = signalTypeCol + " UInt8, " + signalIndexCol + " UInt16, " + vss.NameCol + " String" ) // varibles for the last seen signal query. @@ -78,8 +78,23 @@ var SourceTranslations = map[string][]string{ "motorq": {"0x5879B43D88Fa93CE8072d6612cBc8dE93E98CE5d"}, } +// FieldType indicates the type of values in the aggregation. Currently +// there are three types: normal float values, string values, and +// "approximate location" values that are computed from the precise +// location values, in Go. type FieldType uint8 +const ( + // FloatType is the type for rows with numeric values that are in + // the VSS spec. + FloatType FieldType = 1 + // StringType is the type for rows with string values. + StringType FieldType = 2 + // AppLocType is the type for rows needed to compute approximate + // locations. + AppLocType FieldType = 3 +) + func (t *FieldType) Scan(value any) error { w, ok := value.(uint8) if !ok { @@ -94,12 +109,6 @@ func (t *FieldType) Scan(value any) error { return nil } -const ( - FloatType FieldType = 1 - StringType FieldType = 2 - AppLocType FieldType = 3 -) - var dialect = drivers.Dialect{ LQ: '`', RQ: '`', From 600493de8c105f5ba9b955daaea31cb9c8934dd3 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Mon, 30 Jun 2025 16:21:47 -0400 Subject: [PATCH 32/36] More detail about approximate location results --- internal/service/ch/ch.go | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/internal/service/ch/ch.go b/internal/service/ch/ch.go index a25bda26..5ddb48b6 100644 --- a/internal/service/ch/ch.go +++ b/internal/service/ch/ch.go @@ -159,12 +159,20 @@ type AggSignal struct { // float, string, or approximate location. SignalType FieldType // SignalIndex is an identifier for the aggregation within its - // type. + // SignalType. // // For float and string aggregations this is simply an index - // into the corresponding argument array. For approximate location, - // we imagine expanding the slice model.AllFloatAggregation into - // two: first the longitude and then the latitude. + // into the corresponding argument array. + // + // For approximate location, we imagine expanding each element of + // the slice model.AllFloatAggregation into two: first the + // longitude and then the latitude. So, for example, SignalType = 3 + // and SignalIndex = 3 means latitude for the 1-th float + // aggregation. + // + // We could get away with a single number, since we know how many + // arguments of each type there are, but it appears to us that this + // would make adding new types riskier. SignalIndex uint16 // Timestamp is the timestamp for the bucket, the leftmost point. Timestamp time.Time @@ -176,7 +184,6 @@ type AggSignal struct { ValueString string } -// TODO(elffjs): Ugly duplication. func (s *Service) getAggSignals(ctx context.Context, stmt string, args []any) ([]*AggSignal, error) { rows, err := s.conn.Query(ctx, stmt, args...) if err != nil { From 4e7e247d41812b1756f4e84b80a0da017b26f792 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Mon, 30 Jun 2025 18:48:50 -0400 Subject: [PATCH 33/36] Comment on some weird QueryMods --- internal/service/ch/queries.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/service/ch/queries.go b/internal/service/ch/queries.go index ab05fb9a..4ea6abd8 100644 --- a/internal/service/ch/queries.go +++ b/internal/service/ch/queries.go @@ -375,10 +375,13 @@ func getAggQuery(aggArgs *model.AggregatedSignalArgs) (string, []any, error) { valueTable := fmt.Sprintf("VALUES('%s', %s) as %s ON %s.%s = %s.%s", valueTableDef, strings.Join(valuesArgs, ", "), aggTableName, vss.TableName, vss.NameCol, aggTableName, vss.NameCol) floatFilters := []qm.QueryMod{ + // Make sure non-float rows can still get returned. qmhelper.Where(signalTypeCol, qmhelper.NEQ, FloatType), } for i, agg := range aggArgs.FloatArgs { + // TODO(elffjs): Some duplication here. Also a bit wasteful if + // there are no filters at all. fieldFilters := []qm.QueryMod{ qmhelper.Where(signalTypeCol, qmhelper.EQ, FloatType), qmhelper.Where(signalIndexCol, qmhelper.EQ, i), From 7a0a9bcba464814fcdd9797e0f800daac10db7c1 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Mon, 30 Jun 2025 19:01:57 -0400 Subject: [PATCH 34/36] Try a recursive constructive of OR --- internal/graph/generated.go | 33 +++++++++++++++++++- internal/graph/model/models_gen.go | 17 +++++----- internal/service/ch/queries.go | 50 ++++++++++++++++++++++++++++++ schema/base.graphqls | 1 + 4 files changed, 92 insertions(+), 9 deletions(-) diff --git a/internal/graph/generated.go b/internal/graph/generated.go index b674dea0..3e5c8c5c 100644 --- a/internal/graph/generated.go +++ b/internal/graph/generated.go @@ -2577,6 +2577,7 @@ input SignalFloatFilter { lte: Float notIn: [Float!] in: [Float!] + or: [SignalFloatFilter!] } `, BuiltIn: false}, {Name: "../../schema/device_activity.graphqls", Input: `extend type Query { @@ -26329,7 +26330,7 @@ func (ec *executionContext) unmarshalInputSignalFloatFilter(ctx context.Context, asMap[k] = v } - fieldsInOrder := [...]string{"eq", "neq", "gt", "lt", "gte", "lte", "notIn", "in"} + fieldsInOrder := [...]string{"eq", "neq", "gt", "lt", "gte", "lte", "notIn", "in", "or"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -26392,6 +26393,13 @@ func (ec *executionContext) unmarshalInputSignalFloatFilter(ctx context.Context, return it, err } it.In = data + case "or": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("or")) + data, err := ec.unmarshalOSignalFloatFilter2ᚕᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilterᚄ(ctx, v) + if err != nil { + return it, err + } + it.Or = data } } @@ -30189,6 +30197,11 @@ func (ec *executionContext) marshalNSignalAggregations2ᚖgithubᚗcomᚋDIMOᚑ return ec._SignalAggregations(ctx, sel, v) } +func (ec *executionContext) unmarshalNSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx context.Context, v any) (*model.SignalFloatFilter, error) { + res, err := ec.unmarshalInputSignalFloatFilter(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + func (ec *executionContext) unmarshalNString2string(ctx context.Context, v any) (string, error) { res, err := graphql.UnmarshalString(v) return res, graphql.ErrorOnPath(ctx, err) @@ -30742,6 +30755,24 @@ func (ec *executionContext) marshalOSignalFloat2ᚖgithubᚗcomᚋDIMOᚑNetwork return ec._SignalFloat(ctx, sel, v) } +func (ec *executionContext) unmarshalOSignalFloatFilter2ᚕᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilterᚄ(ctx context.Context, v any) ([]*model.SignalFloatFilter, error) { + if v == nil { + return nil, nil + } + var vSlice []any + vSlice = graphql.CoerceList(v) + var err error + res := make([]*model.SignalFloatFilter, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + func (ec *executionContext) unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx context.Context, v any) (*model.SignalFloatFilter, error) { if v == nil { return nil, nil diff --git a/internal/graph/model/models_gen.go b/internal/graph/model/models_gen.go index 55e4cde0..299e9c27 100644 --- a/internal/graph/model/models_gen.go +++ b/internal/graph/model/models_gen.go @@ -395,14 +395,15 @@ type SignalFloat struct { } type SignalFloatFilter struct { - Eq *float64 `json:"eq,omitempty"` - Neq *float64 `json:"neq,omitempty"` - Gt *float64 `json:"gt,omitempty"` - Lt *float64 `json:"lt,omitempty"` - Gte *float64 `json:"gte,omitempty"` - Lte *float64 `json:"lte,omitempty"` - NotIn []float64 `json:"notIn,omitempty"` - In []float64 `json:"in,omitempty"` + Eq *float64 `json:"eq,omitempty"` + Neq *float64 `json:"neq,omitempty"` + Gt *float64 `json:"gt,omitempty"` + Lt *float64 `json:"lt,omitempty"` + Gte *float64 `json:"gte,omitempty"` + Lte *float64 `json:"lte,omitempty"` + NotIn []float64 `json:"notIn,omitempty"` + In []float64 `json:"in,omitempty"` + Or []*SignalFloatFilter `json:"or,omitempty"` } type SignalString struct { diff --git a/internal/service/ch/queries.go b/internal/service/ch/queries.go index 4ea6abd8..77ffc485 100644 --- a/internal/service/ch/queries.go +++ b/internal/service/ch/queries.go @@ -439,6 +439,56 @@ func getAggQuery(aggArgs *model.AggregatedSignalArgs) (string, []any, error) { return stmt, args, nil } +func buildConditionList(fil *model.SignalFloatFilter) []qm.QueryMod { + if fil == nil { + return nil + } + + var mods []qm.QueryMod + + if fil.Eq != nil { + mods = append(mods, qmhelper.Where(vss.ValueNumberCol, qmhelper.EQ, *fil.Eq)) + } + if fil.Neq != nil { + mods = append(mods, qmhelper.Where(vss.ValueNumberCol, qmhelper.NEQ, *fil.Neq)) + } + if fil.Gt != nil { + mods = append(mods, qmhelper.Where(vss.ValueNumberCol, qmhelper.GT, *fil.Gt)) + } + if fil.Lt != nil { + mods = append(mods, qmhelper.Where(vss.ValueNumberCol, qmhelper.LT, *fil.Lt)) + } + if fil.Gte != nil { + mods = append(mods, qmhelper.Where(vss.ValueNumberCol, qmhelper.GTE, *fil.Gte)) + } + if fil.Lte != nil { + mods = append(mods, qmhelper.Where(vss.ValueNumberCol, qmhelper.LTE, *fil.Lte)) + } + if len(fil.NotIn) != 0 { + mods = append(mods, qm.WhereNotIn(vss.ValueNumberCol+" NOT IN ?", fil.NotIn)) + } + if len(fil.In) != 0 { + mods = append(mods, qm.WhereNotIn(vss.ValueNumberCol+" IN ?", fil.In)) + } + + var orMods []qm.QueryMod + for _, cond := range fil.Or { + clauseMods := buildConditionList(cond) + if len(clauseMods) != 0 { + if len(orMods) == 0 { + orMods = append(orMods, qm.Expr(clauseMods...)) + } else { + orMods = append(orMods, qm.Or2(qm.Expr(clauseMods...))) + } + } + } + if len(orMods) != 0 { + mods = append(mods, qm.Expr(orMods...)) + } + + return mods +} + func aggTableEntry(ft FieldType, index int, name string) string { return fmt.Sprintf("(%d, %d, '%s')", ft, index, name) } diff --git a/schema/base.graphqls b/schema/base.graphqls index 21a49c9f..94d1447b 100644 --- a/schema/base.graphqls +++ b/schema/base.graphqls @@ -190,4 +190,5 @@ input SignalFloatFilter { lte: Float notIn: [Float!] in: [Float!] + or: [SignalFloatFilter!] } From c2f5f7e97a80559a6060a8d52f55258b72594d94 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Mon, 30 Jun 2025 19:13:08 -0400 Subject: [PATCH 35/36] Actually use this recursive gadget --- internal/service/ch/queries.go | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/internal/service/ch/queries.go b/internal/service/ch/queries.go index 77ffc485..c53b3bd0 100644 --- a/internal/service/ch/queries.go +++ b/internal/service/ch/queries.go @@ -386,32 +386,7 @@ func getAggQuery(aggArgs *model.AggregatedSignalArgs) (string, []any, error) { qmhelper.Where(signalTypeCol, qmhelper.EQ, FloatType), qmhelper.Where(signalIndexCol, qmhelper.EQ, i), } - if fil := agg.Filter; fil != nil { - if fil.Eq != nil { - fieldFilters = append(fieldFilters, qmhelper.Where(vss.ValueNumberCol, qmhelper.EQ, *fil.Eq)) - } - if fil.Neq != nil { - fieldFilters = append(fieldFilters, qmhelper.Where(vss.ValueNumberCol, qmhelper.NEQ, *fil.Neq)) - } - if fil.Gt != nil { - fieldFilters = append(fieldFilters, qmhelper.Where(vss.ValueNumberCol, qmhelper.GT, *fil.Gt)) - } - if fil.Lt != nil { - fieldFilters = append(fieldFilters, qmhelper.Where(vss.ValueNumberCol, qmhelper.LT, *fil.Lt)) - } - if fil.Gte != nil { - fieldFilters = append(fieldFilters, qmhelper.Where(vss.ValueNumberCol, qmhelper.GTE, *fil.Gte)) - } - if fil.Lte != nil { - fieldFilters = append(fieldFilters, qmhelper.Where(vss.ValueNumberCol, qmhelper.LTE, *fil.Lte)) - } - if len(fil.NotIn) != 0 { - fieldFilters = append(fieldFilters, qm.WhereNotIn(vss.ValueNumberCol+" NOT IN ?", fil.NotIn)) - } - if len(fil.In) != 0 { - fieldFilters = append(fieldFilters, qm.WhereNotIn(vss.ValueNumberCol+" IN ?", fil.In)) - } - } + fieldFilters = append(fieldFilters, buildConditionList(agg.Filter)...) floatFilters = append(floatFilters, qm.Or2(qm.Expr(fieldFilters...))) } From 13a7ba122d4ce78147b4708c99e90702d6858712 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Thu, 24 Jul 2025 18:38:29 -0400 Subject: [PATCH 36/36] Sketch out a geographic radius filter --- internal/graph/arguments.go | 8 + internal/graph/generated.go | 594 ++++++++++++++++++- internal/graph/model/models_gen.go | 81 ++- internal/graph/model/signalArgs.go | 15 + internal/graph/model/signal_aggs.go | 2 + internal/graph/signals_location.resolvers.go | 22 + internal/repositories/repositories.go | 18 +- internal/service/ch/ch.go | 19 +- internal/service/ch/queries.go | 45 +- schema/signals_gen.graphqls | 16 +- schema/signals_location.graphqls | 32 + 11 files changed, 819 insertions(+), 33 deletions(-) create mode 100644 internal/graph/signals_location.resolvers.go create mode 100644 schema/signals_location.graphqls diff --git a/internal/graph/arguments.go b/internal/graph/arguments.go index f02076a2..ea90c0a3 100644 --- a/internal/graph/arguments.go +++ b/internal/graph/arguments.go @@ -69,6 +69,14 @@ func addSignalAggregation(aggArgs *model.AggregatedSignalArgs, child *graphql.Fi Agg: typedAgg, Alias: alias, }) + case model.LocationAggregation: + filter, _ := child.Args["filter"].(*model.SignalLocationFilter) + aggArgs.LocationArgs = append(aggArgs.LocationArgs, model.LocationSignalArgs{ + Name: name, + Agg: typedAgg, + Alias: alias, + Filter: filter, + }) default: return fmt.Errorf("unknown aggregation type: %T", agg) } diff --git a/internal/graph/generated.go b/internal/graph/generated.go index 3e5c8c5c..a29eeb61 100644 --- a/internal/graph/generated.go +++ b/internal/graph/generated.go @@ -70,6 +70,12 @@ type ComplexityRoot struct { LastActive func(childComplexity int) int } + Location struct { + Hdop func(childComplexity int) int + Latitude func(childComplexity int) int + Longitude func(childComplexity int) int + } + POMVC struct { RawVc func(childComplexity int) int RecordedBy func(childComplexity int) int @@ -104,6 +110,7 @@ type ComplexityRoot struct { ChassisAxleRow1WheelRightTirePressure func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int ChassisAxleRow2WheelLeftTirePressure func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int ChassisAxleRow2WheelRightTirePressure func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int + CurrentLocation func(childComplexity int, agg model.LocationAggregation, filter *model.SignalLocationFilter) int CurrentLocationAltitude func(childComplexity int, agg model.FloatAggregation, filter *model.SignalFloatFilter) int CurrentLocationApproximateLatitude func(childComplexity int, agg model.FloatAggregation) int CurrentLocationApproximateLongitude func(childComplexity int, agg model.FloatAggregation) int @@ -363,6 +370,7 @@ type SignalAggregationsResolver interface { PowertrainType(ctx context.Context, obj *model.SignalAggregations, agg model.StringAggregation) (*string, error) ServiceDistanceToService(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) Speed(ctx context.Context, obj *model.SignalAggregations, agg model.FloatAggregation, filter *model.SignalFloatFilter) (*float64, error) + CurrentLocation(ctx context.Context, obj *model.SignalAggregations, agg model.LocationAggregation, filter *model.SignalLocationFilter) (*model.Location, error) } type executableSchema struct { @@ -454,6 +462,27 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return e.complexity.DeviceActivity.LastActive(childComplexity), true + case "Location.hdop": + if e.complexity.Location.Hdop == nil { + break + } + + return e.complexity.Location.Hdop(childComplexity), true + + case "Location.latitude": + if e.complexity.Location.Latitude == nil { + break + } + + return e.complexity.Location.Latitude(childComplexity), true + + case "Location.longitude": + if e.complexity.Location.Longitude == nil { + break + } + + return e.complexity.Location.Longitude(childComplexity), true + case "POMVC.rawVC": if e.complexity.POMVC.RawVc == nil { break @@ -753,6 +782,18 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return e.complexity.SignalAggregations.ChassisAxleRow2WheelRightTirePressure(childComplexity, args["agg"].(model.FloatAggregation), args["filter"].(*model.SignalFloatFilter)), true + case "SignalAggregations.currentLocation": + if e.complexity.SignalAggregations.CurrentLocation == nil { + break + } + + args, err := ec.field_SignalAggregations_currentLocation_args(ctx, rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.SignalAggregations.CurrentLocation(childComplexity, args["agg"].(model.LocationAggregation), args["filter"].(*model.SignalLocationFilter)), true + case "SignalAggregations.currentLocationAltitude": if e.complexity.SignalAggregations.CurrentLocationAltitude == nil { break @@ -2170,8 +2211,11 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { inputUnmarshalMap := graphql.BuildUnmarshalerMap( ec.unmarshalInputAftermarketDeviceBy, ec.unmarshalInputAttestationFilter, + ec.unmarshalInputCircleCenter, ec.unmarshalInputSignalFilter, ec.unmarshalInputSignalFloatFilter, + ec.unmarshalInputSignalLocationCircleFilter, + ec.unmarshalInputSignalLocationFilter, ) first := true @@ -3160,8 +3204,8 @@ extend type SignalAggregations { ): String @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainFuelSystemSupportedFuelTypes", forceResolver: true) @isSignal @hasAggregation """ - Remaining range in meters using all energy sources available in the vehicle. - Unit: 'm' + Remaining range in kilometers using all energy sources available in the vehicle. + Unit: 'km' Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainRange( @@ -3249,8 +3293,8 @@ extend type SignalAggregations { ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryGrossCapacity", forceResolver: true) @isSignal @hasAggregation """ - Remaining range in meters using only battery. - Unit: 'm' + Remaining range in kilometers using only battery. + Unit: 'km' Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryRange( @@ -3730,8 +3774,8 @@ extend type SignalCollection { powertrainFuelSystemSupportedFuelTypes: SignalString @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainFuelSystemSupportedFuelTypes") @isSignal """ - Remaining range in meters using all energy sources available in the vehicle. - Unit: 'm' + Remaining range in kilometers using all energy sources available in the vehicle. + Unit: 'km' Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainRange: SignalFloat @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainRange") @isSignal @@ -3792,8 +3836,8 @@ extend type SignalCollection { powertrainTractionBatteryGrossCapacity: SignalFloat @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryGrossCapacity") @isSignal """ - Remaining range in meters using only battery. - Unit: 'm' + Remaining range in kilometers using only battery. + Unit: 'km' Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryRange: SignalFloat @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryRange") @isSignal @@ -3861,6 +3905,39 @@ extend type SignalCollection { } +`, BuiltIn: false}, + {Name: "../../schema/signals_location.graphqls", Input: `extend type SignalAggregations { + currentLocation( + agg: LocationAggregation!, + filter: SignalLocationFilter + ): Location @requiresAllOfPrivileges(privileges: [VEHICLE_ALL_TIME_LOCATION]) @goField(name: "CurrentLocation", forceResolver: true) @isSignal @hasAggregation +} + +type Location { + latitude: Float! + longitude: Float! + hdop: Float! +} + +# It's tempting to do all of the float aggregations here, but anything +# involving ordering seems tough. +enum LocationAggregation { + FIRST +} + +input SignalLocationFilter { + inCircle: SignalLocationCircleFilter +} + +input SignalLocationCircleFilter { + center: CircleCenter! + radius: Float! +} + +input CircleCenter { + latitude: Float! + longitude: Float! +} `, BuiltIn: false}, {Name: "../../schema/vc.graphqls", Input: `extend type Query { """ @@ -5489,6 +5566,57 @@ func (ec *executionContext) field_SignalAggregations_currentLocationLongitude_ar return zeroVal, nil } +func (ec *executionContext) field_SignalAggregations_currentLocation_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { + var err error + args := map[string]any{} + arg0, err := ec.field_SignalAggregations_currentLocation_argsAgg(ctx, rawArgs) + if err != nil { + return nil, err + } + args["agg"] = arg0 + arg1, err := ec.field_SignalAggregations_currentLocation_argsFilter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["filter"] = arg1 + return args, nil +} +func (ec *executionContext) field_SignalAggregations_currentLocation_argsAgg( + ctx context.Context, + rawArgs map[string]any, +) (model.LocationAggregation, error) { + if _, ok := rawArgs["agg"]; !ok { + var zeroVal model.LocationAggregation + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("agg")) + if tmp, ok := rawArgs["agg"]; ok { + return ec.unmarshalNLocationAggregation2githubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐLocationAggregation(ctx, tmp) + } + + var zeroVal model.LocationAggregation + return zeroVal, nil +} + +func (ec *executionContext) field_SignalAggregations_currentLocation_argsFilter( + ctx context.Context, + rawArgs map[string]any, +) (*model.SignalLocationFilter, error) { + if _, ok := rawArgs["filter"]; !ok { + var zeroVal *model.SignalLocationFilter + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) + if tmp, ok := rawArgs["filter"]; ok { + return ec.unmarshalOSignalLocationFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalLocationFilter(ctx, tmp) + } + + var zeroVal *model.SignalLocationFilter + return zeroVal, nil +} + func (ec *executionContext) field_SignalAggregations_dimoAftermarketHDOP_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -8761,6 +8889,138 @@ func (ec *executionContext) fieldContext_DeviceActivity_lastActive(_ context.Con return fc, nil } +func (ec *executionContext) _Location_latitude(ctx context.Context, field graphql.CollectedField, obj *model.Location) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Location_latitude(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return obj.Latitude, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(float64) + fc.Result = res + return ec.marshalNFloat2float64(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Location_latitude(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Location", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Float does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Location_longitude(ctx context.Context, field graphql.CollectedField, obj *model.Location) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Location_longitude(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return obj.Longitude, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(float64) + fc.Result = res + return ec.marshalNFloat2float64(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Location_longitude(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Location", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Float does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Location_hdop(ctx context.Context, field graphql.CollectedField, obj *model.Location) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Location_hdop(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return obj.Hdop, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(float64) + fc.Result = res + return ec.marshalNFloat2float64(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Location_hdop(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Location", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Float does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _POMVC_vehicleTokenId(ctx context.Context, field graphql.CollectedField, obj *model.Pomvc) (ret graphql.Marshaler) { fc, err := ec.fieldContext_POMVC_vehicleTokenId(ctx, field) if err != nil { @@ -9185,6 +9445,8 @@ func (ec *executionContext) fieldContext_Query_signals(ctx context.Context, fiel return ec.fieldContext_SignalAggregations_serviceDistanceToService(ctx, field) case "speed": return ec.fieldContext_SignalAggregations_speed(ctx, field) + case "currentLocation": + return ec.fieldContext_SignalAggregations_currentLocation(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type SignalAggregations", field.Name) }, @@ -17328,6 +17590,107 @@ func (ec *executionContext) fieldContext_SignalAggregations_speed(ctx context.Co return fc, nil } +func (ec *executionContext) _SignalAggregations_currentLocation(ctx context.Context, field graphql.CollectedField, obj *model.SignalAggregations) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SignalAggregations_currentLocation(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + directive0 := func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.SignalAggregations().CurrentLocation(rctx, obj, fc.Args["agg"].(model.LocationAggregation), fc.Args["filter"].(*model.SignalLocationFilter)) + } + + directive1 := func(ctx context.Context) (any, error) { + privileges, err := ec.unmarshalNPrivilege2ᚕgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐPrivilegeᚄ(ctx, []any{"VEHICLE_ALL_TIME_LOCATION"}) + if err != nil { + var zeroVal *model.Location + return zeroVal, err + } + if ec.directives.RequiresAllOfPrivileges == nil { + var zeroVal *model.Location + return zeroVal, errors.New("directive requiresAllOfPrivileges is not implemented") + } + return ec.directives.RequiresAllOfPrivileges(ctx, obj, directive0, privileges) + } + directive2 := func(ctx context.Context) (any, error) { + if ec.directives.IsSignal == nil { + var zeroVal *model.Location + return zeroVal, errors.New("directive isSignal is not implemented") + } + return ec.directives.IsSignal(ctx, obj, directive1) + } + directive3 := func(ctx context.Context) (any, error) { + if ec.directives.HasAggregation == nil { + var zeroVal *model.Location + return zeroVal, errors.New("directive hasAggregation is not implemented") + } + return ec.directives.HasAggregation(ctx, obj, directive2) + } + + tmp, err := directive3(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*model.Location); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/DIMO-Network/telemetry-api/internal/graph/model.Location`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.Location) + fc.Result = res + return ec.marshalOLocation2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐLocation(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_SignalAggregations_currentLocation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SignalAggregations", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "latitude": + return ec.fieldContext_Location_latitude(ctx, field) + case "longitude": + return ec.fieldContext_Location_longitude(ctx, field) + case "hdop": + return ec.fieldContext_Location_hdop(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Location", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_SignalAggregations_currentLocation_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + func (ec *executionContext) _SignalCollection_lastSeen(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { fc, err := ec.fieldContext_SignalCollection_lastSeen(ctx, field) if err != nil { @@ -26296,6 +26659,40 @@ func (ec *executionContext) unmarshalInputAttestationFilter(ctx context.Context, return it, nil } +func (ec *executionContext) unmarshalInputCircleCenter(ctx context.Context, obj any) (model.CircleCenter, error) { + var it model.CircleCenter + asMap := map[string]any{} + for k, v := range obj.(map[string]any) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"latitude", "longitude"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "latitude": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("latitude")) + data, err := ec.unmarshalNFloat2float64(ctx, v) + if err != nil { + return it, err + } + it.Latitude = data + case "longitude": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("longitude")) + data, err := ec.unmarshalNFloat2float64(ctx, v) + if err != nil { + return it, err + } + it.Longitude = data + } + } + + return it, nil +} + func (ec *executionContext) unmarshalInputSignalFilter(ctx context.Context, obj any) (model.SignalFilter, error) { var it model.SignalFilter asMap := map[string]any{} @@ -26406,6 +26803,67 @@ func (ec *executionContext) unmarshalInputSignalFloatFilter(ctx context.Context, return it, nil } +func (ec *executionContext) unmarshalInputSignalLocationCircleFilter(ctx context.Context, obj any) (model.SignalLocationCircleFilter, error) { + var it model.SignalLocationCircleFilter + asMap := map[string]any{} + for k, v := range obj.(map[string]any) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"center", "radius"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "center": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("center")) + data, err := ec.unmarshalNCircleCenter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐCircleCenter(ctx, v) + if err != nil { + return it, err + } + it.Center = data + case "radius": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("radius")) + data, err := ec.unmarshalNFloat2float64(ctx, v) + if err != nil { + return it, err + } + it.Radius = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputSignalLocationFilter(ctx context.Context, obj any) (model.SignalLocationFilter, error) { + var it model.SignalLocationFilter + asMap := map[string]any{} + for k, v := range obj.(map[string]any) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"inCircle"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "inCircle": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("inCircle")) + data, err := ec.unmarshalOSignalLocationCircleFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalLocationCircleFilter(ctx, v) + if err != nil { + return it, err + } + it.InCircle = data + } + } + + return it, nil +} + // endregion **************************** input.gotpl ***************************** // region ************************** interface.gotpl *************************** @@ -26526,6 +26984,55 @@ func (ec *executionContext) _DeviceActivity(ctx context.Context, sel ast.Selecti return out } +var locationImplementors = []string{"Location"} + +func (ec *executionContext) _Location(ctx context.Context, sel ast.SelectionSet, obj *model.Location) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, locationImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Location") + case "latitude": + out.Values[i] = ec._Location_latitude(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "longitude": + out.Values[i] = ec._Location_longitude(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "hdop": + out.Values[i] = ec._Location_hdop(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + var pOMVCImplementors = []string{"POMVC"} func (ec *executionContext) _POMVC(ctx context.Context, sel ast.SelectionSet, obj *model.Pomvc) graphql.Marshaler { @@ -29345,6 +29852,39 @@ func (ec *executionContext) _SignalAggregations(ctx context.Context, sel ast.Sel continue } + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "currentLocation": + field := field + + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._SignalAggregations_currentLocation(ctx, field, obj) + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) default: panic("unknown field " + strconv.Quote(field.Name)) @@ -30076,6 +30616,11 @@ func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.Se return res } +func (ec *executionContext) unmarshalNCircleCenter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐCircleCenter(ctx context.Context, v any) (*model.CircleCenter, error) { + res, err := ec.unmarshalInputCircleCenter(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + func (ec *executionContext) unmarshalNFloat2float64(ctx context.Context, v any) (float64, error) { res, err := graphql.UnmarshalFloatContext(ctx, v) return res, graphql.ErrorOnPath(ctx, err) @@ -30118,6 +30663,16 @@ func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.Selecti return res } +func (ec *executionContext) unmarshalNLocationAggregation2githubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐLocationAggregation(ctx context.Context, v any) (model.LocationAggregation, error) { + var res model.LocationAggregation + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNLocationAggregation2githubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐLocationAggregation(ctx context.Context, sel ast.SelectionSet, v model.LocationAggregation) graphql.Marshaler { + return v +} + func (ec *executionContext) unmarshalNPrivilege2githubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐPrivilege(ctx context.Context, v any) (model.Privilege, error) { var res model.Privilege err := res.UnmarshalGQL(v) @@ -30679,6 +31234,13 @@ func (ec *executionContext) marshalOInt2ᚖint(ctx context.Context, sel ast.Sele return res } +func (ec *executionContext) marshalOLocation2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐLocation(ctx context.Context, sel ast.SelectionSet, v *model.Location) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Location(ctx, sel, v) +} + func (ec *executionContext) marshalOPOMVC2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐPomvc(ctx context.Context, sel ast.SelectionSet, v *model.Pomvc) graphql.Marshaler { if v == nil { return graphql.Null @@ -30781,6 +31343,22 @@ func (ec *executionContext) unmarshalOSignalFloatFilter2ᚖgithubᚗcomᚋDIMO return &res, graphql.ErrorOnPath(ctx, err) } +func (ec *executionContext) unmarshalOSignalLocationCircleFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalLocationCircleFilter(ctx context.Context, v any) (*model.SignalLocationCircleFilter, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputSignalLocationCircleFilter(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalOSignalLocationFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalLocationFilter(ctx context.Context, v any) (*model.SignalLocationFilter, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputSignalLocationFilter(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + func (ec *executionContext) marshalOSignalString2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalString(ctx context.Context, sel ast.SelectionSet, v *model.SignalString) graphql.Marshaler { if v == nil { return graphql.Null diff --git a/internal/graph/model/models_gen.go b/internal/graph/model/models_gen.go index 299e9c27..196308c1 100644 --- a/internal/graph/model/models_gen.go +++ b/internal/graph/model/models_gen.go @@ -58,11 +58,22 @@ type AttestationFilter struct { Limit *int `json:"limit,omitempty"` } +type CircleCenter struct { + Latitude float64 `json:"latitude"` + Longitude float64 `json:"longitude"` +} + type DeviceActivity struct { // lastActive indicates the start of a 3 hour block during which the device was last active. LastActive *time.Time `json:"lastActive,omitempty"` } +type Location struct { + Latitude float64 `json:"latitude"` + Longitude float64 `json:"longitude"` + Hdop float64 `json:"hdop"` +} + type Pomvc struct { // vehicleTokenId is the token ID of the vehicle. VehicleTokenID *int `json:"vehicleTokenId,omitempty"` @@ -305,8 +316,8 @@ type SignalCollection struct { // High level information of fuel types supported // Required Privileges: [VEHICLE_NON_LOCATION_DATA] PowertrainFuelSystemSupportedFuelTypes *SignalString `json:"powertrainFuelSystemSupportedFuelTypes,omitempty"` - // Remaining range in meters using all energy sources available in the vehicle. - // Unit: 'm' + // Remaining range in kilometers using all energy sources available in the vehicle. + // Unit: 'km' // Required Privileges: [VEHICLE_NON_LOCATION_DATA] PowertrainRange *SignalFloat `json:"powertrainRange,omitempty"` // Amount of charge added to the high voltage battery during the current charging session, expressed in kilowatt-hours. @@ -340,8 +351,8 @@ type SignalCollection struct { // Unit: 'kWh' // Required Privileges: [VEHICLE_NON_LOCATION_DATA] PowertrainTractionBatteryGrossCapacity *SignalFloat `json:"powertrainTractionBatteryGrossCapacity,omitempty"` - // Remaining range in meters using only battery. - // Unit: 'm' + // Remaining range in kilometers using only battery. + // Unit: 'km' // Required Privileges: [VEHICLE_NON_LOCATION_DATA] PowertrainTractionBatteryRange *SignalFloat `json:"powertrainTractionBatteryRange,omitempty"` // Physical state of charge of the high voltage battery, relative to net capacity. This is not necessarily the state of charge being displayed to the customer. @@ -406,6 +417,15 @@ type SignalFloatFilter struct { Or []*SignalFloatFilter `json:"or,omitempty"` } +type SignalLocationCircleFilter struct { + Center *CircleCenter `json:"center"` + Radius float64 `json:"radius"` +} + +type SignalLocationFilter struct { + InCircle *SignalLocationCircleFilter `json:"inCircle,omitempty"` +} + type SignalString struct { // timestamp of when this data was colllected Timestamp time.Time `json:"timestamp"` @@ -499,6 +519,59 @@ func (e FloatAggregation) MarshalJSON() ([]byte, error) { return buf.Bytes(), nil } +type LocationAggregation string + +const ( + LocationAggregationFirst LocationAggregation = "FIRST" +) + +var AllLocationAggregation = []LocationAggregation{ + LocationAggregationFirst, +} + +func (e LocationAggregation) IsValid() bool { + switch e { + case LocationAggregationFirst: + return true + } + return false +} + +func (e LocationAggregation) String() string { + return string(e) +} + +func (e *LocationAggregation) UnmarshalGQL(v any) error { + str, ok := v.(string) + if !ok { + return fmt.Errorf("enums must be strings") + } + + *e = LocationAggregation(str) + if !e.IsValid() { + return fmt.Errorf("%s is not a valid LocationAggregation", str) + } + return nil +} + +func (e LocationAggregation) MarshalGQL(w io.Writer) { + fmt.Fprint(w, strconv.Quote(e.String())) +} + +func (e *LocationAggregation) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e LocationAggregation) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + type Privilege string const ( diff --git a/internal/graph/model/signalArgs.go b/internal/graph/model/signalArgs.go index e7cc6ead..7cdfe529 100644 --- a/internal/graph/model/signalArgs.go +++ b/internal/graph/model/signalArgs.go @@ -43,6 +43,8 @@ type AggregatedSignalArgs struct { FloatArgs []FloatSignalArgs // StringArgs represents arguments for each string signal. StringArgs []StringSignalArgs + // LocationArgs represents arguments for each location signal. + LocationArgs []LocationSignalArgs // ApproxLocArgs ApproxLocArgs map[FloatAggregation]struct{} } @@ -70,3 +72,16 @@ type StringSignalArgs struct { // an alias then this will be the same as Name. Alias string } + +// LocationSignalArgs is the arguments for querying location signals. +type LocationSignalArgs struct { + // Name is the signal name. + Name string + // Agg is the aggregation type. + Agg LocationAggregation + // Alias is the GraphQL field alias. If the client doesn't specify + // an alias then this will be the same as Name. + Alias string + // Filter is an optional set of geographic filters. + Filter *SignalLocationFilter +} diff --git a/internal/graph/model/signal_aggs.go b/internal/graph/model/signal_aggs.go index 5950c5a1..072a4631 100644 --- a/internal/graph/model/signal_aggs.go +++ b/internal/graph/model/signal_aggs.go @@ -19,6 +19,8 @@ type SignalAggregations struct { ValueNumbers map[string]float64 `json:"-"` // Alias to value ValueStrings map[string]string `json:"-"` + // Alias to value + ValueLocations map[string]Location `json:"-"` // Aggregation cross non-approximate field name to value AppLocNumbers map[AppLocKey]float64 `json:"-"` diff --git a/internal/graph/signals_location.resolvers.go b/internal/graph/signals_location.resolvers.go new file mode 100644 index 00000000..9c53bb07 --- /dev/null +++ b/internal/graph/signals_location.resolvers.go @@ -0,0 +1,22 @@ +package graph + +// This file will be automatically regenerated based on the schema, any resolver implementations +// will be copied through when generating and any unknown code will be moved to the end. +// Code generated by github.com/99designs/gqlgen version v0.17.76 + +import ( + "context" + + "github.com/99designs/gqlgen/graphql" + "github.com/DIMO-Network/telemetry-api/internal/graph/model" +) + +// CurrentLocation is the resolver for the currentLocation field. +func (r *signalAggregationsResolver) CurrentLocation(ctx context.Context, obj *model.SignalAggregations, agg model.LocationAggregation, filter *model.SignalLocationFilter) (*model.Location, error) { + fieldCtx := graphql.GetFieldContext(ctx) + vl, ok := obj.ValueLocations[fieldCtx.Field.Alias] + if !ok { + return nil, nil + } + return &vl, nil +} diff --git a/internal/repositories/repositories.go b/internal/repositories/repositories.go index e8fb20a3..fa3248cf 100644 --- a/internal/repositories/repositories.go +++ b/internal/repositories/repositories.go @@ -84,10 +84,11 @@ func (r *Repository) GetSignal(ctx context.Context, aggArgs *model.AggregatedSig if !lastTS.Equal(signal.Timestamp) { lastTS = signal.Timestamp currAggs = &model.SignalAggregations{ - Timestamp: signal.Timestamp, - ValueNumbers: make(map[string]float64), - ValueStrings: make(map[string]string), - AppLocNumbers: make(map[model.AppLocKey]float64), + Timestamp: signal.Timestamp, + ValueNumbers: make(map[string]float64), + ValueStrings: make(map[string]string), + ValueLocations: make(map[string]model.Location), + AppLocNumbers: make(map[model.AppLocKey]float64), } allAggs = append(allAggs, currAggs) } @@ -111,6 +112,15 @@ func (r *Repository) GetSignal(ctx context.Context, aggArgs *model.AggregatedSig name := parityToLocationSignalName[aggParity] agg := model.AllFloatAggregation[aggIndex] currAggs.AppLocNumbers[model.AppLocKey{Aggregation: agg, Name: name}] = signal.ValueNumber + case ch.LocType: + if len(aggArgs.LocationArgs) <= int(signal.SignalIndex) { + return nil, fmt.Errorf("only %d location signal requests, but the query returned index %d", len(aggArgs.LocationArgs), signal.SignalIndex) + } + currAggs.ValueLocations[aggArgs.LocationArgs[signal.SignalIndex].Alias] = model.Location{ + Latitude: signal.ValueLocation.Latitude, + Longitude: signal.ValueLocation.Longitude, + Hdop: signal.ValueLocation.HDOP, + } default: return nil, fmt.Errorf("scanned a row with unrecognized type number %d", signal.SignalType) } diff --git a/internal/service/ch/ch.go b/internal/service/ch/ch.go index 5ddb48b6..e041dc78 100644 --- a/internal/service/ch/ch.go +++ b/internal/service/ch/ch.go @@ -3,7 +3,6 @@ package ch import ( "context" - "crypto/tls" "fmt" "time" @@ -40,9 +39,9 @@ func NewService(settings config.Settings) (*Service, error) { Password: settings.Clickhouse.Password, Database: settings.Clickhouse.Database, }, - TLS: &tls.Config{ - RootCAs: settings.Clickhouse.RootCAs, - }, + // TLS: &tls.Config{ + // RootCAs: settings.Clickhouse.RootCAs, + // }, Settings: map[string]any{ // ClickHouse will interrupt a query if the projected execution time exceeds the specified max_execution_time. // The estimated execution time is calculated after `timeout_before_checking_execution_speed` @@ -115,7 +114,7 @@ func (m *AliasHandleMapper) Alias(handle string) string { // The signals are sorted by timestamp in ascending order. // The timestamp on each signal is for the start of the interval. func (s *Service) GetAggregatedSignals(ctx context.Context, aggArgs *model.AggregatedSignalArgs) ([]*AggSignal, error) { - if len(aggArgs.FloatArgs) == 0 && len(aggArgs.StringArgs) == 0 && len(aggArgs.ApproxLocArgs) == 0 { + if len(aggArgs.FloatArgs) == 0 && len(aggArgs.StringArgs) == 0 && len(aggArgs.ApproxLocArgs) == 0 && len(aggArgs.LocationArgs) == 0 { return []*AggSignal{}, nil } @@ -182,6 +181,8 @@ type AggSignal struct { // ValueNumber is the value for this row if it is of float or // approximate location type. ValueString string + // ValueLocation is the value for this row if it is of location type. + ValueLocation vss.Location } func (s *Service) getAggSignals(ctx context.Context, stmt string, args []any) ([]*AggSignal, error) { @@ -189,10 +190,16 @@ func (s *Service) getAggSignals(ctx context.Context, stmt string, args []any) ([ if err != nil { return nil, fmt.Errorf("failed querying clickhouse: %w", err) } + + rows, err = s.conn.Query(ctx, stmt, args...) + if err != nil { + return nil, fmt.Errorf("failed querying clickhouse: %w", err) + } + signals := []*AggSignal{} for rows.Next() { var signal AggSignal - err := rows.Scan(&signal.SignalType, &signal.SignalIndex, &signal.Timestamp, &signal.ValueNumber, &signal.ValueString) + err := rows.Scan(&signal.SignalType, &signal.SignalIndex, &signal.Timestamp, &signal.ValueNumber, &signal.ValueString, &signal.ValueLocation) if err != nil { _ = rows.Close() return nil, fmt.Errorf("failed scanning clickhouse row: %w", err) diff --git a/internal/service/ch/queries.go b/internal/service/ch/queries.go index 274abe3e..af933c42 100644 --- a/internal/service/ch/queries.go +++ b/internal/service/ch/queries.go @@ -19,6 +19,7 @@ const ( IntervalGroup = "group_timestamp" AggNumberCol = "agg_number" AggStringCol = "agg_string" + AggLocationCol = "agg_location" aggTableName = "agg_table" tokenIDWhere = vss.TokenIDCol + " = ?" nameIn = vss.NameCol + " IN ?" @@ -93,6 +94,8 @@ const ( // AppLocType is the type for rows needed to compute approximate // locations. AppLocType FieldType = 3 + // LocType is the type for rows with location tuple values. + LocType FieldType = 4 ) func (t *FieldType) Scan(value any) error { @@ -101,7 +104,7 @@ func (t *FieldType) Scan(value any) error { return fmt.Errorf("expected value of type uint8, but got type %T", value) } - if w == 0 || w > 3 { + if w == 0 || w > 4 { return fmt.Errorf("invalid value %d for field type", w) } @@ -171,6 +174,19 @@ func selectNumberAggs(numberAggs []model.FloatSignalArgs, appLocAggs map[model.F return qm.Select(caseStmt) } +func selectLocationAggs(locAggs []model.LocationSignalArgs) qm.QueryMod { + if len(locAggs) == 0 { + return qm.Select("NULL AS " + vss.ValueLocationCol) + } + // Add a CASE statement for each name and its corresponding aggregation function + caseStmts := make([]string, 0, len(locAggs)) + for i := range locAggs { // Only one aggregation, so skip this. + caseStmts = append(caseStmts, fmt.Sprintf("WHEN %s = %d AND %s = %d THEN %s", signalTypeCol, LocType, signalIndexCol, i, "argMin(value_location, timestamp)")) + } + caseStmt := fmt.Sprintf("CASE %s ELSE CAST((0, 0, 0) AS Tuple(latitude Float64, longitude Float64, hdop Float64)) END AS %s", strings.Join(caseStmts, " "), AggLocationCol) + return qm.Select(caseStmt) +} + func selectStringAggs(stringAggs []model.StringSignalArgs) qm.QueryMod { if len(stringAggs) == 0 { return qm.Select("NULL AS " + vss.ValueStringCol) @@ -350,7 +366,7 @@ func getAggQuery(aggArgs *model.AggregatedSignalArgs) (string, []any, error) { return "", nil, nil } - numAggs := len(aggArgs.FloatArgs) + len(aggArgs.StringArgs) + 2*len(aggArgs.ApproxLocArgs) + numAggs := len(aggArgs.FloatArgs) + len(aggArgs.StringArgs) + 2*len(aggArgs.ApproxLocArgs) + len(aggArgs.LocationArgs) if numAggs == 0 { return "", nil, errors.New("no aggregations requested") } @@ -372,6 +388,9 @@ func getAggQuery(aggArgs *model.AggregatedSignalArgs) (string, []any, error) { aggTableEntry(AppLocType, 2*i+1, vss.FieldCurrentLocationLatitude)) } } + for i, agg := range aggArgs.LocationArgs { + valuesArgs = append(valuesArgs, aggTableEntry(LocType, i, agg.Name)) + } valueTable := fmt.Sprintf("VALUES('%s', %s) as %s ON %s.%s = %s.%s", valueTableDef, strings.Join(valuesArgs, ", "), aggTableName, vss.TableName, vss.NameCol, aggTableName, vss.NameCol) floatFilters := []qm.QueryMod{ @@ -391,12 +410,32 @@ func getAggQuery(aggArgs *model.AggregatedSignalArgs) (string, []any, error) { floatFilters = append(floatFilters, qm.Or2(qm.Expr(fieldFilters...))) } + locFilters := []qm.QueryMod{ + qmhelper.Where(signalTypeCol, qmhelper.NEQ, LocType), + } + + for i, agg := range aggArgs.LocationArgs { + fieldFilters := []qm.QueryMod{ + qmhelper.Where(signalTypeCol, qmhelper.EQ, LocType), + qmhelper.Where(signalIndexCol, qmhelper.EQ, i), + } + + if agg.Filter != nil && agg.Filter.InCircle != nil { + fieldFilters = append(fieldFilters, + qm.Where("greatCircleDistance(value_location.longitude, value_location.latitude, ?, ?) < ?", agg.Filter.InCircle.Center.Longitude, agg.Filter.InCircle.Center.Latitude, agg.Filter.InCircle.Radius), + ) + } + + locFilters = append(locFilters, qm.Or2(qm.Expr(fieldFilters...))) + } + mods := []qm.QueryMod{ qm.Select(signalTypeCol), qm.Select(signalIndexCol), selectInterval(aggArgs.Interval, aggArgs.FromTS), selectNumberAggs(aggArgs.FloatArgs, aggArgs.ApproxLocArgs), selectStringAggs(aggArgs.StringArgs), + selectLocationAggs(aggArgs.LocationArgs), qm.Where(tokenIDWhere, aggArgs.TokenID), qm.Where(timestampFrom, aggArgs.FromTS), qm.Where(timestampTo, aggArgs.ToTS), @@ -408,7 +447,7 @@ func getAggQuery(aggArgs *model.AggregatedSignalArgs) (string, []any, error) { qm.OrderBy(groupAsc), } mods = append(mods, getFilterMods(aggArgs.Filter)...) - mods = append(mods, qm.Expr(floatFilters...)) + mods = append(mods, qm.Expr(floatFilters...), qm.Expr(locFilters...)) stmt, args := newQuery(mods...) return stmt, args, nil diff --git a/schema/signals_gen.graphqls b/schema/signals_gen.graphqls index b8e82708..5dee062c 100644 --- a/schema/signals_gen.graphqls +++ b/schema/signals_gen.graphqls @@ -548,8 +548,8 @@ extend type SignalAggregations { ): String @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainFuelSystemSupportedFuelTypes", forceResolver: true) @isSignal @hasAggregation """ - Remaining range in meters using all energy sources available in the vehicle. - Unit: 'm' + Remaining range in kilometers using all energy sources available in the vehicle. + Unit: 'km' Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainRange( @@ -637,8 +637,8 @@ extend type SignalAggregations { ): Float @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryGrossCapacity", forceResolver: true) @isSignal @hasAggregation """ - Remaining range in meters using only battery. - Unit: 'm' + Remaining range in kilometers using only battery. + Unit: 'km' Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryRange( @@ -1118,8 +1118,8 @@ extend type SignalCollection { powertrainFuelSystemSupportedFuelTypes: SignalString @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainFuelSystemSupportedFuelTypes") @isSignal """ - Remaining range in meters using all energy sources available in the vehicle. - Unit: 'm' + Remaining range in kilometers using all energy sources available in the vehicle. + Unit: 'km' Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainRange: SignalFloat @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainRange") @isSignal @@ -1180,8 +1180,8 @@ extend type SignalCollection { powertrainTractionBatteryGrossCapacity: SignalFloat @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryGrossCapacity") @isSignal """ - Remaining range in meters using only battery. - Unit: 'm' + Remaining range in kilometers using only battery. + Unit: 'km' Required Privileges: [VEHICLE_NON_LOCATION_DATA] """ powertrainTractionBatteryRange: SignalFloat @requiresAllOfPrivileges(privileges: [VEHICLE_NON_LOCATION_DATA]) @goField(name: "PowertrainTractionBatteryRange") @isSignal diff --git a/schema/signals_location.graphqls b/schema/signals_location.graphqls new file mode 100644 index 00000000..6058cfef --- /dev/null +++ b/schema/signals_location.graphqls @@ -0,0 +1,32 @@ +extend type SignalAggregations { + currentLocation( + agg: LocationAggregation!, + filter: SignalLocationFilter + ): Location @requiresAllOfPrivileges(privileges: [VEHICLE_ALL_TIME_LOCATION]) @goField(name: "CurrentLocation", forceResolver: true) @isSignal @hasAggregation +} + +type Location { + latitude: Float! + longitude: Float! + hdop: Float! +} + +# It's tempting to do all of the float aggregations here, but anything +# involving ordering seems tough. +enum LocationAggregation { + FIRST +} + +input SignalLocationFilter { + inCircle: SignalLocationCircleFilter +} + +input SignalLocationCircleFilter { + center: CircleCenter! + radius: Float! +} + +input CircleCenter { + latitude: Float! + longitude: Float! +}