library.EcuAdditionalVamData.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of doip-sim-ecu-dsl Show documentation
Show all versions of doip-sim-ecu-dsl Show documentation
This is a kotlin based domain specific language (dsl), to quickly and intuitively write custom DoIP ECU simulations.
package library
data class EcuAdditionalVamData(
val eid: EID,
val gid: GID? = null,
val vin: VIN? = null,
) {
fun toVam(ecuConfig: EcuConfig, entityConfig: DoipEntityConfig): DoipUdpVehicleAnnouncementMessage =
DoipUdpVehicleAnnouncementMessage(
eid = this.eid,
gid = this.gid ?: entityConfig.gid,
vin = this.vin ?: entityConfig.vin,
logicalAddress = ecuConfig.physicalAddress,
)
}