# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: communication_command.proto, message_info.proto, control.proto, navigation.proto, vehicle_state.proto, local_path.proto, sphere.proto
# plugin: python-betterproto
from dataclasses import dataclass
from typing import List, Optional

import betterproto


class MessageInfoModuleNameValue(betterproto.Enum):
    unknown = 0
    msg_converter = 512
    communication_utilities = 1024
    copycat = 11000
    local_roadnet = 12000
    motion_control = 12288
    undefined = -1


class MessageInfoTopicNameValue(betterproto.Enum):
    unknown = 0
    vehicle_state = 1024
    navigation = 2048
    local_path = 10240
    copycat_path = 11000
    control = 12288
    control_limits = 12289
    control_sphere = 12290
    undefined = -1


class ControlModeValue(betterproto.Enum):
    unknown = 0
    autonomous = 1
    standby = 2


class ControlDirectionValue(betterproto.Enum):
    unknown = 0
    forward = 1
    backward = -1
    neutral = 1024


class VehicleStateModeEnum(betterproto.Enum):
    unknown = 0
    autonomous = 1
    manual_driving = 2
    remote_controller = 3
    undefined = -1


class VehicleStateGearMode(betterproto.Enum):
    unknown = 0
    N = 1
    D = 2
    R = 3
    P = 4
    spin = 5
    r_spin = 6
    halt = 1024
    undefined = -1


class LocalPathDirectionValue(betterproto.Enum):
    unknown = 0
    forward = 1
    backward = -1


@dataclass
class CommunicationCommand(betterproto.Message):
    command: "CommunicationCommandCommand" = betterproto.message_field(1)
    response: "CommunicationCommandResponse" = betterproto.message_field(2)


@dataclass
class CommunicationCommandMarkers(betterproto.Message):
    ecu_send_on: Optional[bool] = betterproto.message_field(
        1, wraps=betterproto.TYPE_BOOL
    )
    auto_enable: Optional[bool] = betterproto.message_field(
        2, wraps=betterproto.TYPE_BOOL
    )
    steer_enable: Optional[bool] = betterproto.message_field(
        3, wraps=betterproto.TYPE_BOOL
    )
    speed_enable: Optional[bool] = betterproto.message_field(
        4, wraps=betterproto.TYPE_BOOL
    )
    gear_enable: Optional[bool] = betterproto.message_field(
        5, wraps=betterproto.TYPE_BOOL
    )
    throttle_enable: Optional[bool] = betterproto.message_field(
        6, wraps=betterproto.TYPE_BOOL
    )
    brake_enable: Optional[bool] = betterproto.message_field(
        7, wraps=betterproto.TYPE_BOOL
    )
    park_enable: Optional[bool] = betterproto.message_field(
        8, wraps=betterproto.TYPE_BOOL
    )


@dataclass
class CommunicationCommandCommand(betterproto.Message):
    markers: "CommunicationCommandMarkers" = betterproto.message_field(1)


@dataclass
class CommunicationCommandResponse(betterproto.Message):
    markers: "CommunicationCommandMarkers" = betterproto.message_field(1)


@dataclass
class MessageInfo(betterproto.Message):
    module_name: "MessageInfoModuleNameValue" = betterproto.enum_field(1)
    topic_name: "MessageInfoTopicNameValue" = betterproto.enum_field(2)
    count: Optional[int] = betterproto.message_field(3, wraps=betterproto.TYPE_INT64)
    # timestamp is the time when the message is sent for example, if you use ROS,
    # it is the time when the message is published so you should fill the
    # timestamp just before you publish the message
    timestamp: Optional[int] = betterproto.message_field(
        4, wraps=betterproto.TYPE_INT64
    )
    # arrive_time is the time when you get the message for example, if you use
    # ROS, it is the time when the message is received so you should fill the
    # arrive_time just after you receive the message
    arrive_time: Optional[int] = betterproto.message_field(
        5, wraps=betterproto.TYPE_INT64
    )


@dataclass
class MessageInfoModuleName(betterproto.Message):
    pass


@dataclass
class MessageInfoTopicName(betterproto.Message):
    pass


@dataclass
class Header(betterproto.Message):
    info: "MessageInfo" = betterproto.message_field(1)
    sources: List["MessageInfo"] = betterproto.message_field(2)


