diff --git a/common/src/jvmMain/kotlin/com/monta/ocpp/emulator/vehicle/model/EnodeVehicle.kt b/common/src/jvmMain/kotlin/com/monta/ocpp/emulator/vehicle/model/EnodeVehicle.kt index 6ba8c2f..ce8166a 100644 --- a/common/src/jvmMain/kotlin/com/monta/ocpp/emulator/vehicle/model/EnodeVehicle.kt +++ b/common/src/jvmMain/kotlin/com/monta/ocpp/emulator/vehicle/model/EnodeVehicle.kt @@ -4,17 +4,21 @@ import java.time.Instant data class EnodeVehicle( val id: String, - val isReachable: Boolean, + val userId: String, + val vendor: String, + val isReachable: Boolean?, val lastSeen: Instant?, val chargeState: ChargeState?, val information: Information?, val odometer: Odometer?, - val location: Location? + val location: Location?, + val scopes: List, + val locationId: String? ) { data class Information( - val brand: String, - val model: String, - val year: Int, + val brand: String?, + val model: String?, + val year: Int?, val vin: String? ) @@ -34,7 +38,8 @@ data class EnodeVehicle( val chargeTimeRemaining: Int?, val isFullyCharged: Boolean?, val lastUpdated: Instant?, - val powerDeliveryState: String + val powerDeliveryState: String, + val maxCurrent: Int? ) data class Location( diff --git a/common/src/jvmMain/kotlin/com/monta/ocpp/emulator/vehicle/view/VehicleExtensions.kt b/common/src/jvmMain/kotlin/com/monta/ocpp/emulator/vehicle/view/VehicleExtensions.kt index 970788b..76212a7 100644 --- a/common/src/jvmMain/kotlin/com/monta/ocpp/emulator/vehicle/view/VehicleExtensions.kt +++ b/common/src/jvmMain/kotlin/com/monta/ocpp/emulator/vehicle/view/VehicleExtensions.kt @@ -54,6 +54,8 @@ internal fun defaultVehicle( return EnodeVehicle( id = externalVehicleId, + userId = "montaTestUser", + vendor = "monta", isReachable = true, lastSeen = now, chargeState = EnodeVehicle.ChargeState( @@ -67,7 +69,8 @@ internal fun defaultVehicle( chargeTimeRemaining = 10, isFullyCharged = false, lastUpdated = now, - powerDeliveryState = "PLUGGED_IN:CHARGING" + powerDeliveryState = "PLUGGED_IN:CHARGING", + maxCurrent = 32 ), information = EnodeVehicle.Information( brand = "Monta", @@ -83,6 +86,8 @@ internal fun defaultVehicle( latitude = 34.165152, longitude = -118.281788, lastUpdated = now - ) + ), + locationId = null, + scopes = emptyList() ) } diff --git a/v16/src/jvmMain/kotlin/com/monta/ocpp/emulator/chargepoint/entity/ChargePoint.kt b/v16/src/jvmMain/kotlin/com/monta/ocpp/emulator/chargepoint/entity/ChargePoint.kt index ea38622..394013c 100644 --- a/v16/src/jvmMain/kotlin/com/monta/ocpp/emulator/chargepoint/entity/ChargePoint.kt +++ b/v16/src/jvmMain/kotlin/com/monta/ocpp/emulator/chargepoint/entity/ChargePoint.kt @@ -237,6 +237,7 @@ class ChargePointDAO( "SmartChargingEnabled" -> displayLines[0] = if (request.data == "true") "Smart Charging" else "Charging" "StartTime" -> displayLines[2] = "Start at: ${request.data}" "EndTime" -> displayLines[3] = "Will be finished at: ${request.data}" + "SoC" -> displayLines[4] = "Battery at: ${request.data}%" "ClearDisplay" -> displayLines = List(5) { "" }.toMutableList() else -> return false }