Chre: 目录结构

CHRE是什么

Android uses Context Hub Runtime Environment (CHRE) to run contextual applications, called
nanoapps, in a low-power processing domain other than the applications processor (that runs
Android itself).

## Directory Structure

The CHRE project is organized as follows:

- ``chre_api``
    - The stable API exposed to nanoapps
- ``core``
    - Common code that applies to all CHRE platforms, most notably event
      management.
- ``pal``
    - An abstraction layer that implementers must supply to access
      device-specific functionality (such as GPS and Wi-Fi). The PAL is a C API 
      which allows it to be implemented using a vendor-supplied library.
- ``platform``
    - Contains the system interface that all plaforms must implement, along with
      implementations for individual platforms. This includes the implementation
      of the CHRE API.
    - ``platform/shared``
        - Contains code that will apply to multiple platforms, but not 
          necessarily all.
    - ``platform/linux``
        - This directory contains the canonical example for running CHRE on
          desktop machines, primarily for simulation and testing.
- ``apps``
    - A small number of sample applications are provided. These are intended to
      guide developers of new applications and help implementers test basic
      functionality quickly.
    - This is reference code and is not required for the CHRE to function.
- ``util``
    - Contains data structures used throughout CHRE and common utility code.
- ``variant/simulator``
    - Contains the CHRE variant for the simulator. This is a good example to
      start from when porting to new devices. Variants are explained in more
      detail below.

chre_api

当前的版本是 v1.2, legancy是历史版本的头文件如 v1.1
├── chre_api.mk
├── chre_api_version.mk
├── doc
│   └── Doxyfile
├── include
│   └── chre_api
│       ├── chre
│       │   ├── audio.h
│       │   ├── common.h
│       │   ├── event.h
│       │   ├── gnss.h
│       │   ├── nanoapp.h
│       │   ├── re.h
│       │   ├── sensor.h
│       │   ├── sensor_types.h
│       │   ├── version.h
│       │   ├── wifi.h
│       │   └── wwan.h
│       └── chre.h
└── legacy
    ├── README.md
    ├── v1_0
    │   ├── chre
    │   │   ├── event.h
    │   │   ├── nanoapp.h
    │   │   ├── re.h
    │   │   ├── sensor.h
    │   │   └── version.h
    │   └── chre.h
    └── v1_1
        ├── chre
        │   ├── common.h
        │   ├── event.h
        │   ├── gnss.h
        │   ├── nanoapp.h
        │   ├── re.h
        │   ├── sensor.h
        │   ├── version.h
        │   ├── wifi.h
        │   └── wwan.h
        └── chre.h

Core

    - Common code that applies to all CHRE platforms, most notably event
      management.

├── audio_request_manager.cc
├── core.mk
├── event.cc
├── event_loop.cc
├── event_loop_manager.cc
├── event_ref_queue.cc
├── gnss_manager.cc
├── host_comms_manager.cc
├── include
│   └── chre
│       └── core
│           ├── audio_request_manager.h
│           ├── event.h
│           ├── event_loop.h
│           ├── event_loop_manager.h
│           ├── event_ref_queue.h
│           ├── gnss_manager.h
│           ├── host_comms_manager.h
│           ├── init.h
│           ├── nanoapp.h
│           ├── request_multiplexer.h
│           ├── request_multiplexer_impl.h
│           ├── sensor.h
│           ├── sensor_request.h
│           ├── sensor_request_manager.h
│           ├── sensor_type.h
│           ├── static_nanoapps.h
│           ├── timer_pool.h
│           ├── wifi_request_manager.h
│           ├── wifi_scan_request.h
│           └── wwan_request_manager.h
├── init.cc
├── nanoapp.cc
├── sensor.cc
├── sensor_request.cc
├── sensor_request_manager.cc
├── sensor_type.cc
├── static_nanoapps.cc
├── tests
│   ├── audio_request_manager_test.cc
│   ├── memory_manager_test.cc
│   ├── request_multiplexer_test.cc
│   ├── sensor_request_test.cc
│   └── wifi_scan_request_test.cc
├── timer_pool.cc
├── wifi_request_manager.cc
├── wifi_scan_request.cc
└── wwan_request_manager.cc

pal

    - An abstraction layer that implementers must supply to access
      device-specific functionality
(such as GPS and Wi-Fi). The PAL is a C API 
      which allows it to be implemented using a vendor-supplied library.

├── doc
│   └── Doxyfile
├── include
│   └── chre
│       └── pal
│           ├── gnss.h
│           ├── system.h
│           ├── version.h
│           ├── wifi.h
│           └── wwan.h
└── pal.mk

 platform

当前实现的平台有android, linux, slpi

