syntax = "proto2";

package commonroad;

import "util.proto";

message TrafficLightStateEnum {
    enum TrafficLightState {
        RED = 0;
        RED_YELLOW = 1;
        GREEN = 2;
        YELLOW = 3;
        INACTIVE = 4;
    }
}

message TrafficLightDirectionEnum {
    enum TrafficLightDirection {
        RIGHT = 0;
        STRAIGHT = 1;
        LEFT = 2;
        LEFT_STRAIGHT = 3;
        STRAIGHT_RIGHT = 4;
        LEFT_RIGHT = 5;
        ALL = 6;
    }
}

message CycleElement {
    required uint32 duration = 1;
    required TrafficLightStateEnum.TrafficLightState color = 2;
}

message TrafficLight {
    required uint32 traffic_light_id = 1;
    repeated CycleElement cycle_elements = 2;
    optional Point position = 3;
    optional uint32 time_offset = 4;
    optional TrafficLightDirectionEnum.TrafficLightDirection direction = 5;
    optional bool active = 6;
}