• Home
  • History
  • Annotate
  • only in /system/chre/host/common/include/chre_host/
History log of /system/chre/host/common/include/chre_host/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e738e3119e121fff776c49ec75f518c5b1695e43 28-Jun-2017 Arthur Ishiguro <arthuri@google.com> Implements framework for time sync request

- Adds a flatbuffer schema for a request message from CHRE
- Implements framework for sending the message in CHRE
- Will upload a follow-up CL to periodically send a time sync request
from CHRE and handle it at the host

Bug: 62910293
Test: Compile and run on device, make sure other messages (e.g. debug
dump, time sync) are not affected
Change-Id: I5b931cb785e1e033c827df473c0c02be0ae605fc
ost_messages_generated.h
58276308709e5568ba2976e93b37211a52589166 09-Jun-2017 Brian Duddie <bduddie@google.com> Add debug dump support

Integrate CHRE with the new ASH debug dump implementation to enable
dumping debug info to a place where it will be included in a bugreport.
This is accomplished by implementing the debugDump function in the HIDL
interface in the context hub HAL, and sending a message to CHRE to
retrieve debugging information as a series of strings. CHRE currently
does not put any useful information in this log, only a test string.

Bug: 37640330
Test: load on device with updated SLPI firmware, run
lshal debug android.hardware.contexthub@1.0::IContexthub/default
also, collect a bugreport and confirm that the info shows up in
lshal-debug.txt
Change-Id: Ia841d623b1e581d4435f907700082567edb53769
ost_messages_generated.h
ost_protocol_host.h
4434ba0232d49dfe88b77fd15cb5c7c01ef45427 23-May-2017 Arthur Ishiguro <arthuri@google.com> Modify TimeSync flatbuffer schema to send offset

- Initially planned to send AP time, but discovered we can directly
access QTimer register at AP side
- Modifies TimeSync message to send the AP-SLPI time offset

Test: run_sim.sh, runs on device
Change-Id: I5c5d9bc91014fd8498cff821d6a4135d0120e994
ost_messages_generated.h
ost_protocol_host.h
b4723e2821f47797fa772249caa93d9e13e06c5f 17-May-2017 Arthur Ishiguro <arthuri@google.com> Initial framework for time sync flatbuffer msg

- Adds flatbuffer schema for sending AP timestamp
- Adds message handler (does nothing now) in host_link.cc

Test: ./run_sim.sh, runs on device
Change-Id: Ia32d1fc3232246f86856b57107df8d1dc2e4ca19
ost_messages_generated.h
ost_protocol_host.h
2f6b50aa8e01717948efd3024f6ab4f4825c0a18 15-Apr-2017 Andrew Rossignol <aarossig@google.com> Support for printing logs via logcat on the host

Test: Run on device, see logs in logcat
Change-Id: I067defab05173b119923a850cdb0bce5b038dd8e
ost_protocol_host.h
a24fe8d6ef30e47e99cf434a9c432350d916e7d1 13-Apr-2017 Andrew Rossignol <aarossig@google.com> Updates the HostLink flatbuffers schema to support log messages

Test: Run the sim
Change-Id: I64ed9e6c3bdf200b48bb2c582f8f9a91bdbeedb8
ost_messages_generated.h
99f01ac9bd6e351538cb8922ef15d9e838e7339a 06-Apr-2017 Brian Duddie <bduddie@google.com> Add support for unloading nanoapps

Add the capability for clients on the host to dynamically request the
unloading of a nanoapp. This initial implementation takes measures to
avoid potentially referencing the memory in the nanoapp after it is
unloaded, by flushing events and messages, but does not clean up after
the nanoapp if it leaves a sensor request open, or a timer running, or
doesn't free all of its dynamic memory, etc. As part of ensuring this
safety, CHRE will now prevent a nanoapp that is being unloaded from
sending events or messages just prior to invoking the nanoappEnd
callback.

Add an unload tester nanoapp that unloads the spammer test nanoapp after
a short delay, to help verify that event and message cleanup is handled
appropriately.

Test: run unload tester nanoapp in simulator and on SLPI, use
chre_test_client on SLPI to unload AR
Change-Id: Ib6dbe26b6414e417401412375390ceef5663d4d9
ost_messages_generated.h
ost_protocol_host.h
22b8da015750f4082194c3de99e7e73d2b9eb3a9 04-Apr-2017 Brian Duddie <bduddie@google.com> Reduce logspam from rapid-fire connection attempts

Only start logging the reconnect delay after entering the exponential
backoff phase, to avoid spamming logcat.

Test: confirm we don't get a bunch of logs for normal boot behavior
Change-Id: I4f0449b060b5435a7afbdf174f53ce561e90545e
ocket_client.h
56944d8c8698b3304ddc52dd257ec8da30dcb189 30-Mar-2017 Brian Duddie <bduddie@google.com> Reduce debugging output from CHRE daemon

Test: load, confirm verbose binary buffer dumps are not printed
Change-Id: I2974690a608cd66cc37fcb9e2990ec3063e74c69
og.h
47a99dc3cacacb0418548609c0e2d3b2b70d821e 27-Mar-2017 Brian Duddie <bduddie@google.com> Implement dynamic loading of nanoapps

