package com.mogo.v2x.event

import com.mogo.v2x.data.*
import roadwork.Road.RW_PB

sealed class V2XEvent {

    /**
     * 长链-路口碰撞预警、盲区预警等通用Bean
     */
    class ForwardsWarning(val type: Int = 404000, val data: V2XAdvanceWarning): V2XEvent() {
        override fun toString(): String {
            return "ForwardsWarning(type=$type, data=$data)"
        }
    }

    /**
     * 长链-最优推荐线种
     */
    class OptimalRoute(val type: Int = 402000, val data: V2XOptimalRoute): V2XEvent() {
        override fun toString(): String {
            return "OptimalRoute(type=$type, data=$data)"
        }
    }

    /**
     * 长链-预警目标物
     */
    class Warning(val type: Int = 401018, val data: V2XWarningTarget): V2XEvent() {
        override fun toString(): String {
            return "Warning(type=$type, data=$data)"
        }
    }

    /**
     * 长链-道路事件
     */
    class Road(val type: Int = 401012, val data: V2XMarkerCardResult): V2XEvent() {
        override fun toString(): String {
            return "Road(type=$type, data=$data)"
        }
    }

    /**
     * 长链-道路事件云识别
     */
    class RoadAI(val type: Int = 503000, val data: RW_PB): V2XEvent() {

        override fun toString(): String {
            return "RoadAI(type=$type, data=$data)"
        }
    }


    /**
     * 短链-道路标记事件
     */
    class Marker(val data: V2XMarkerResponse): V2XEvent() {

        override fun toString(): String {
            return "Marker(data=$data)"
        }
    }
}
