/system/chre/platform/shared/ |
D | chre_api_gnss.cc | 43 chre::Nanoapp *nanoapp = EventLoopManager::validateChreApiCall(__func__); in chreGnssLocationSessionStartAsync() local 44 return nanoapp->permitPermissionUse(NanoappPermissions::CHRE_PERMS_GNSS) && in chreGnssLocationSessionStartAsync() 48 .addRequest(nanoapp, Milliseconds(minIntervalMs), in chreGnssLocationSessionStartAsync() 57 chre::Nanoapp *nanoapp = EventLoopManager::validateChreApiCall(__func__); in chreGnssLocationSessionStopAsync() local 58 return nanoapp->permitPermissionUse(NanoappPermissions::CHRE_PERMS_GNSS) && in chreGnssLocationSessionStopAsync() 62 .removeRequest(nanoapp, cookie); in chreGnssLocationSessionStopAsync() 71 chre::Nanoapp *nanoapp = EventLoopManager::validateChreApiCall(__func__); in chreGnssMeasurementSessionStartAsync() local 72 return nanoapp->permitPermissionUse(NanoappPermissions::CHRE_PERMS_GNSS) && in chreGnssMeasurementSessionStartAsync() 76 .addRequest(nanoapp, Milliseconds(minIntervalMs), in chreGnssMeasurementSessionStartAsync() 85 chre::Nanoapp *nanoapp = EventLoopManager::validateChreApiCall(__func__); in chreGnssMeasurementSessionStopAsync() local [all …]
|
D | chre_api_re.cc | 38 chre::Nanoapp *nanoapp = EventLoopManager::validateChreApiCall(__func__); in chreGetAppId() local 39 return nanoapp->getAppId(); in chreGetAppId() 43 chre::Nanoapp *nanoapp = EventLoopManager::validateChreApiCall(__func__); in chreGetInstanceId() local 44 return nanoapp->getInstanceId(); in chreGetInstanceId() 49 chre::Nanoapp *nanoapp = EventLoopManager::validateChreApiCall(__func__); in chreTimerSet() local 53 .setNanoappTimer(nanoapp, chre::Nanoseconds(duration), cookie, oneShot); in chreTimerSet() 57 chre::Nanoapp *nanoapp = EventLoopManager::validateChreApiCall(__func__); in chreTimerCancel() local 61 .cancelNanoappTimer(nanoapp, timerId); in chreTimerCancel() 65 chre::Nanoapp *nanoapp = EventLoopManager::validateChreApiCall(__func__); in chreHeapAlloc() local 68 .nanoappAlloc(nanoapp, bytes); in chreHeapAlloc() [all …]
|
D | chre_api_core.cc | 36 Nanoapp *nanoapp = EventLoopManager::validateChreApiCall(__func__); in chreAbort() local 41 if (nanoapp == nullptr) { in chreAbort() 44 FATAL_ERROR("chreAbort called by app 0x%016" PRIx64, nanoapp->getAppId()); in chreAbort() 51 Nanoapp *nanoapp = EventLoopManager::validateChreApiCall(__func__); in chreSendEvent() local 59 nanoapp->getInstanceId()); in chreSendEvent() 62 eventType, eventData, freeCallback, nanoapp->getInstanceId(), in chreSendEvent() 80 Nanoapp *nanoapp = EventLoopManager::validateChreApiCall(__func__); in chreSendMessageWithPermissions() local 87 nanoapp->getInstanceId()); in chreSendMessageWithPermissions() 92 nanoapp, message, messageSize, messageType, hostEndpoint, in chreSendMessageWithPermissions() 127 chre::Nanoapp *nanoapp = EventLoopManager::validateChreApiCall(__func__); in chreConfigureNanoappInfoEvents() local [all …]
|
D | chre_api_wifi.cc | 40 chre::Nanoapp *nanoapp = EventLoopManager::validateChreApiCall(__func__); in chreWifiConfigureScanMonitorAsync() local 41 return nanoapp->permitPermissionUse(NanoappPermissions::CHRE_PERMS_WIFI) && in chreWifiConfigureScanMonitorAsync() 44 .configureScanMonitor(nanoapp, enable, cookie); in chreWifiConfigureScanMonitorAsync() 53 chre::Nanoapp *nanoapp = EventLoopManager::validateChreApiCall(__func__); in chreWifiRequestScanAsync() local 54 return nanoapp->permitPermissionUse(NanoappPermissions::CHRE_PERMS_WIFI) && in chreWifiRequestScanAsync() 56 nanoapp, params, cookie); in chreWifiRequestScanAsync() 65 chre::Nanoapp *nanoapp = EventLoopManager::validateChreApiCall(__func__); in chreWifiRequestRangingAsync() local 66 return nanoapp->permitPermissionUse(NanoappPermissions::CHRE_PERMS_WIFI) && in chreWifiRequestRangingAsync() 69 .requestRanging(nanoapp, params, cookie); in chreWifiRequestRangingAsync()
|
D | chre_api_sensor.cc | 39 chre::Nanoapp *nanoapp = EventLoopManager::validateChreApiCall(__func__); in chreSensorFind() local 42 .getSensorHandleForNanoapp(sensorType, sensorIndex, *nanoapp, handle); in chreSensorFind() 56 chre::Nanoapp *nanoapp = EventLoopManager::validateChreApiCall(__func__); in chreGetSensorInfo() local 62 .getSensorInfo(sensorHandle, *nanoapp, info); in chreGetSensorInfo() 95 chre::Nanoapp *nanoapp = EventLoopManager::validateChreApiCall(__func__); in chreSensorConfigure() local 97 SensorRequest sensorRequest(nanoapp->getInstanceId(), sensorMode, in chreSensorConfigure() 101 .setSensorRequest(nanoapp, sensorHandle, sensorRequest); in chreSensorConfigure() 114 chre::Nanoapp *nanoapp = EventLoopManager::validateChreApiCall(__func__); in chreSensorConfigureBiasEvents() local 117 .configureBiasEvents(nanoapp, sensorHandle, enable); in chreSensorConfigureBiasEvents() 141 chre::Nanoapp *nanoapp = EventLoopManager::validateChreApiCall(__func__); in chreSensorFlushAsync() local [all …]
|
D | chre_api_wwan.cc | 39 chre::Nanoapp *nanoapp = EventLoopManager::validateChreApiCall(__func__); in chreWwanGetCellInfoAsync() local 40 return nanoapp->permitPermissionUse(NanoappPermissions::CHRE_PERMS_WWAN) && in chreWwanGetCellInfoAsync() 43 .requestCellInfo(nanoapp, cookie); in chreWwanGetCellInfoAsync()
|
D | chre_api_audio.cc | 52 Nanoapp *nanoapp = EventLoopManager::validateChreApiCall(__func__); in chreAudioConfigureSource() local 53 return nanoapp->permitPermissionUse(NanoappPermissions::CHRE_PERMS_AUDIO) && in chreAudioConfigureSource() 56 .configureSource(nanoapp, handle, enable, bufferDuration, in chreAudioConfigureSource()
|
/system/chre/core/ |
D | event_loop.cc | 84 for (const UniquePtr<Nanoapp> &nanoapp : mNanoapps) { in forEachNanoapp() local 85 callback(nanoapp.get(), data); in forEachNanoapp() 92 Nanoapp *nanoapp = lookupAppByAppId(appId); in invokeMessageFreeFunction() local 93 if (nanoapp == nullptr) { in invokeMessageFreeFunction() 97 mCurrentApp = nanoapp; in invokeMessageFreeFunction() 146 bool EventLoop::startNanoapp(UniquePtr<Nanoapp> &nanoapp) { in startNanoapp() argument 147 CHRE_ASSERT(!nanoapp.isNull()); in startNanoapp() 153 if (nanoapp.isNull()) { in startNanoapp() 155 } else if (nanoapp->getTargetApiVersion() < in startNanoapp() 159 nanoapp->getTargetApiVersion(), in startNanoapp() [all …]
|
D | wwan_request_manager.cc | 34 bool WwanRequestManager::requestCellInfo(Nanoapp *nanoapp, const void *cookie) { in requestCellInfo() argument 35 CHRE_ASSERT(nanoapp); in requestCellInfo() 41 nanoapp->registerForBroadcastEvent(CHRE_EVENT_WWAN_CELL_INFO_RESULT); in requestCellInfo() 42 mCellInfoRequestingNanoappInstanceId = nanoapp->getInstanceId(); in requestCellInfo() 88 Nanoapp *nanoapp = in handleFreeCellInfoResult() local 92 if (nanoapp != nullptr) { in handleFreeCellInfoResult() 93 nanoapp->unregisterForBroadcastEvent(CHRE_EVENT_WWAN_CELL_INFO_RESULT); in handleFreeCellInfoResult()
|
D | wifi_request_manager.cc | 50 bool WifiRequestManager::configureScanMonitor(Nanoapp *nanoapp, bool enable, in configureScanMonitor() argument 52 CHRE_ASSERT(nanoapp); in configureScanMonitor() 55 uint32_t instanceId = nanoapp->getInstanceId(); in configureScanMonitor() 58 success = addScanMonitorRequestToQueue(nanoapp, enable, cookie); in configureScanMonitor() 66 success = addScanMonitorRequestToQueue(nanoapp, enable, cookie); in configureScanMonitor() 83 Nanoapp *nanoapp, const struct chreWifiRangingParams *params, in requestRanging() argument 85 CHRE_ASSERT(nanoapp); in requestRanging() 92 req.nanoappInstanceId = nanoapp->getInstanceId(); in requestRanging() 129 bool WifiRequestManager::requestScan(Nanoapp *nanoapp, in requestScan() argument 132 CHRE_ASSERT(nanoapp); in requestScan() [all …]
|
D | sensor_request_manager.cc | 162 Nanoapp *nanoapp, uint32_t sensorHandle, in setSensorRequest() argument 164 CHRE_ASSERT(nanoapp); in setSensorRequest() 186 sensor.getRequestMultiplexer().findRequest(nanoapp->getInstanceId(), in setSensorRequest() 197 cancelFlushRequests(sensorHandle, nanoapp->getInstanceId()); in setSensorRequest() 199 nanoapp->unregisterForBroadcastEvent(eventType, in setSensorRequest() 206 nanoapp->unregisterForBroadcastEvent(biasEventType, in setSensorRequest() 230 nanoapp->registerForBroadcastEvent(eventType, in setSensorRequest() 234 nanoapp->registerForBroadcastEvent(biasEventType, in setSensorRequest() 242 nanoapp->getInstanceId()); in setSensorRequest() 264 addSensorRequestLog(nanoapp->getInstanceId(), sensorHandle, request); in setSensorRequest() [all …]
|
D | gnss_manager.cc | 101 bool GnssManager::configurePassiveLocationListener(Nanoapp *nanoapp, in configurePassiveLocationListener() argument 104 uint32_t instanceId = nanoapp->getInstanceId(); in configurePassiveLocationListener() 138 nanoapp->registerForBroadcastEvent(CHRE_EVENT_GNSS_LOCATION); in configurePassiveLocationListener() 142 nanoapp->unregisterForBroadcastEvent(CHRE_EVENT_GNSS_LOCATION); in configurePassiveLocationListener() 226 bool GnssSession::addRequest(Nanoapp *nanoapp, Milliseconds minInterval, in addRequest() argument 228 CHRE_ASSERT(nanoapp); in addRequest() 229 return configure(nanoapp, true /* enable */, minInterval, minTimeToNext, in addRequest() 233 bool GnssSession::removeRequest(Nanoapp *nanoapp, const void *cookie) { in removeRequest() argument 234 CHRE_ASSERT(nanoapp); in removeRequest() 235 return configure(nanoapp, false /* enable */, Milliseconds(UINT64_MAX), in removeRequest() [all …]
|
/system/chre/core/include/chre/core/ |
D | timer_pool.h | 60 TimerHandle setNanoappTimer(const Nanoapp *nanoapp, Nanoseconds duration, in setNanoappTimer() argument 62 CHRE_ASSERT(nanoapp != nullptr); in setNanoappTimer() 63 return setTimer(nanoapp->getInstanceId(), duration, cookie, in setNanoappTimer() 95 bool cancelNanoappTimer(const Nanoapp *nanoapp, TimerHandle timerHandle) { in cancelNanoappTimer() argument 96 CHRE_ASSERT(nanoapp != nullptr); in cancelNanoappTimer() 97 return cancelTimer(nanoapp->getInstanceId(), timerHandle); in cancelNanoappTimer()
|
/system/chre/apps/power_test/common/idl/ |
D | chre_power_test.fbs | 18 /// nanoapp. Use uint as the base type to match the message type in 42 /// Represents a message to ask the nanoapp to create a timer that wakes up at 50 /// nanoapp. The values used here map directly to values from the CHRE API. 59 /// inside the nanoapp. The values used here map directly to values from the 69 /// nanoapp. The values used here map directly to values from the CHRE API. 75 /// Represents a message to ask the nanoapp to start or stop WiFi scanning and 85 /// Represents a message to ask the nanoapp to start or stop Gnss location 93 /// Represents a message to ask the nanoapp to start or stop querying the cell 100 /// Represents a message to ask the nanoapp to start / stop requesting Audio 102 /// source, the nanoapp will only request audio from the first source. [all …]
|
/system/chre/platform/slpi/include/chre/target_platform/ |
D | static_nanoapp_init.h | 39 UniquePtr<Nanoapp> nanoapp = MakeUnique<Nanoapp>(); \ 55 if (nanoapp.isNull()) { \ 58 nanoapp->loadStatic(&appInfo); \ 61 return nanoapp; \
|
/system/chre/platform/linux/include/chre/target_platform/ |
D | static_nanoapp_init.h | 38 UniquePtr<Nanoapp> nanoapp = MakeUnique<Nanoapp>(); \ 54 if (nanoapp.isNull()) { \ 57 nanoapp->loadStatic(&appInfo); \ 60 return nanoapp; \
|
/system/chre/platform/freertos/include/chre/target_platform/ |
D | static_nanoapp_init.h | 38 UniquePtr<Nanoapp> nanoapp = MakeUnique<Nanoapp>(); \ 54 if (nanoapp.isNull()) { \ 57 nanoapp->loadStatic(&appInfo); \ 60 return nanoapp; \
|
/system/chre/doc/ |
D | nanoapp_developer_guide.md | 9 basic understanding of what a nanoapp is (if not, see the Nanoapp Overview 11 developing your own nanoapp. 15 When starting a new nanoapp, it’s helpful to start with the skeleton of an 16 existing nanoapp. The simplest example can be found at `apps/hello_world`. Start 17 by copying this folder to the location where you will develop the nanoapp - it 21 If you don’t plan to use this nanoapp as a *static nanoapp* (see the Nanoapp 24 match your nanoapp. 30 the nanoapp within the vendor’s namespace. The vendor identifier is usually 33 an incrementing value for each nanoapp. 36 `util/include/chre/util/nanoapp/app_id.h` for some examples and utilities. [all …]
|
D | nanoapp_overview.md | 14 as the nanoapp’s “client”. Since nanoapps are not limited to the same power 19 which is standardized across all CHRE implementations. This means that a nanoapp 23 a nanoapp does not need to be recompiled to run on a device that exposes a newer 61 Some boilerplate is needed to enable nanoapp to be built as a static nanoapp - 69 “preloaded” onto the device). The binaries associated with a preloaded nanoapp 82 2. For each nanoapp in the JSON file, the CHRE daemon reads the `.napp_header` 83 from storage, and sends a message to CHRE requesting it to load the nanoapp. 86 authenticating, linking, and starting the nanoapp. 90 avoid race conditions leading to clients believing that a preloaded nanoapp 100 At the binary level, a preloaded nanoapp and fully dynamic nanoapp are [all …]
|
D | framework_overview.md | 17 event-based system, so CHRE is built around an event loop which executes nanoapp 31 ## Loading a nanoapp via the HAL 33 There are multiple ways by which a nanoapp can be loaded (see the relevant 35 loading a nanoapp that has been passed in via the Context Hub HAL's 38 1. The nanoapp binary reaches the HAL implementation, and it is loaded into the 45 2. Once the nanoapp code is loaded, the platform code calls 47 (if needed), so it can complete loading and starting the nanoapp. 61 nanoapp it's about to execute, and calls into `PlatformNanoapp::start()`. 65 nanoapp is considered part of the platform layer. So 67 into the `nanoappStart()` function defined in the nanoapp binary. [all …]
|
/system/chre/apps/test/common/proto/ |
D | ping_test.proto | 5 option java_package = "com.google.android.chre.nanoapp.proto"; 13 // H2C: A message to ping the nanoapp. The nanoapp will respond to the host 18 // C2H: A message indicating the test result. The ping test nanoapp will only 28 // A message to ping the nanoapp, with some optional specifications.
|
/system/chre/apps/wifi_offload/ |
D | README.md | 2 sending messages between wifi_offload nanoapp and offload HAL. This library is 3 being included by both offload HAL and wifi_offload nanoapp, and is NOT a 4 standard nanoapp by itself.
|
/system/chre/std_overrides/ |
D | README.md | 6 nanoapp. Two possible scenarios where the developers might need to use these 12 The overrides makefile is included in the nanoapp build by default, but the 13 developers need to enable it by setting a flag in the nanoapp Makefile: 16 It is expected that the nanoapp developers only leverage these overrides while
|
/system/chre/util/ |
D | util.mk | 14 COMMON_SRCS += util/nanoapp/audio.cc 15 COMMON_SRCS += util/nanoapp/callbacks.cc 16 COMMON_SRCS += util/nanoapp/debug.cc 17 COMMON_SRCS += util/nanoapp/wifi.cc
|
/system/chre/apps/power_test/common/ |
D | power_test.mk | 40 COMMON_SRCS += $(CHRE_PREFIX)/util/nanoapp/audio.cc 41 COMMON_SRCS += $(CHRE_PREFIX)/util/nanoapp/callbacks.cc 52 include $(CHRE_PREFIX)/build/nanoapp/app.mk
|