/*
 * Copyright (C) 2021 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

syntax = "proto3";

package android.hardware.automotive.vehicle.proto;

import "android/hardware/automotive/vehicle/VehiclePropertyAccess.proto";

/* Must be in sync with VehicleAreaConfig.aidl. */
message VehicleAreaConfig {
    /* Area id is ignored for VehiclePropertyGroup:GLOBAL properties. */
    int32 area_id = 1;

    /* If the property has @data_enum, leave the range to zero.
     *
     * Range will be ignored in the following cases:
     *    - The VehiclePropertyType is not INT32, INT64 or FLOAT.
     *    - Both of min value and max value are zero. */
    int32 min_int32_value = 2;
    int32 max_int32_value = 3;

    int64 min_int64_value = 4;
    int64 max_int64_value = 5;

    float min_float_value = 6;
    float max_float_value = 7;

    /**
     * If the property has a @data_enum, then it is possible to specify a supported subset of the
     * @data_enum. If the property has a @data_enum and supported_enum_values is null, then it is
     * assumed all @data_enum values are supported unless specified through another mechanism.
     */
    repeated int64 supported_enum_values = 8;
    VehiclePropertyAccess access = 9;
    bool support_variable_update_rate = 10;
};
