【IVI】car_service 命令行工具

news2025/1/18 7:34:03

【IVI】car_service 命令行工具

  • 1、car_service服务执行
  • 2、CarShellCommand命令执行
    • 2.1 cmd car_service day-night-mode day设置白天模式
    • 2.2 cmd car_service inject-vhal-event vhal信号事件
      • 2.2.1 VehiclePropertyIds
      • 2.2.2 模拟驾驶事件
    • 2.3 cmd car_service inject-error-event 注入错误vhal信号事件
    • 2.4 cmd car_service get-carpropertyconfig 获取车辆CarPropertyConfigs
    • 2.5 cmd car_service get-property-value 获取车辆属性值
    • 2.6 cmd car_service inject-key 注入KeyEvent事件
    • 2.7 cmd car_service inject-rotary 模拟旋控器事件

Android framework服务命令行工具框架 - Android13


1、car_service服务执行

Android framework服务命令行工具框架 - Android13
【IVI】CarService启动
bindService绑定的car_service服务ServiceManager.addService("car_service", mICarImpl);也可通过Activity获取执行服务命令 adb shell dumpsys activity service com.android.car

Automotive 虚拟机(Volvo System Image)API 30如下:

C:\Users\Administrator\Desktop>adb shell cmd car_service
Car service commands:
        -h
          Print this help text.
        day-night-mode [day|night|sensor]
          Force into day/night mode or restore to auto.
        inject-vhal-event property [zone] data(can be comma separated list) [-t delay_time_seconds]
          Inject a vehicle property for testing.
          delay_time_seconds: the event timestamp is increased by certain second.
          If not specified, it will be 0.
        inject-error-event property zone errorCode
          Inject an error event from VHAL for testing.
        enable-uxr true|false
          Enable/Disable UX restrictions and App blocking.
        garage-mode [on|off|query|reboot]
          Force into or out of garage mode, or check status.
          With 'reboot', enter garage mode, then reboot when it completes.
        get-do-activities pkgname
          Get Distraction Optimized activities in given package.
        get-carpropertyconfig [propertyId]
          Get a CarPropertyConfig by Id in Hex or list all CarPropertyConfigs
        get-property-value [propertyId] [areaId]
          Get a vehicle property value by property id in Hex and areaId
          or list all property values for all areaId
        suspend [--skip-garagemode] [--wakeup-after RESUME_DELAY]
          Suspend the system to Deep Sleep.
          --skip-garagemode skips Garage Mode before going into sleep.
          --wakeup-after RESUME_DELAY wakes up the device RESUME_DELAY seconds after suspend.
        resume
          Wake the system up after a 'suspend.'
        enable-trusted-device true|false
          Enable/Disable Trusted device feature.
        remove-trusted-devices
          Remove all trusted devices for the current foreground user.
        projection-tethering [true|false]
          Whether tethering should be used when creating access point for wireless projection
        --metrics
          When used with dumpsys, only metrics will be in the dumpsys output.
        set-audio-zone-for-uid [zoneid] [uid]
          Maps the audio zoneid to uid.
        start-fixed-activity displayId packageName activityName
          Start an Activity the specified display as fixed mode
        stop-fixed-mode displayId
          Stop fixed Activity mode for the given display. The Activity will not be restarted upon crash.
        enable-feature featureName
          Enable the requested feature. Change will happen after reboot.
          This requires root/su.
        disable-feature featureName
          Disable the requested feature. Change will happen after reboot
          This requires root/su.
        inject-key [-d display] [-t down_delay_ms | -a down|up] key_code
          inject key down and/or up event to car service
          display: 0 for main, 1 for cluster. If not specified, it will be 0.
          down_delay_ms: delay from down to up key event. If not specified,
                         it will be 0
          key_code: int key code defined in android KeyEvent
          If -a isn't specified, both down and up will be injected.
        inject-rotary [-d display] [-i input_type] [-c clockwise]
                      [-dt delta_times_ms]
          inject rotary input event to car service.
          display: 0 for main, 1 for cluster. If not specified, it will be 0.
          input_type: 10 for navigation controller input, 11 for volume
                      controller input. If not specified, it will be 10.
          clockwise: true if the event is clockwise, false if the event is
                     counter-clockwise. If not specified, it will be false.
          delta_times_ms: a list of delta time (current time minus event time)
                          in descending order. If not specified, it will be 0.
        get-initial-user-info <REQ_TYPE> [--hal-only] [--timeout TIMEOUT_MS]
          Calls the Vehicle HAL to get the initial boot info, passing the given
          REQ_TYPE (which could be either FIRST_BOOT, FIRST_BOOT_AFTER_OTA,
          COLD_BOOT, RESUME, or any numeric value that would be passed 'as-is')
          and an optional TIMEOUT_MS to wait for the HAL response (if not set,
          it will use a  default value).
          The --hal-only option only calls HAL, without using CarUserService.
        switch-user <USER_ID> [--hal-only] [--timeout TIMEOUT_MS]
          Switches to user USER_ID using the HAL integration.
          The --hal-only option only calls HAL, without switching the user,
          while the --timeout defines how long to wait for the HAL response.
        remove-user <USER_ID> [--hal-only]
          Removes user with USER_ID using the HAL integration.
          The --hal-only option only calls HAL, without removing the user,
        create-user [--hal-only] [--timeout TIMEOUT_MS] [--type TYPE] [--flags FLAGS] [NAME]
          Creates a new user using the HAL integration.
          The --hal-only uses UserManager to create the user,
          while the --timeout defines how long to wait for the HAL response.
        get-initial-user
          Gets the id of the initial user (or N/A when it's not available)
        set-occupant-zone-for-user [occupantZoneId] [userId]
          Maps the occupant zone id to user id.
        reset-user-in-occupant-zone [occupantZoneId]
          Unmaps the user assigned to occupant zone id.
        get-user-auth-association [--hal-only] [--user USER_ID] TYPE1 [..TYPE_N]
          Gets the N user authentication values for the N types for the given user
          (or current user when not specified).
          By defautt it calls CarUserManager, but using --hal-only will call just UserHalService.
        set-user-auth-association [--hal-only] [--user USER_ID] TYPE1 VALUE1 [..TYPE_N VALUE_N]
          Sets the N user authentication types with the N values for the given user
          (or current user when not specified).
          By defautt it calls CarUserManager, but using --hal-only will call just UserHalService.
          Valid types are: KEY_FOB, CUSTOM_1, CUSTOM_2, CUSTOM_3, CUSTOM_4.
          Valid values are: ASSOCIATE_CURRENT_USER, DISASSOCIATE_CURRENT_USER, DISASSOCIATE_ALL_USERS.
        power-off [--skip-garagemode] [--shutdown]
          Powers off the car.
        telemetry <subcommand>    Telemetry commands.
          Provide -h to see the list of sub-commands.

2、CarShellCommand命令执行

packages/services/Car/car-lib/README.md
packages/services/Car/service/src/com/android/car/CarShellCommand.java
packages/services/Car/service/src/com/android/car/ICarImpl.java

adb shell cmd car_service
在这里插入图片描述

2.1 cmd car_service day-night-mode day设置白天模式

day-night-mode [day|night|sensor]
    Force into day/night mode or restore to auto.

  1. 强制进入白天模式:adb shell cmd car_service day-night-mode day
  2. 恢复到自动模式:adb shell cmd car_service day-night-mode sensor

在这里插入图片描述
packages/services/Car/service/src/com/android/car/CarNightService.java

    /**
     * Sets {@link UiModeManager} to night mode according to the {@link DayNightSensorMode} passed
     * as parameter.
     *
     * @param mode the sensor mode used to set vehicle in night mode
     * @return the current night mode, or {@code -1} on error
     */
    public int forceDayNightMode(@DayNightSensorMode int mode) {
        synchronized (mLock) {
            if (mUiModeManager == null) {
                return -1;
            }
            int resultMode;
            switch (mode) {
                case FORCED_SENSOR_MODE:
                    resultMode = mNightSetting;
                    mForcedMode = FORCED_SENSOR_MODE;
                    break;
                case FORCED_DAY_MODE:
                    resultMode = UiModeManager.MODE_NIGHT_NO;
                    mForcedMode = FORCED_DAY_MODE;
                    break;
                case FORCED_NIGHT_MODE:
                    resultMode = UiModeManager.MODE_NIGHT_YES;
                    mForcedMode = FORCED_NIGHT_MODE;
                    break;
                default:
                    Slogf.e(CarLog.TAG_SENSOR, "Unknown forced day/night mode " + mode);
                    return -1;
            }
            mUiModeManager.setNightMode(resultMode);
            return mUiModeManager.getNightMode();
        }
    }

2.2 cmd car_service inject-vhal-event vhal信号事件

inject-vhal-event property [zone] data(can be comma separated list) [-t delay_time_seconds]
    Inject a vehicle property for testing.
    delay_time_seconds: the event timestamp is increased by certain second.
    If not specified, it will be 0.

packages/services/Car/service/src/com/android/car/hal/VehicleHal.java

    /**
     * Inject a VHAL event
     *
     * @param property the Vehicle property Id as defined in the HAL
     * @param zone the zone that this event services
     * @param value the data value of the event
     * @param delayTime add a certain duration to event timestamp
     */
    public void injectVhalEvent(int property, int zone, String value, int delayTime)
            throws NumberFormatException {
        long timestamp = SystemClock.elapsedRealtimeNanos() + TimeUnit.SECONDS.toNanos(delayTime);
        HalPropValue v = createPropValueForInjecting(mPropValueBuilder, property, zone,
                Arrays.asList(value.split(DATA_DELIMITER)), timestamp);
        if (v == null) {
            return;
        }
        mHandler.post(() -> onPropertyEvent(Lists.newArrayList(v)));
    }

2.2.1 VehiclePropertyIds

packages/services/Car/car-lib-module/api/current.txt
packages/services/Car/car-lib/src/android/car/VehiclePropertyIds.java

VehiclePropertyIdsvalue说明
INFO_VIN286261504; // 0x11100100VIN of vehicle Requires permission: Car.PERMISSION_IDENTIFICATION.
INFO_MAKE286261505; // 0x11100101Manufacturer of vehicle.
PERF_VEHICLE_SPEED291504647; // 0x11600207车辆的速度(以 米/秒 为单位)。当车辆向前行驶时为正,当车辆向后行驶时为负。
PERF_VEHICLE_SPEED_DISPLAY291504648; // 0x11600208用于显示的车辆速度(以 米/秒 为单位)。
PERF_STEERING_ANGLE291504649; // 0x11600209车辆前轮转向角度,单位为度。左边是负数。
PERF_REAR_STEERING_ANGLE291504656; // 0x11600210车辆后轮转向角度,单位为度。左边是负数。
SENSOR_TYPE_GEAR289408000; // 0x11400400表示变速箱档位的当前位置。
  public final class VehiclePropertyIds {
    ctor @Deprecated public VehiclePropertyIds();
    method public static String toString(int);
    field @RequiresPermission("android.car.permission.CAR_DYNAMICS_STATE") public static final int ABS_ACTIVE = 287310858; // 0x1120040a
    field @RequiresPermission("android.car.permission.CAR_POWER") public static final int AP_POWER_BOOTUP_REASON = 289409538; // 0x11400a02
    field @RequiresPermission("android.car.permission.CAR_POWER") public static final int AP_POWER_STATE_REPORT = 289475073; // 0x11410a01
    field @RequiresPermission("android.car.permission.CAR_POWER") public static final int AP_POWER_STATE_REQ = 289475072; // 0x11410a00
    field @RequiresPermission(android.car.Car.PERMISSION_READ_INTERIOR_LIGHTS) public static final int CABIN_LIGHTS_STATE = 289410817; // 0x11400f01
    field @RequiresPermission(android.car.Car.PERMISSION_CONTROL_INTERIOR_LIGHTS) public static final int CABIN_LIGHTS_SWITCH = 289410818; // 0x11400f02
    field @RequiresPermission("android.car.permission.CAR_TIRES") public static final int CRITICALLY_LOW_TIRE_PRESSURE = 392168202; // 0x1760030a
    field @RequiresPermission(android.car.Car.PERMISSION_POWERTRAIN) public static final int CURRENT_GEAR = 289408001; // 0x11400401
    field @RequiresPermission("android.car.permission.CAR_POWER") public static final int DISPLAY_BRIGHTNESS = 289409539; // 0x11400a03
    field @RequiresPermission.Read(@androidx.annotation.RequiresPermission(android.car.Car.PERMISSION_READ_DISPLAY_UNITS)) @RequiresPermission.Write(@androidx.annotation.RequiresPermission(allOf={android.car.Car.PERMISSION_CONTROL_DISPLAY_UNITS, "android.car.permission.CAR_VENDOR_EXTENSION"})) public static final int DISTANCE_DISPLAY_UNITS = 289408512; // 0x11400600
    field @RequiresPermission("android.car.permission.CONTROL_CAR_DOORS") public static final int DOOR_LOCK = 371198722; // 0x16200b02
    field @RequiresPermission("android.car.permission.CONTROL_CAR_DOORS") public static final int DOOR_MOVE = 373295873; // 0x16400b01
    field @RequiresPermission("android.car.permission.CONTROL_CAR_DOORS") public static final int DOOR_POS = 373295872; // 0x16400b00
    field @RequiresPermission(android.car.Car.PERMISSION_CAR_INFO) public static final int ELECTRONIC_TOLL_COLLECTION_CARD_STATUS = 289410874; // 0x11400f3a
    field @RequiresPermission(android.car.Car.PERMISSION_CAR_INFO) public static final int ELECTRONIC_TOLL_COLLECTION_CARD_TYPE = 289410873; // 0x11400f39
    field @RequiresPermission("android.car.permission.CAR_ENGINE_DETAILED") public static final int ENGINE_COOLANT_TEMP = 291504897; // 0x11600301
    field @RequiresPermission("android.car.permission.CAR_ENGINE_DETAILED") public static final int ENGINE_OIL_LEVEL = 289407747; // 0x11400303
    field @RequiresPermission("android.car.permission.CAR_ENGINE_DETAILED") public static final int ENGINE_OIL_TEMP = 291504900; // 0x11600304
    field @RequiresPermission("android.car.permission.CAR_ENGINE_DETAILED") public static final int ENGINE_RPM = 291504901; // 0x11600305
    field @RequiresPermission(android.car.Car.PERMISSION_EXTERIOR_ENVIRONMENT) public static final int ENV_OUTSIDE_TEMPERATURE = 291505923; // 0x11600703
    field @RequiresPermission("android.car.permission.CAR_EPOCH_TIME") public static final int EPOCH_TIME = 290457094; // 0x11500606
    field @RequiresPermission.Read(@androidx.annotation.RequiresPermission(android.car.Car.PERMISSION_READ_DISPLAY_UNITS)) @RequiresPermission.Write(@androidx.annotation.RequiresPermission(allOf={android.car.Car.PERMISSION_CONTROL_DISPLAY_UNITS, "android.car.permission.CAR_VENDOR_EXTENSION"})) public static final int EV_BATTERY_DISPLAY_UNITS = 289408515; // 0x11400603
    field @RequiresPermission(android.car.Car.PERMISSION_ENERGY) public static final int EV_BATTERY_INSTANTANEOUS_CHARGE_RATE = 291504908; // 0x1160030c
    field @RequiresPermission(android.car.Car.PERMISSION_ENERGY) public static final int EV_BATTERY_LEVEL = 291504905; // 0x11600309
    field @RequiresPermission.Read(@androidx.annotation.RequiresPermission(android.car.Car.PERMISSION_ENERGY)) @RequiresPermission.Write(@androidx.annotation.RequiresPermission(android.car.Car.PERMISSION_CONTROL_CAR_ENERGY)) public static final int EV_CHARGE_CURRENT_DRAW_LIMIT = 291508031; // 0x11600f3f
    field @RequiresPermission.Read(@androidx.annotation.RequiresPermission(android.car.Car.PERMISSION_ENERGY)) @RequiresPermission.Write(@androidx.annotation.RequiresPermission(android.car.Car.PERMISSION_CONTROL_CAR_ENERGY)) public static final int EV_CHARGE_PERCENT_LIMIT = 291508032; // 0x11600f40
    field @RequiresPermission(android.car.Car.PERMISSION_ENERGY_PORTS) public static final int EV_CHARGE_PORT_CONNECTED = 287310603; // 0x1120030b
    field @RequiresPermission.Read(@androidx.annotation.RequiresPermission(android.car.Car.PERMISSION_ENERGY_PORTS)) @RequiresPermission.Write(@androidx.annotation.RequiresPermission("android.car.permission.CONTROL_CAR_ENERGY_PORTS")) public static final int EV_CHARGE_PORT_OPEN = 287310602; // 0x1120030a
    field @RequiresPermission.Read(@androidx.annotation.RequiresPermission(android.car.Car.PERMISSION_ENERGY)) public static final int EV_CHARGE_STATE = 289410881; // 0x11400f41
    field @RequiresPermission(android.car.Car.PERMISSION_CONTROL_CAR_ENERGY) public static final int EV_CHARGE_SWITCH = 287313730; // 0x11200f42
    field @RequiresPermission.Read(@androidx.annotation.RequiresPermission(android.car.Car.PERMISSION_ENERGY)) public static final int EV_CHARGE_TIME_REMAINING = 289410883; // 0x11400f43
    field @RequiresPermission.Read(@androidx.annotation.RequiresPermission(android.car.Car.PERMISSION_ENERGY)) public static final int EV_REGENERATIVE_BRAKING_STATE = 289410884; // 0x11400f44
    field @RequiresPermission("android.car.permission.CAR_EXTERIOR_LIGHTS") public static final int FOG_LIGHTS_STATE = 289410562; // 0x11400e02
    field @RequiresPermission("android.car.permission.CONTROL_CAR_EXTERIOR_LIGHTS") public static final int FOG_LIGHTS_SWITCH = 289410578; // 0x11400e12
    field @RequiresPermission("android.car.permission.CAR_EXTERIOR_LIGHTS") public static final int FRONT_FOG_LIGHTS_STATE = 289410875; // 0x11400f3b
    field @RequiresPermission("android.car.permission.CONTROL_CAR_EXTERIOR_LIGHTS") public static final int FRONT_FOG_LIGHTS_SWITCH = 289410876; // 0x11400f3c
    field @RequiresPermission.Read(@androidx.annotation.RequiresPermission(android.car.Car.PERMISSION_READ_DISPLAY_UNITS)) @RequiresPermission.Write(@androidx.annotation.RequiresPermission(allOf={android.car.Car.PERMISSION_CONTROL_DISPLAY_UNITS, "android.car.permission.CAR_VENDOR_EXTENSION"})) public static final int FUEL_CONSUMPTION_UNITS_DISTANCE_OVER_VOLUME = 287311364; // 0x11200604
    field @RequiresPermission.Read(@androidx.annotation.RequiresPermission(android.car.Car.PERMISSION_ENERGY_PORTS)) @RequiresPermission.Write(@androidx.annotation.RequiresPermission("android.car.permission.CONTROL_CAR_ENERGY_PORTS")) public static final int FUEL_DOOR_OPEN = 287310600; // 0x11200308
    field @RequiresPermission(android.car.Car.PERMISSION_ENERGY) public static final int FUEL_LEVEL = 291504903; // 0x11600307
    field @RequiresPermission(android.car.Car.PERMISSION_ENERGY) public static final int FUEL_LEVEL_LOW = 287310853; // 0x11200405
    field @RequiresPermission.Read(@androidx.annotation.RequiresPermission(android.car.Car.PERMISSION_READ_DISPLAY_UNITS)) @RequiresPermission.Write(@androidx.annotation.RequiresPermission(allOf={android.car.Car.PERMISSION_CONTROL_DISPLAY_UNITS, "android.car.permission.CAR_VENDOR_EXTENSION"})) public static final int FUEL_VOLUME_DISPLAY_UNITS = 289408513; // 0x11400601
    field @RequiresPermission(android.car.Car.PERMISSION_POWERTRAIN) public static final int GEAR_SELECTION = 289408000; // 0x11400400
    field @RequiresPermission("android.car.permission.CAR_EXTERIOR_LIGHTS") public static final int HAZARD_LIGHTS_STATE = 289410563; // 0x11400e03
    field @RequiresPermission("android.car.permission.CONTROL_CAR_EXTERIOR_LIGHTS") public static final int HAZARD_LIGHTS_SWITCH = 289410579; // 0x11400e13
    field @RequiresPermission("android.car.permission.CAR_EXTERIOR_LIGHTS") public static final int HEADLIGHTS_STATE = 289410560; // 0x11400e00
    field @RequiresPermission("android.car.permission.CONTROL_CAR_EXTERIOR_LIGHTS") public static final int HEADLIGHTS_SWITCH = 289410576; // 0x11400e10
    field @RequiresPermission("android.car.permission.CAR_EXTERIOR_LIGHTS") public static final int HIGH_BEAM_LIGHTS_STATE = 289410561; // 0x11400e01
    field @RequiresPermission("android.car.permission.CONTROL_CAR_EXTERIOR_LIGHTS") public static final int HIGH_BEAM_LIGHTS_SWITCH = 289410577; // 0x11400e11
    field @RequiresPermission("android.car.permission.CONTROL_CAR_CLIMATE") public static final int HVAC_ACTUAL_FAN_SPEED_RPM = 356517135; // 0x1540050f
    field @RequiresPermission("android.car.permission.CONTROL_CAR_CLIMATE") public static final int HVAC_AC_ON = 354419973; // 0x15200505
    field @RequiresPermission("android.car.permission.CONTROL_CAR_CLIMATE") public static final int HVAC_AUTO_ON = 354419978; // 0x1520050a
    field @RequiresPermission("android.car.permission.CONTROL_CAR_CLIMATE") public static final int HVAC_AUTO_RECIRC_ON = 354419986; // 0x15200512
    field @RequiresPermission("android.car.permission.CONTROL_CAR_CLIMATE") public static final int HVAC_DEFROSTER = 320865540; // 0x13200504
    field @RequiresPermission("android.car.permission.CONTROL_CAR_CLIMATE") public static final int HVAC_DUAL_ON = 354419977; // 0x15200509
    field @RequiresPermission("android.car.permission.CONTROL_CAR_CLIMATE") public static final int HVAC_FAN_DIRECTION = 356517121; // 0x15400501
    field @RequiresPermission("android.car.permission.CONTROL_CAR_CLIMATE") public static final int HVAC_FAN_DIRECTION_AVAILABLE = 356582673; // 0x15410511
    field @RequiresPermission("android.car.permission.CONTROL_CAR_CLIMATE") public static final int HVAC_FAN_SPEED = 356517120; // 0x15400500
    field @RequiresPermission("android.car.permission.CONTROL_CAR_CLIMATE") public static final int HVAC_MAX_AC_ON = 354419974; // 0x15200506
    field @RequiresPermission("android.car.permission.CONTROL_CAR_CLIMATE") public static final int HVAC_MAX_DEFROST_ON = 354419975; // 0x15200507
    field @RequiresPermission("android.car.permission.CONTROL_CAR_CLIMATE") public static final int HVAC_POWER_ON = 354419984; // 0x15200510
    field @RequiresPermission("android.car.permission.CONTROL_CAR_CLIMATE") public static final int HVAC_RECIRC_ON = 354419976; // 0x15200508
    field @RequiresPermission("android.car.permission.CONTROL_CAR_CLIMATE") public static final int HVAC_SEAT_TEMPERATURE = 356517131; // 0x1540050b
    field @RequiresPermission("android.car.permission.CONTROL_CAR_CLIMATE") public static final int HVAC_SEAT_VENTILATION = 356517139; // 0x15400513
    field @RequiresPermission("android.car.permission.CONTROL_CAR_CLIMATE") public static final int HVAC_SIDE_MIRROR_HEAT = 339739916; // 0x1440050c
    field @RequiresPermission("android.car.permission.CONTROL_CAR_CLIMATE") public static final int HVAC_STEERING_WHEEL_HEAT = 289408269; // 0x1140050d
    field @RequiresPermission("android.car.permission.CONTROL_CAR_CLIMATE") public static final int HVAC_TEMPERATURE_CURRENT = 358614274; // 0x15600502
    field @RequiresPermission("android.car.permission.CONTROL_CAR_CLIMATE") public static final int HVAC_TEMPERATURE_DISPLAY_UNITS = 289408270; // 0x1140050e
    field @RequiresPermission("android.car.permission.CONTROL_CAR_CLIMATE") public static final int HVAC_TEMPERATURE_SET = 358614275; // 0x15600503
    field @RequiresPermission("android.car.permission.CONTROL_CAR_CLIMATE") public static final int HVAC_TEMPERATURE_VALUE_SUGGESTION = 291570965; // 0x11610515
    field public static final int HW_KEY_INPUT = 289475088; // 0x11410a10
    field @RequiresPermission(android.car.Car.PERMISSION_POWERTRAIN) public static final int IGNITION_STATE = 289408009; // 0x11400409
    field @RequiresPermission(android.car.Car.PERMISSION_CAR_INFO) public static final int INFO_DRIVER_SEAT = 356516106; // 0x1540010a
    field @RequiresPermission(android.car.Car.PERMISSION_CAR_INFO) public static final int INFO_EV_BATTERY_CAPACITY = 291504390; // 0x11600106
    field @RequiresPermission(android.car.Car.PERMISSION_CAR_INFO) public static final int INFO_EV_CONNECTOR_TYPE = 289472775; // 0x11410107
    field @RequiresPermission(android.car.Car.PERMISSION_CAR_INFO) public static final int INFO_EV_PORT_LOCATION = 289407241; // 0x11400109
    field @RequiresPermission(android.car.Car.PERMISSION_CAR_INFO) public static final int INFO_EXTERIOR_DIMENSIONS = 289472779; // 0x1141010b
    field @RequiresPermission(android.car.Car.PERMISSION_CAR_INFO) public static final int INFO_FUEL_CAPACITY = 291504388; // 0x11600104
    field @RequiresPermission(android.car.Car.PERMISSION_CAR_INFO) public static final int INFO_FUEL_DOOR_LOCATION = 289407240; // 0x11400108
    field @RequiresPermission(android.car.Car.PERMISSION_CAR_INFO) public static final int INFO_FUEL_TYPE = 289472773; // 0x11410105
    field @RequiresPermission(android.car.Car.PERMISSION_CAR_INFO) public static final int INFO_MAKE = 286261505; // 0x11100101
    field @RequiresPermission(android.car.Car.PERMISSION_CAR_INFO) public static final int INFO_MODEL = 286261506; // 0x11100102
    field @RequiresPermission(android.car.Car.PERMISSION_CAR_INFO) public static final int INFO_MODEL_YEAR = 289407235; // 0x11400103
    field @RequiresPermission(android.car.Car.PERMISSION_CAR_INFO) public static final int INFO_MULTI_EV_PORT_LOCATIONS = 289472780; // 0x1141010c
    field @RequiresPermission(android.car.Car.PERMISSION_IDENTIFICATION) public static final int INFO_VIN = 286261504; // 0x11100100
    field public static final int INVALID = 0; // 0x0
    field @RequiresPermission("android.car.permission.CONTROL_CAR_MIRRORS") public static final int MIRROR_FOLD = 287312709; // 0x11200b45
    field @RequiresPermission("android.car.permission.CONTROL_CAR_MIRRORS") public static final int MIRROR_LOCK = 287312708; // 0x11200b44
    field @RequiresPermission("android.car.permission.CONTROL_CAR_MIRRORS") public static final int MIRROR_Y_MOVE = 339741507; // 0x14400b43
    field @RequiresPermission("android.car.permission.CONTROL_CAR_MIRRORS") public static final int MIRROR_Y_POS = 339741506; // 0x14400b42
    field @RequiresPermission("android.car.permission.CONTROL_CAR_MIRRORS") public static final int MIRROR_Z_MOVE = 339741505; // 0x14400b41
    field @RequiresPermission("android.car.permission.CONTROL_CAR_MIRRORS") public static final int MIRROR_Z_POS = 339741504; // 0x14400b40
    field @RequiresPermission(android.car.Car.PERMISSION_EXTERIOR_ENVIRONMENT) public static final int NIGHT_MODE = 287310855; // 0x11200407
    field @RequiresPermission("android.car.permission.CAR_DIAGNOSTICS") public static final int OBD2_FREEZE_FRAME = 299896065; // 0x11e00d01
    field @RequiresPermission("android.car.permission.CLEAR_CAR_DIAGNOSTICS") public static final int OBD2_FREEZE_FRAME_CLEAR = 299896067; // 0x11e00d03
    field @RequiresPermission("android.car.permission.CAR_DIAGNOSTICS") public static final int OBD2_FREEZE_FRAME_INFO = 299896066; // 0x11e00d02
    field @RequiresPermission("android.car.permission.CAR_DIAGNOSTICS") public static final int OBD2_LIVE_FRAME = 299896064; // 0x11e00d00
    field @RequiresPermission(android.car.Car.PERMISSION_POWERTRAIN) public static final int PARKING_BRAKE_AUTO_APPLY = 287310851; // 0x11200403
    field @RequiresPermission(android.car.Car.PERMISSION_POWERTRAIN) public static final int PARKING_BRAKE_ON = 287310850; // 0x11200402
    field @RequiresPermission("android.car.permission.CAR_MILEAGE") public static final int PERF_ODOMETER = 291504644; // 0x11600204
    field @RequiresPermission(android.car.Car.PERMISSION_READ_STEERING_STATE) public static final int PERF_REAR_STEERING_ANGLE = 291504656; // 0x11600210
    field @RequiresPermission(android.car.Car.PERMISSION_READ_STEERING_STATE) public static final int PERF_STEERING_ANGLE = 291504649; // 0x11600209
    field @RequiresPermission(android.car.Car.PERMISSION_SPEED) public static final int PERF_VEHICLE_SPEED = 291504647; // 0x11600207
    field @RequiresPermission(android.car.Car.PERMISSION_SPEED) public static final int PERF_VEHICLE_SPEED_DISPLAY = 291504648; // 0x11600208
    field @RequiresPermission.Read(@androidx.annotation.RequiresPermission(android.car.Car.PERMISSION_ENERGY)) @RequiresPermission.Write(@androidx.annotation.RequiresPermission("android.car.permission.ADJUST_RANGE_REMAINING")) public static final int RANGE_REMAINING = 291504904; // 0x11600308
    field @RequiresPermission(android.car.Car.PERMISSION_READ_INTERIOR_LIGHTS) public static final int READING_LIGHTS_STATE = 356519683; // 0x15400f03
    field @RequiresPermission(android.car.Car.PERMISSION_CONTROL_INTERIOR_LIGHTS) public static final int READING_LIGHTS_SWITCH = 356519684; // 0x15400f04
    field @RequiresPermission("android.car.permission.CAR_EXTERIOR_LIGHTS") public static final int REAR_FOG_LIGHTS_STATE = 289410877; // 0x11400f3d
    field @RequiresPermission("android.car.permission.CONTROL_CAR_EXTERIOR_LIGHTS") public static final int REAR_FOG_LIGHTS_SWITCH = 289410878; // 0x11400f3e
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_BACKREST_ANGLE_1_MOVE = 356518792; // 0x15400b88
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_BACKREST_ANGLE_1_POS = 356518791; // 0x15400b87
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_BACKREST_ANGLE_2_MOVE = 356518794; // 0x15400b8a
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_BACKREST_ANGLE_2_POS = 356518793; // 0x15400b89
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_BELT_BUCKLED = 354421634; // 0x15200b82
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_BELT_HEIGHT_MOVE = 356518788; // 0x15400b84
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_BELT_HEIGHT_POS = 356518787; // 0x15400b83
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_DEPTH_MOVE = 356518798; // 0x15400b8e
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_DEPTH_POS = 356518797; // 0x15400b8d
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_FORE_AFT_MOVE = 356518790; // 0x15400b86
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_FORE_AFT_POS = 356518789; // 0x15400b85
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_HEADREST_ANGLE_MOVE = 356518808; // 0x15400b98
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_HEADREST_ANGLE_POS = 356518807; // 0x15400b97
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_HEADREST_FORE_AFT_MOVE = 356518810; // 0x15400b9a
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_HEADREST_FORE_AFT_POS = 356518809; // 0x15400b99
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_HEADREST_HEIGHT_MOVE = 356518806; // 0x15400b96
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_HEADREST_HEIGHT_POS = 289409941; // 0x11400b95
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_HEIGHT_MOVE = 356518796; // 0x15400b8c
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_HEIGHT_POS = 356518795; // 0x15400b8b
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_LUMBAR_FORE_AFT_MOVE = 356518802; // 0x15400b92
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_LUMBAR_FORE_AFT_POS = 356518801; // 0x15400b91
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_LUMBAR_SIDE_SUPPORT_MOVE = 356518804; // 0x15400b94
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_LUMBAR_SIDE_SUPPORT_POS = 356518803; // 0x15400b93
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_MEMORY_SELECT = 356518784; // 0x15400b80
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_MEMORY_SET = 356518785; // 0x15400b81
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_OCCUPANCY = 356518832; // 0x15400bb0
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_TILT_MOVE = 356518800; // 0x15400b90
    field @RequiresPermission("android.car.permission.CONTROL_CAR_SEATS") public static final int SEAT_TILT_POS = 356518799; // 0x15400b8f
    field @RequiresPermission("android.car.permission.STORAGE_ENCRYPTION_BINDING_SEED") public static final int STORAGE_ENCRYPTION_BINDING_SEED = 292554247; // 0x11700607
    field @RequiresPermission("android.car.permission.CAR_TIRES") public static final int TIRE_PRESSURE = 392168201; // 0x17600309
    field @RequiresPermission.Read(@androidx.annotation.RequiresPermission(android.car.Car.PERMISSION_READ_DISPLAY_UNITS)) @RequiresPermission.Write(@androidx.annotation.RequiresPermission(allOf={android.car.Car.PERMISSION_CONTROL_DISPLAY_UNITS, "android.car.permission.CAR_VENDOR_EXTENSION"})) public static final int TIRE_PRESSURE_DISPLAY_UNITS = 289408514; // 0x11400602
    field @RequiresPermission("android.car.permission.CAR_DYNAMICS_STATE") public static final int TRACTION_CONTROL_ACTIVE = 287310859; // 0x1120040b
    field @RequiresPermission.Read(@androidx.annotation.RequiresPermission(android.car.Car.PERMISSION_PRIVILEGED_CAR_INFO)) public static final int TRAILER_PRESENT = 289410885; // 0x11400f45
    field @RequiresPermission("android.car.permission.CAR_EXTERIOR_LIGHTS") public static final int TURN_SIGNAL_STATE = 289408008; // 0x11400408
    field @RequiresPermission.Read(@androidx.annotation.RequiresPermission(android.car.Car.PERMISSION_PRIVILEGED_CAR_INFO)) public static final int VEHICLE_CURB_WEIGHT = 289410886; // 0x11400f46
    field @RequiresPermission(anyOf={"android.car.permission.VMS_PUBLISHER", "android.car.permission.VMS_SUBSCRIBER"}) public static final int VEHICLE_MAP_SERVICE = 299895808; // 0x11e00c00
    field @RequiresPermission.Read(@androidx.annotation.RequiresPermission(android.car.Car.PERMISSION_READ_DISPLAY_UNITS)) @RequiresPermission.Write(@androidx.annotation.RequiresPermission(allOf={android.car.Car.PERMISSION_CONTROL_DISPLAY_UNITS, "android.car.permission.CAR_VENDOR_EXTENSION"})) public static final int VEHICLE_SPEED_DISPLAY_UNITS = 289408516; // 0x11400604
    field @RequiresPermission(android.car.Car.PERMISSION_SPEED) public static final int WHEEL_TICK = 290521862; // 0x11510306
    field @RequiresPermission("android.car.permission.CONTROL_CAR_WINDOWS") public static final int WINDOW_LOCK = 320867268; // 0x13200bc4
    field @RequiresPermission("android.car.permission.CONTROL_CAR_WINDOWS") public static final int WINDOW_MOVE = 322964417; // 0x13400bc1
    field @RequiresPermission("android.car.permission.CONTROL_CAR_WINDOWS") public static final int WINDOW_POS = 322964416; // 0x13400bc0
  }

2.2.2 模拟驾驶事件

如需将速度设置为 0,请运行以下命令:

adb shell cmd car_service inject-vhal-event 0x11600207 0
adb shell dumpsys activity service com.android.car inject-vhal-event 0x11600207 0

如需将档位设置为“停车”(模拟指向“PARKED”CarDrivingStateEvent ),请运行以下命令:

adb shell cmd car_service inject-vhal-event 0x11400400 4
adb shell dumpsys activity service com.android.car inject-vhal-event 0x11400400 4

如需将档位设置为“行驶”,而使速度仍为 0(模拟指向“IDLING”CarDrivingStateEvent ),请运行以下命令:

adb shell cmd car_service inject-vhal-event 0x11400400 8
adb shell dumpsys activity service com.android.car inject-vhal-event 0x11400400 8

如需将速度设为每秒 30 米(模拟指向“MOVING”CarDrivingStateEvent ),请运行以下命令:

adb shell cmd car_service inject-vhal-event 0x11600207 30
adb shell dumpsys activity service com.android.car inject-vhal-event 0x11600207 30

2.3 cmd car_service inject-error-event 注入错误vhal信号事件

inject-error-event property zone errorCode
   Inject an error event from VHAL for testing.

2.4 cmd car_service get-carpropertyconfig 获取车辆CarPropertyConfigs

get-carpropertyconfig [propertyId]
   Get a CarPropertyConfig by Id in Hex or list all CarPropertyConfigs

2.5 cmd car_service get-property-value 获取车辆属性值

get-property-value [propertyId] [areaId]
   Get a vehicle property value by property id in Hex and areaId
   or list all property values for all areaId

2.6 cmd car_service inject-key 注入KeyEvent事件

inject-key [-d display] [-t down_delay_ms | -a down|up] key_code
   inject rotary input event to car service.
   display: 0 for main, 1 for cluster. If not specified, it will be 0.
   down_delay_ms: delay from down to up key event. If not specified, it will be 0
   key_code: int key code defined in android KeyEvent
      If -a isn’t specified, both down and up will be injected.

2.7 cmd car_service inject-rotary 模拟旋控器事件

inject-rotary [-d display] [-i input_type] [-c clockwise] [-dt delta_times_ms]
   inject rotary input event to car service.
   display: 0 for main, 1 for cluster. If not specified, it will be 0.
   input_type: 10 for navigation controller input, 11 for volume controller input. If not specified, it will be 10.
   clockwise: true if the event is clockwise, false if the event is counter-clockwise. If not specified, it will be false.
   delta_times_ms: a list of delta time (current time minus event time) in descending order. If not specified, it will be 0.

在这里插入图片描述

car_service 命令旋转输入
adb shell cmd car_service inject-rotary逆时针旋转
adb shell cmd car_service inject-rotary -c true顺时针旋转
adb shell cmd car_service inject-rotary -dt 100 50逆时针旋转多次(100 毫秒前和 50 毫秒前)
adb shell cmd car_service inject-key 282向左微移
adb shell cmd car_service inject-key 283向右微移
adb shell cmd car_service inject-key 280向上微移
adb shell cmd car_service inject-key 281向下微移
adb shell cmd car_service inject-key 23点击居中的按钮
adb shell input keyevent inject-key 4点击返回按钮

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1881341.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

STM32MP135裸机编程:使用软件触发硬件复位

0 参考资料 STM32MP13xx参考手册.pdf 1 使用寄存器实现软件复位 1.1 复位电路概述 重点关注下面标红的路线&#xff1a; 通过这条路线可以清楚看到&#xff0c;我们可以通过设置RCC_MP_GRSTCSETR寄存器让RPCTL&#xff08;复位脉冲控制器&#xff09;给NRST&#xff08;硬件复…

hmall-服务保护和分布式事务

1. 微服务保护 1.1 服务保护方案 1.1.1 请求限流 服务故障最重要原因&#xff0c;就是并发太高&#xff01;解决了这个问题&#xff0c;就能避免大部分故障。当然&#xff0c;接口的并发不是一直很高&#xff0c;而是突发的。因此请求限流&#xff0c;就是限制或控制接口访问…

常见容性负载组应用

什么是容性负载&#xff1f; 在交流系统中&#xff0c;电压和电流随电源的频率而上升和下降。电压和电流是否一起上升取决于负载的特性&#xff0c;负载有三种类型。电阻负载&#xff08;例如加热元件和白炽灯&#xff09;的影响最小&#xff0c;电压和电流一起上升和下降&…

Vue3学习笔记<->创建第一个vue项目(2)

新建一个项目目录 找一个盘新建一个目录&#xff0c;我这里在D盘创建一个vuedemo目录作为项目存放的目录。使用idea打开目录。   单击ieda底部的按钮“Terminal”&#xff0c;打开命令行窗口&#xff0c;如果命令行窗口当前目录不是“vuedemo”&#xff0c;就切换到“vuedem…

九浅一深Jemalloc5.3.0 -- ②浅*size class

目前市面上有不少分析Jemalloc老版本的博文&#xff0c;但5.3.0却少之又少。而且5.3.0的架构与之前的版本也有较大不同&#xff0c;本着“与时俱进”、“由浅入深”的宗旨&#xff0c;我将逐步分析Jemalloc5.3.0的实现。 另外&#xff0c;单讲实现代码是极其枯燥的&#xff0c;…

web渗透-反序列化漏洞

一、简介 就是把一个对象变成可以传输的字符串&#xff0c;目的就是为了方便传输。假设&#xff0c;我们写了一个class,这个class里面存有一些变量。当这个class被实例化了之后&#xff0c;在使用过程中里面的一些变量值发生了改变。以后在某些时候还会用到这个变量&#xff0…

压缩包怎么解压,解压压缩包不损坏文件

常见格式&#xff1a; ZIP&#xff1a;最常见的压缩文件格式之一&#xff0c;支持跨平台。RAR&#xff1a;另一种常见的压缩文件格式&#xff0c;通常压缩率比ZIP高&#xff0c;但不如ZIP普及。7Z&#xff1a;来自7-Zip的压缩格式&#xff0c;支持更高的压缩率和一些高级特性。…

长沙高校大学智能制造实验室数字孪生可视化系统平台建设项目验收

长沙高校大学智能制造实验室始终站在科技前沿&#xff0c;不断探索和实践智能制造的新技术、新方法。数字孪生技术作为智能制造领域的重要分支&#xff0c;其通过将物理世界的实体映射到数字世界&#xff0c;实现对实体的实时监测、模拟和分析&#xff0c;为智能制造提供了强大…

Python | Leetcode Python题解之第208题实现Trie(前缀树)

题目&#xff1a; 题解&#xff1a; class Trie:def __init__(self):self.children [None] * 26self.isEnd Falsedef searchPrefix(self, prefix: str) -> "Trie":node selffor ch in prefix:ch ord(ch) - ord("a")if not node.children[ch]:retur…

解决本机电脑只能通过localhost访问,不能通过127.0.0.1访问

背景问题 有天我启动项目&#xff0c;发现项目连接Mysq总是连接不上&#xff0c;查了url、ip、port、用户名和密码都没有错&#xff0c;就是连接不上mysql数据库&#xff0c;后来通过查找资料发现有多个进程占用3306端口。 pid 6016 是mysqld服务 而pid 9672 是一个叫 svchos…

Python-数据分析组合可视化实例图【附完整源码】

数据分析组合可视化实例图 开篇&#xff1a;应女朋友的要求&#xff0c;于是写下了这篇详细的数据可视化代码及完整注释 一&#xff1a;柱状图、折线图横向组合网格布局 本段代码使用了pyecharts库来创建一个包含多个图表&#xff08;柱状图、折线图&#xff09;和网格布局的…

理想汽车提出3DRealCar:首个大规模3D真实汽车数据集

理想提出3DRealCar&#xff0c;这是第一个大规模 3D 实车数据集&#xff0c;包含 2500 辆在真实场景中拍摄的汽车。我们希望 3DRealCar 可以成为促进汽车相关任务的宝贵资源。 理想汽车提出3DRealCar&#xff1a;首个大规模3D真实汽车数据集! 我们精心策划的高质量3DRealCar数…

帝国CMS(EmpireCMS)漏洞复现

简介 《帝国网站管理系统》英文译为Empire CMS&#xff0c;简称Ecms&#xff0c;它是基于B/S结构&#xff0c;且功能强大而帝国CMS-logo易用的网站管理系统。 帝国CMS官网&#xff1a;http://www.phome.net/ 参考相关漏洞分析文章&#xff0c;加上更详细的渗透测试过程。 参考…

使用Pytho删除docx文档中的页眉和页脚

介绍&#xff1a; 在日常工作中&#xff0c;我们经常需要处理文档&#xff0c;其中包括删除或修改页眉和页脚。本文将介绍如何使用Python编程语言和wxPython模块创建一个简单的GUI应用程序&#xff0c;帮助我们删除docx文档中的页眉和页脚。 C:\pythoncode\new\deleteyemeiyej…

数据结构:期末考 第六次测试(总复习)

一、 单选题 &#xff08;共50题&#xff0c;100分&#xff09; 1、表长为n的顺序存储的线性表&#xff0c;当在任何位置上插入或删除一个元素的概率相等时&#xff0c;插入一个元素所需移动元素的平均个数为&#xff08; D &#xff09;.&#xff08;2.0&#xff09; A、 &am…

51单片机项目-点亮第一个LED灯

目录 新建项目选择型号添加新文件到该项目设置字体和utf-8编码二极管如何区分正负极原理&#xff1a;CPU通过寄存器来控制硬件电路 用P2寄存器的值控制第一个灯亮进制转换编译查看P2寄存器的地址生成HEX文件把代码下载到单片机中下载程序到单片机 新建项目 选择型号 stc是中国…

算法09 日期相关模拟算法【C++实现】

这是《C算法宝典》算法篇的第09节文章啦~ 如果你之前没有太多C基础&#xff0c;请点击&#x1f449;专栏&#xff1a;C语法入门&#xff0c;如果你C语法基础已经炉火纯青&#xff0c;则可以进阶算法&#x1f449;专栏&#xff1a;算法知识和数据结构&#x1f449;专栏&#xff…

【Linux进程通信】匿名管道的常见特性、两进程间通过管道通信的情况分析

目录 一、只有血缘关系的进程之间才可以进行管道通信 二、管道只可以单向通信 三、进程间通信是会协同的-同步与互斥的 1.父子进程读写端都正常&#xff0c;管道为空父进程读端阻塞。 2.父子进程读写端都正常&#xff0c;管道满时子进程写端阻塞。 3.子进程写端关闭&…

idea集成uglifycss压缩混淆css

Uglifycss介绍 https://www.npmjs.com/package/uglifycss 命令行 $ uglifycss [options] [filename] [...] > output 选项&#xff1a; --max-line-len n每个字符添加一个换行符&#xff08;大约&#xff09;; 表示无换行符&#xff0c;并且是默认值n0 --expand-vars扩…

计算机组成原理——锁存器和触发器

文章目录 1. SR锁存器 1.1 电路结构 1.2 电路解析 2. 带en输入的SR锁存器 2.1 ​​​​​​​电路结构 2.2 工作原理 3. ​​​​​​​带En输入的D锁存器 3.1 电路结构 3.2 工作原理 4. ​​​​​​​边沿触发的D触发器 4.1 电路结构 4.2 工作原理 1. SR锁存器 …