Add support for loading a dynamic shared object containing a nanoapp
that has been received over the communications link with the host.

Test: use chre_test_client to load activity recognition on SLPI
Change-Id: I76da777ec19283ee67120b4b024133c556edf6e2
ost_messages_generated.h
ost_protocol_host.h
f685db3a6b34f8dd6942964ae99836bda87c8134 21-Mar-2017 Brian Duddie <bduddie@google.com> Support unicast messages from CHRE to host

Tag messages sent to CHRE with the client ID of the sender. Populate
this same value in the response to discriminate the addressee so that
responses are only delivered to the client who sent the request.

Test: run multiple instances of chre_test_client
Change-Id: I60d52944cf4e6cb2bb1fb21e9806eadd7f74b6c2
ost_messages_generated.h
ost_protocol_host.h
ocket_server.h
07da7d6425058577d477074f99bafd4b8e81bb83 20-Mar-2017 Brian Duddie <bduddie@google.com> Use FlatBuffers object API on host

Generate and use the FlatBuffers object API to interact with messages
from CHRE on host-side code. Although it involves some more overhead,
this API is a bit cleaner to use.

Test: run chre_test_client
Change-Id: If48d18999fc2743425bd1ba425a05b8fc5df8efe
ost_messages_generated.h
ost_protocol_host.h
a2f5add27054c406f36528cf8a5cbc6d4c79d246 20-Mar-2017 Brian Duddie <bduddie@google.com> Add support for querying the list of apps

Add a new FlatBuffers message to encapsulate the list of loaded apps,
and add code to CHRE to populate it. Update the reference HAL
implementation to pass the request and response through the HAL.

Test: run chre_test_client
Change-Id: I7b470daa2f051280fdb5415cdab7297de6ab4d59
ost_protocol_host.h
40fab0686f2285edf3f1e4e3de5398048003d874 19-Mar-2017 Brian Duddie <bduddie@google.com> SocketClient: Add connectInBackground(), rename callbacks

Add the ability for the SocketClient to start up its receive thread and
attempt to try connecting using its reconnect logic asynchronously.
Remove the reconnectAutomatically parameter from connect(), and always
perform automatic reconnect. Rename connection status callbacks to be
more generic.

Test: run chre_test_client
Change-Id: I32167f3d9df6b35c586e2787070ffee935e0ae86
ocket_client.h
7621b3267fd2ff1068d7aa7d75441d68646226ab 19-Mar-2017 Brian Duddie <bduddie@google.com> Reorganize HostProtocol, add hub info query

Split HostProtocol into three classes: one for the host, one for CHRE,
and one that's shared. Since the protocol is not fully symmetric (e.g.
messages to/from nanoapps are the same in both directions, but only one
side will ever request hub info, and only CHRE will ever construct the
response), this avoids pulling in unneeded code.

Also, add support for querying hub information from CHRE to be used in
the HAL, and rework the HostLink pending outbound message queue to be
more generic.

Test: run chre_test_client
Change-Id: Id88485b8c5a085eb886d4059840ac640c0383c88
ost_protocol_host.h
d5316a6fa259f5524483737e6abf19beee7f6850 18-Mar-2017 Brian Duddie <bduddie@google.com> Increase size of receive buffer in SocketServer

Bump to 1MB to allow larger messages on the path to the hub, which will
be used when loading nanoapps.

Test: compile
Change-Id: I2a7f67634e6267fa27b4a7d6116a7e6e0455ab99
ocket_server.h
82c07cd22ea43ceed1ac1f0e064c8887a88b71a8 18-Mar-2017 Brian Duddie <bduddie@google.com> Make callbacks a const ref in SocketClient

Test: compile
Change-Id: If194c3bbaec81d002b692a263ad3e644ef9e048b
ocket_client.h
f972651484105181854f604e4709e32c8bf30375 14-Mar-2017 Brian Duddie <bduddie@google.com> Add SocketClient, move shareable code to common

Add a SocketClient as a helper to simplify interacting with the socket
connection, including automatically reconnecting if the remote end dies.
Another layer is expected to be added on top of this to handle
encoding/decoding messages.

Move the SocketServer and chre_test_client code from the MSM-specific
folder to common, as these can be used in any platform where there's a
userspace daemon that acts as the entry point to CHRE communications.

Test: compile, run chre and chre_test_client
Change-Id: I69c06eb823670beb0a8d018b8fe80495ced842a5
ocket_client.h
ocket_server.h
aa505261768ffa12ab6dd1ca47484fbae8a8df4b 11-Mar-2017 Brian Duddie <bduddie@google.com> Add CHRE FastRPC daemon source files

Add sources for the AP-side daemon that hosts CHRE on SLPI using
FastRPC. These files were moved from the applicable vendor directory at
commit 0a76d02, and have only minor modifications made for compilation.
Although the source is included here for reference, this binary is built
out of vendor as the FastRPC generated sources depend on proprietary
header files that can be found in the Hexagon SDK.

The sources generated from the FastRPC IDL file are checked in to allow
this daemon to be built in Android without introducing a need to include
the proprietary QAIC tool.

Test: compile and run CHRE on-device
Change-Id: I5d09a7410dedfeba21495313e33b30954b522b83
og.h