@dataclass
class Control(betterproto.Message):
    header: "Header" = betterproto.message_field(1)
    mode: "ControlModeValue" = betterproto.enum_field(2)
    direction: List["ControlDirectionValue"] = betterproto.enum_field(3)
    k: List[float] = betterproto.double_field(4)
    kv: List[float] = betterproto.double_field(5)
    v: List[float] = betterproto.double_field(6)
    acc: List[float] = betterproto.double_field(7)
    throttle: List[float] = betterproto.double_field(8)
    brake: List[float] = betterproto.double_field(9)
    priority: "ControlPriority" = betterproto.message_field(10)


@dataclass
class ControlMode(betterproto.Message):
    pass


@dataclass
class ControlDirection(betterproto.Message):
    pass


@dataclass
class ControlPriority(betterproto.Message):
    mode: Optional[int] = betterproto.message_field(1, wraps=betterproto.TYPE_INT32)
    direction: Optional[int] = betterproto.message_field(
        2, wraps=betterproto.TYPE_INT32
    )
    k: Optional[int] = betterproto.message_field(3, wraps=betterproto.TYPE_INT32)
    kv: Optional[int] = betterproto.message_field(4, wraps=betterproto.TYPE_INT32)
    v: Optional[int] = betterproto.message_field(5, wraps=betterproto.TYPE_INT32)
    acc: Optional[int] = betterproto.message_field(6, wraps=betterproto.TYPE_INT32)
    throttle: Optional[int] = betterproto.message_field(7, wraps=betterproto.TYPE_INT32)
    brake: Optional[int] = betterproto.message_field(8, wraps=betterproto.TYPE_INT32)


@dataclass
class ControlLimits(betterproto.Message):
    header: "Header" = betterproto.message_field(1)
    v_max: Optional[float] = betterproto.message_field(2, wraps=betterproto.TYPE_DOUBLE)
    terminal_speed: Optional[float] = betterproto.message_field(
        3, wraps=betterproto.TYPE_DOUBLE
    )
    override_velocity_profile_v: List[float] = betterproto.double_field(11)
    override_velocity_profile_s: List[float] = betterproto.double_field(12)


@dataclass
class Navigation(betterproto.Message):
    header: "Header" = betterproto.message_field(1)
    position: "NavigationPosition" = betterproto.message_field(2)
    orientation: "NavigationOrientation" = betterproto.message_field(3)
    velocity: "NavigationVelocity" = betterproto.message_field(4)
    angular_velocity: "NavigationAngularVelocity" = betterproto.message_field(5)
    acceleration: "NavigationAcceleration" = betterproto.message_field(6)
    angular_acceleration: "NavigationAngularAcceleration" = betterproto.message_field(7)


@dataclass
class NavigationPosition(betterproto.Message):
    header: "Header" = betterproto.message_field(1)
    lat: Optional[float] = betterproto.message_field(2, wraps=betterproto.TYPE_DOUBLE)
    lon: Optional[float] = betterproto.message_field(3, wraps=betterproto.TYPE_DOUBLE)
    alt: Optional[float] = betterproto.message_field(4, wraps=betterproto.TYPE_DOUBLE)


@dataclass
class NavigationOrientation(betterproto.Message):
    header: "Header" = betterproto.message_field(1)
    roll: Optional[float] = betterproto.message_field(2, wraps=betterproto.TYPE_DOUBLE)
    pitch: Optional[float] = betterproto.message_field(3, wraps=betterproto.TYPE_DOUBLE)
    yaw: Optional[float] = betterproto.message_field(4, wraps=betterproto.TYPE_DOUBLE)


@dataclass
class NavigationVelocity(betterproto.Message):
    header: "Header" = betterproto.message_field(1)
    e: Optional[float] = betterproto.message_field(2, wraps=betterproto.TYPE_DOUBLE)
    n: Optional[float] = betterproto.message_field(3, wraps=betterproto.TYPE_DOUBLE)
    u: Optional[float] = betterproto.message_field(4, wraps=betterproto.TYPE_DOUBLE)
    x: Optional[float] = betterproto.message_field(5, wraps=betterproto.TYPE_DOUBLE)
    y: Optional[float] = betterproto.message_field(6, wraps=betterproto.TYPE_DOUBLE)
    z: Optional[float] = betterproto.message_field(7, wraps=betterproto.TYPE_DOUBLE)