include: tree
.
└── chre
    └── platform
        ├── assert.h
        ├── condition_variable.h
        ├── context.h
        ├── fatal_error.h
        ├── host_link.h
        ├── log.h
        ├── memory.h
        ├── memory_manager.h
        ├── mutex.h
        ├── platform_audio.h
        ├── platform_gnss.h
        ├── platform_id.h
        ├── platform_nanoapp.h
        ├── platform_sensor.h
        ├── platform_wifi.h
        ├── platform_wwan.h
        ├── power_control_manager.h
        ├── static_nanoapp_init.h
        ├── system_time.h
        └── system_timer.h

shared tree

.
├── chre_api_audio.cc
├── chre_api_core.cc
├── chre_api_gnss.cc
├── chre_api_re.cc
├── chre_api_sensor.cc
├── chre_api_version.cc
├── chre_api_wifi.cc
├── chre_api_wwan.cc
├── host_protocol_chre.cc
├── host_protocol_common.cc
├── idl
│   ├── host_messages.fbs
│   ├── README.md
│   └── update.sh
├── include
│   └── chre
│       ├── platform
│       │   └── shared
│       │       ├── host_messages_generated.h
│       │       ├── host_protocol_chre.h
│       │       ├── host_protocol_common.h
│       │       ├── memory_debug.h
│       │       ├── nanoapp_dso_util.h
│       │       ├── nanoapp_support_lib_dso.h
│       │       ├── pal_system_api.h
│       │       ├── platform_log.h
│       │       ├── platform_pal.h
│       │       └── platform_sensor_util.h
│       └── target_platform
│           ├── platform_gnss_base.h
│           ├── platform_wifi_base.h
│           └── platform_wwan_base.h
├── memory_manager.cc
├── nanoapp
│   ├── nanoapp_dso_util.cc
│   └── nanoapp_support_lib_dso.cc
├── pal_gnss_stub.cc
├── pal_system_api.cc
├── pal_wifi_stub.cc
├── pal_wwan_stub.cc
├── platform_gnss.cc
├── platform_sensor_util.cc
├── platform_wifi.cc
├── platform_wwan.cc
└── system_time.cc

slpi

├── chre_api_re.cc
├── fatal_error.cc
├── host_link.cc
├── include
│   ├── chre
│   │   ├── platform
│   │   │   └── slpi
│   │   │       ├── fastrpc.h
│   │   │       ├── memory.h
│   │   │       ├── nanoapp_load_manager.h
│   │   │       ├── power_control_util.h
│   │   │       ├── preloaded_nanoapps.h
│   │   │       ├── see
│   │   │       │   ├── island_vote_client.h
│   │   │       │   ├── see_client.h
│   │   │       │   ├── see_helper.h
│   │   │       │   └── see_helper_internal.h
│   │   │       ├── smgr
│   │   │       │   ├── platform_sensor_util.h
│   │   │       │   ├── smgr_client.h
│   │   │       │   └── smr_helper.h
│   │   │       ├── system_time.h
│   │   │       ├── system_time_util.h
│   │   │       └── uimg_util.h
│   │   └── target_platform
│   │       ├── assert.h
│   │       ├── condition_variable_base.h
│   │       ├── condition_variable_impl.h
│   │       ├── fatal_error.h
│   │       ├── host_link_base.h
│   │       ├── log.h
│   │       ├── mutex_base.h
│   │       ├── mutex_base_impl.h
│   │       ├── platform_audio_base.h
│   │       ├── platform_id_impl.h
│   │       ├── platform_nanoapp_base.h
│   │       ├── static_nanoapp_init.h
│   │       └── system_timer_base.h
│   ├── custaaaaaaaaq.h
│   └── targaaaaaaaaq.h
├── init.cc
├── memory.cc
├── memory_manager.cc
├── nanoapp_load_manager.cc
├── platform_audio.cc
├── platform_nanoapp.cc
├── platform_pal.cc
├── preloaded_nanoapps.cc
├── see
│   ├── include
│   │   └── chre
│   │       └── target_platform
│   │           ├── platform_sensor_base.h
│   │           └── power_control_manager_base.h
│   ├── island_vote_client.cc
│   ├── platform_sensor.cc
│   ├── power_control_manager.cc
│   └── see_helper.cc
├── smgr
│   ├── include
│   │   └── chre
│   │       └── target_platform
│   │           ├── platform_sensor_base.h
│   │           └── power_control_manager_base.h
│   ├── platform_sensor.cc
│   ├── platform_sensor_util.cc
│   ├── power_control_manager.cc
│   ├── smr_helper.cc
│   └── tests
│       └── platform_sensor_util_test.cc
├── system_time.cc
├── system_timer.cc
└── system_time_util.cc
 

你可能感兴趣的:(人工智能)