Package com.highmobility.autoapi
Class Race.State.Builder
java.lang.Object
com.highmobility.autoapi.SetCommand.Builder<Race.State.Builder>
com.highmobility.autoapi.Race.State.Builder
- Enclosing class:
- Race.State
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAcceleration(Property<Acceleration> acceleration) Add a single accelerationaddAcceleratorDuration(Property<AcceleratorDuration> acceleratorDuration) Add a single accelerator durationaddBrakeTorqueVectoring(Property<BrakeTorqueVectoring> brakeTorqueVectoring) Add a single brake torque vectoringbuild()setAccelerations(Property<Acceleration>[] accelerations) Add an array of accelerationssetAcceleratorDurations(Property<AcceleratorDuration>[] acceleratorDurations) Add an array of accelerator durationssetAcceleratorPedalIdleSwitch(Property<ActiveState> acceleratorPedalIdleSwitch) setAcceleratorPedalKickdownSwitch(Property<ActiveState> acceleratorPedalKickdownSwitch) setBrakePedalPosition(Property<Double> brakePedalPosition) setBrakePedalSwitch(Property<ActiveState> brakePedalSwitch) setBrakePressure(Property<com.highmobility.autoapi.value.measurement.Pressure> brakePressure) setBrakeTorqueVectorings(Property<BrakeTorqueVectoring>[] brakeTorqueVectorings) Add an array of brake torque vectoringssetClutchPedalSwitch(Property<ActiveState> clutchPedalSwitch) setDrivetrainState(Property<Race.DrivetrainState> drivetrainState) setElectronicStabilityProgram(Property<ActiveState> electronicStabilityProgram) setGasPedalPosition(Property<Double> gasPedalPosition) setGearMode(Property<Race.GearMode> gearMode) setOversteering(Property<Double> oversteering) setRearSuspensionSteering(Property<com.highmobility.autoapi.value.measurement.Angle> rearSuspensionSteering) setSelectedGear(Property<Integer> selectedGear) setSteeringAngle(Property<com.highmobility.autoapi.value.measurement.Angle> steeringAngle) setUndersteering(Property<Double> understeering) setVehicleMoving(Property<Race.VehicleMoving> vehicleMoving) setYawRate(Property<com.highmobility.autoapi.value.measurement.AngularVelocity> yawRate) Methods inherited from class com.highmobility.autoapi.SetCommand.Builder
addProperty, getProperties, setBrand, setNonce, setSignature, setTimestamp, setVin
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
- Overrides:
buildin classSetCommand.Builder<Race.State.Builder>
-
setAccelerations
Add an array of accelerations- Parameters:
accelerations- The accelerations- Returns:
- The builder
-
addAcceleration
Add a single acceleration- Parameters:
acceleration- The acceleration- Returns:
- The builder
-
setUndersteering
- Parameters:
understeering- The understeering percentage between 0.0-1.0 whereas up to 0.2 (20%) is considered OK, up to 0.3 (30%) marginal, over 30% critical- Returns:
- The builder
-
setOversteering
- Parameters:
oversteering- The oversteering percentage between 0.0-1.0 whereas up to 0.2 (20%) is considered OK, up to 30% marginal, over 30% critical- Returns:
- The builder
-
setGasPedalPosition
- Parameters:
gasPedalPosition- The gas pedal position between 0.0-1.0, whereas 1.0 (100%) is full throttle- Returns:
- The builder
-
setSteeringAngle
public Race.State.Builder setSteeringAngle(Property<com.highmobility.autoapi.value.measurement.Angle> steeringAngle) - Parameters:
steeringAngle- The steering angle, whereas 0.0 is straight ahead, positive number to the right and negative number to the left- Returns:
- The builder
-
setBrakePressure
public Race.State.Builder setBrakePressure(Property<com.highmobility.autoapi.value.measurement.Pressure> brakePressure) - Parameters:
brakePressure- Brake pressure- Returns:
- The builder
-
setYawRate
public Race.State.Builder setYawRate(Property<com.highmobility.autoapi.value.measurement.AngularVelocity> yawRate) - Parameters:
yawRate- Yaw turning rate- Returns:
- The builder
-
setRearSuspensionSteering
public Race.State.Builder setRearSuspensionSteering(Property<com.highmobility.autoapi.value.measurement.Angle> rearSuspensionSteering) - Parameters:
rearSuspensionSteering- Rear suspension steering- Returns:
- The builder
-
setElectronicStabilityProgram
public Race.State.Builder setElectronicStabilityProgram(Property<ActiveState> electronicStabilityProgram) - Parameters:
electronicStabilityProgram- The electronic stability program- Returns:
- The builder
-
setBrakeTorqueVectorings
public Race.State.Builder setBrakeTorqueVectorings(Property<BrakeTorqueVectoring>[] brakeTorqueVectorings) Add an array of brake torque vectorings- Parameters:
brakeTorqueVectorings- The brake torque vectorings- Returns:
- The builder
-
addBrakeTorqueVectoring
public Race.State.Builder addBrakeTorqueVectoring(Property<BrakeTorqueVectoring> brakeTorqueVectoring) Add a single brake torque vectoring- Parameters:
brakeTorqueVectoring- The brake torque vectoring- Returns:
- The builder
-
setGearMode
- Parameters:
gearMode- The gear mode- Returns:
- The builder
-
setSelectedGear
- Parameters:
selectedGear- The selected gear value, if any- Returns:
- The builder
-
setBrakePedalPosition
- Parameters:
brakePedalPosition- The brake pedal position between 0.0-1.0, wheras 1.0 (100%) is full brakes- Returns:
- The builder
-
setBrakePedalSwitch
- Parameters:
brakePedalSwitch- The brake pedal switch- Returns:
- The builder
-
setClutchPedalSwitch
- Parameters:
clutchPedalSwitch- The clutch pedal switch- Returns:
- The builder
-
setAcceleratorPedalIdleSwitch
public Race.State.Builder setAcceleratorPedalIdleSwitch(Property<ActiveState> acceleratorPedalIdleSwitch) - Parameters:
acceleratorPedalIdleSwitch- The accelerator pedal idle switch- Returns:
- The builder
-
setAcceleratorPedalKickdownSwitch
public Race.State.Builder setAcceleratorPedalKickdownSwitch(Property<ActiveState> acceleratorPedalKickdownSwitch) - Parameters:
acceleratorPedalKickdownSwitch- The accelerator pedal kickdown switch- Returns:
- The builder
-
setVehicleMoving
- Parameters:
vehicleMoving- The vehicle moving- Returns:
- The builder
-
setDrivetrainState
- Parameters:
drivetrainState- State of the drivetrain for starts.- Returns:
- The builder
-
setAcceleratorDurations
public Race.State.Builder setAcceleratorDurations(Property<AcceleratorDuration>[] acceleratorDurations) Add an array of accelerator durations- Parameters:
acceleratorDurations- The accelerator durations. Duration during which the accelerator pedal has been pressed more than the given percentage.- Returns:
- The builder
-
addAcceleratorDuration
Add a single accelerator duration- Parameters:
acceleratorDuration- The accelerator duration. Duration during which the accelerator pedal has been pressed more than the given percentage.- Returns:
- The builder
-