@dataclass
class NavigationAngularVelocity(betterproto.Message):
    header: "Header" = betterproto.message_field(1)
    e: Optional[float] = betterproto.message_field(2, wraps=betterproto.TYPE_DOUBLE)
    n: Optional[float] = betterproto.message_field(3, wraps=betterproto.TYPE_DOUBLE)
    u: Optional[float] = betterproto.message_field(4, wraps=betterproto.TYPE_DOUBLE)
    x: Optional[float] = betterproto.message_field(5, wraps=betterproto.TYPE_DOUBLE)
    y: Optional[float] = betterproto.message_field(6, wraps=betterproto.TYPE_DOUBLE)
    z: Optional[float] = betterproto.message_field(7, wraps=betterproto.TYPE_DOUBLE)


@dataclass
class NavigationAcceleration(betterproto.Message):
    header: "Header" = betterproto.message_field(1)
    e: Optional[float] = betterproto.message_field(2, wraps=betterproto.TYPE_DOUBLE)
    n: Optional[float] = betterproto.message_field(3, wraps=betterproto.TYPE_DOUBLE)
    u: Optional[float] = betterproto.message_field(4, wraps=betterproto.TYPE_DOUBLE)
    x: Optional[float] = betterproto.message_field(5, wraps=betterproto.TYPE_DOUBLE)
    y: Optional[float] = betterproto.message_field(6, wraps=betterproto.TYPE_DOUBLE)
    z: Optional[float] = betterproto.message_field(7, wraps=betterproto.TYPE_DOUBLE)


@dataclass
class NavigationAngularAcceleration(betterproto.Message):
    header: "Header" = betterproto.message_field(1)
    e: Optional[float] = betterproto.message_field(2, wraps=betterproto.TYPE_DOUBLE)
    n: Optional[float] = betterproto.message_field(3, wraps=betterproto.TYPE_DOUBLE)
    u: Optional[float] = betterproto.message_field(4, wraps=betterproto.TYPE_DOUBLE)
    x: Optional[float] = betterproto.message_field(5, wraps=betterproto.TYPE_DOUBLE)
    y: Optional[float] = betterproto.message_field(6, wraps=betterproto.TYPE_DOUBLE)
    z: Optional[float] = betterproto.message_field(7, wraps=betterproto.TYPE_DOUBLE)


@dataclass
class NavigationPath(betterproto.Message):
    header: "Header" = betterproto.message_field(1)
    points: List["Navigation"] = betterproto.message_field(2)


@dataclass
class VehicleState(betterproto.Message):
    header: "Header" = betterproto.message_field(1)
    mode: "VehicleStateMode" = betterproto.message_field(2)
    driver_operation: "VehicleStateDriverOperation" = betterproto.message_field(3)
    park: Optional[bool] = betterproto.message_field(4, wraps=betterproto.TYPE_BOOL)
    angle: List[float] = betterproto.double_field(5)
    angle_velocity: List[float] = betterproto.double_field(6)
    v: List[float] = betterproto.double_field(7)
    acc: List[float] = betterproto.double_field(8)
    throttle: List[float] = betterproto.double_field(9)
    brake: List[float] = betterproto.double_field(10)
    errors: List[str] = betterproto.string_field(11)
    gear: List["VehicleStateGear"] = betterproto.message_field(12)
    engine: List["VehicleStateEngine"] = betterproto.message_field(13)
    battery: List["VehicleStateBattery"] = betterproto.message_field(14)
    steer: List[float] = betterproto.double_field(15)
    steer_speed: List[float] = betterproto.double_field(16)
    steer_torque: List[float] = betterproto.double_field(17)
    k: List[float] = betterproto.double_field(18)


@dataclass
class VehicleStateMode(betterproto.Message):
    vehicle: "VehicleStateModeEnum" = betterproto.enum_field(1)
    steer: "VehicleStateModeEnum" = betterproto.enum_field(2)
    speed: "VehicleStateModeEnum" = betterproto.enum_field(3)
    gear: "VehicleStateModeEnum" = betterproto.enum_field(4)
    throttle: "VehicleStateModeEnum" = betterproto.enum_field(5)
    brake: "VehicleStateModeEnum" = betterproto.enum_field(6)
    park: "VehicleStateModeEnum" = betterproto.enum_field(7)


@dataclass
class VehicleStateGear(betterproto.Message):
    mode: "VehicleStateGearMode" = betterproto.enum_field(1)
    selection: Optional[int] = betterproto.message_field(
        2, wraps=betterproto.TYPE_INT32
    )
    selection_ratio: Optional[float] = betterproto.message_field(
        3, wraps=betterproto.TYPE_DOUBLE
    )
    shifting: Optional[bool] = betterproto.message_field(4, wraps=betterproto.TYPE_BOOL)


