com.geotab.model.entity.device.GoCurveAuxiliary Maven / Gradle / Ivy
package com.geotab.model.entity.device;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.geotab.model.CustomParameter;
import com.geotab.model.entity.enginetype.EngineType;
import com.geotab.model.entity.group.Group;
import com.geotab.model.entity.worktime.WorkTime;
import com.geotab.model.enumeration.DevicePlan;
import com.geotab.model.enumeration.DeviceType;
import com.geotab.model.enumeration.GoTalkLanguage;
import com.geotab.model.enumeration.HosOption;
import com.geotab.util.DeviceDefaultsUtil;
import java.time.Duration;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
/**
* Device that supports curve logging and auxiliaries. Additional properties can be seen in {@link
* GoCurve}.
*/
@NoArgsConstructor
@Getter
@Setter
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public abstract class GoCurveAuxiliary extends GoCurve implements DigitalAuxiliariesAware {
/**
* An array of the auxiliary warning speeds for the vehicle. The auxiliary is triggered when the
* speed is greater than or equal to this value. Maximum length [8] Default [0,0,0,0,0,0,0,0].
*/
protected double[] auxWarningSpeed;
/**
* Toggle to enable auxiliary warnings.
*
* Maximum length [8] Default [false,false,false,false,false,false,false,false].
*/
protected boolean[] enableAuxWarning;
/**
* Toggle to enable control external relay value for the vehicle. Default [false].
*/
protected boolean enableControlExternalRelay;
/**
* The option which controls how long any attached external devices (Garmin, Iridium, HOS, RFID,
* RS232, CAN, and USB) are kept on after the vehicle is turned off in minutes. Default [0].
*/
protected int externalDeviceShutDownDelay;
/**
* It is used to define the delay before the driver identification reminder is sent out if the
* driver key has not been not swiped. The maximum value of this property is 255. When it is less
* or equal to 180, it indicates the number of seconds of the delay. When it is greater than 180,
* the delay increases 30 seconds for every increment of one of this property. For example, 180
* indicates 180 seconds, 181 indicates 210 seconds, and 182 indicates 240 seconds. Maximum [255]
* Default [30].
*/
protected int immobilizeArming;
/**
* Value mainly used for enable or disable driver identification reminder. If it is used in
* conjunction with vehicle relay circuits, it can force the driver to swipe the driver key before
* starting the vehicle. Default [false].
*/
protected boolean immobilizeUnit;
/**
* An array of the IsAuxIgnTriggers for the vehicle.
*/
@JsonProperty("isAuxIgnTrigger")
protected boolean[] isAuxIgnTrigger;
/**
* An array of boolean flags indicating if a corresponding Aux signal should be inverted on
* importing the device data.
*
*
Maximum length [8] Default [false,false,false,false,false,false,false,false].
*/
@JsonProperty("isAuxInverted")
protected boolean[] isAuxInverted;
public GoCurveAuxiliary(String id, String name, Long version, DeviceType deviceType,
LocalDateTime ignoreDownloadsUntil, String serialNumber, Integer productId,
String vehicleIdentificationNumber, String licensePlate, String licenseState,
Short major, Short minor, Duration timeToDownload, WorkTime workTime,
List groups, List devicePlans, boolean pinDevice,
String timeZoneId, Float maxSecondsBetweenLogs,
LocalDateTime activeFrom, LocalDateTime activeTo, String comment,
DeviceFlags deviceFlags, List autoGroups, List customParameters,
boolean disableBuzzer, boolean enableBeepOnIdle, boolean enableMustReprogram,
boolean enableSpeedWarning, EngineType engineType, String engineVehicleIdentificationNumber,
boolean ensureHotStart, Integer gpsOffDelay, Integer idleMinutes, Boolean isSpeedIndicator,
Double minAccidentSpeed, Short parameterVersion, Double speedingOff,
Double speedingOn, GoTalkLanguage goTalkLanguage,
Double fuelTankCapacity, Boolean disableSleeperBerth,
HosOption autoHos, Short parameterVersionOnDevice,
Integer accelerationWarningThreshold, Integer accelerometerThresholdWarningFactor,
Integer brakingWarningThreshold, Integer corneringWarningThreshold,
boolean enableBeepOnDangerousDriving, boolean enableBeepOnRpm,
Integer engineHourOffset, boolean isActiveTrackingEnabled, boolean isDriverSeatbeltWarningOn,
boolean isPassengerSeatbeltWarningOn, boolean isReverseDetectOn,
boolean isIoxConnectionEnabled,
Float odometerFactor, Double odometerOffset, Integer rpmValue,
Double seatbeltWarningSpeed, double[] auxWarningSpeed, boolean[] enableAuxWarning,
boolean enableControlExternalRelay, int externalDeviceShutDownDelay, int immobilizeArming,
boolean immobilizeUnit, boolean[] isAuxIgnTrigger, boolean[] isAuxInverted,
Map customFeatures) {
super(id, name, version, deviceType, ignoreDownloadsUntil, serialNumber, productId,
vehicleIdentificationNumber, licensePlate, licenseState, major, minor, timeToDownload,
workTime, groups, devicePlans, pinDevice, timeZoneId,
maxSecondsBetweenLogs, activeFrom, activeTo, comment, deviceFlags, autoGroups,
customParameters, disableBuzzer, enableBeepOnIdle, enableMustReprogram, enableSpeedWarning,
engineType, engineVehicleIdentificationNumber, ensureHotStart, gpsOffDelay,
idleMinutes, isSpeedIndicator, minAccidentSpeed, parameterVersion, speedingOff, speedingOn,
goTalkLanguage, fuelTankCapacity, disableSleeperBerth, autoHos, parameterVersionOnDevice,
accelerationWarningThreshold, accelerometerThresholdWarningFactor, brakingWarningThreshold,
corneringWarningThreshold, enableBeepOnDangerousDriving, enableBeepOnRpm, engineHourOffset,
isActiveTrackingEnabled, isDriverSeatbeltWarningOn, isPassengerSeatbeltWarningOn,
isReverseDetectOn, isIoxConnectionEnabled, odometerFactor, odometerOffset, rpmValue,
seatbeltWarningSpeed, customFeatures);
this.auxWarningSpeed = checkAndPadAuxArray(auxWarningSpeed);
this.enableAuxWarning = checkAndPadAuxArray(enableAuxWarning);
this.enableControlExternalRelay = enableControlExternalRelay;
this.externalDeviceShutDownDelay = externalDeviceShutDownDelay;
this.immobilizeArming = immobilizeArming;
this.immobilizeUnit = immobilizeUnit;
this.isAuxIgnTrigger = checkAndPadAuxIgnArray(isAuxIgnTrigger);
this.isAuxInverted = checkAndPadAuxArray(isAuxInverted);
}
public void setAuxWarningSpeed(double[] auxWarningSpeed) {
this.auxWarningSpeed = checkAndPadAuxArray(auxWarningSpeed);
}
public void setEnableAuxWarning(boolean[] enableAuxWarning) {
this.enableAuxWarning = checkAndPadAuxArray(enableAuxWarning);
}
public void setAuxIgnTrigger(boolean[] isAuxIgnTrigger) {
this.isAuxIgnTrigger = checkAndPadAuxIgnArray(isAuxIgnTrigger);
}
public void setIsAuxInverted(boolean[] isAuxInverted) {
this.isAuxInverted = checkAndPadAuxArray(isAuxInverted);
}
@Override
public void populateDefaults() {
super.populateDefaults();
DeviceDefaultsUtil.addAuxiliaryDefaults(this);
}
}