@dataclass
class VehicleStateDriverOperation(betterproto.Message):
    steer: Optional[float] = betterproto.message_field(1, wraps=betterproto.TYPE_DOUBLE)
    steer_torque: Optional[float] = betterproto.message_field(
        2, wraps=betterproto.TYPE_DOUBLE
    )
    steer_speed: Optional[float] = betterproto.message_field(
        3, wraps=betterproto.TYPE_DOUBLE
    )
    v: Optional[float] = betterproto.message_field(4, wraps=betterproto.TYPE_DOUBLE)
    acc: Optional[float] = betterproto.message_field(5, wraps=betterproto.TYPE_DOUBLE)
    throttle: Optional[float] = betterproto.message_field(
        6, wraps=betterproto.TYPE_DOUBLE
    )
    brake: Optional[float] = betterproto.message_field(7, wraps=betterproto.TYPE_DOUBLE)
    gear: "VehicleStateGear" = betterproto.message_field(8)
    throttle_pedal: Optional[float] = betterproto.message_field(
        9, wraps=betterproto.TYPE_DOUBLE
    )
    brake_pedal: Optional[float] = betterproto.message_field(
        10, wraps=betterproto.TYPE_DOUBLE
    )


@dataclass
class VehicleStateEngine(betterproto.Message):
    rpm: Optional[float] = betterproto.message_field(1, wraps=betterproto.TYPE_DOUBLE)
    rpm_demand: Optional[float] = betterproto.message_field(
        2, wraps=betterproto.TYPE_DOUBLE
    )
    torque: Optional[float] = betterproto.message_field(
        3, wraps=betterproto.TYPE_DOUBLE
    )
    torque_demand: Optional[float] = betterproto.message_field(
        4, wraps=betterproto.TYPE_DOUBLE
    )
    load: Optional[float] = betterproto.message_field(5, wraps=betterproto.TYPE_DOUBLE)


@dataclass
class VehicleStateBattery(betterproto.Message):
    voltage: Optional[float] = betterproto.message_field(
        1, wraps=betterproto.TYPE_DOUBLE
    )
    current: Optional[float] = betterproto.message_field(
        2, wraps=betterproto.TYPE_DOUBLE
    )
    power: Optional[float] = betterproto.message_field(3, wraps=betterproto.TYPE_DOUBLE)
    temperature: Optional[float] = betterproto.message_field(
        4, wraps=betterproto.TYPE_DOUBLE
    )
    soc: Optional[float] = betterproto.message_field(5, wraps=betterproto.TYPE_DOUBLE)
    remain_capacity: Optional[float] = betterproto.message_field(
        6, wraps=betterproto.TYPE_DOUBLE
    )


@dataclass
class LocalPath(betterproto.Message):
    header: "Header" = betterproto.message_field(1)
    direction: "LocalPathDirectionValue" = betterproto.enum_field(2)
    points: List["LocalPathPoint"] = betterproto.message_field(3)
    navigations: List["Navigation"] = betterproto.message_field(4)
    vehicle_states: List["VehicleState"] = betterproto.message_field(5)
    global_reference_distance: Optional[float] = betterproto.message_field(
        6, wraps=betterproto.TYPE_DOUBLE
    )


@dataclass
class LocalPathDirection(betterproto.Message):
    pass


@dataclass
class LocalPathPoint(betterproto.Message):
    lat: Optional[float] = betterproto.message_field(1, wraps=betterproto.TYPE_DOUBLE)
    lon: Optional[float] = betterproto.message_field(2, wraps=betterproto.TYPE_DOUBLE)
    alt: Optional[float] = betterproto.message_field(3, wraps=betterproto.TYPE_DOUBLE)


@dataclass
class Sphere(betterproto.Message):
    header: "Header" = betterproto.message_field(1)
    data: List["SphereRaw"] = betterproto.message_field(2)


@dataclass
class SphereRaw(betterproto.Message):
    """
    message Type {    enum Enum {      unknown = 0;      int64 = 1;
    float64 = 2;      int64_array = 3;      float64_array = 4;    }  }
    """

    name: Optional[str] = betterproto.message_field(1, wraps=betterproto.TYPE_STRING)
    int64_value: Optional[int] = betterproto.message_field(
        2, wraps=betterproto.TYPE_INT64
    )
    float64_value: Optional[float] = betterproto.message_field(
        3, wraps=betterproto.TYPE_DOUBLE
    )
    int64_array: List[int] = betterproto.int64_field(4)
    float64_array: List[float] = betterproto.double_field(5)
