tree: bc9960d96a6baaa68cdd1ab18698352810a6475a [path history] [tgz]
  1. daemon/
  2. iioservice_simpleclient/
  3. include/
  4. libiioservice_ipc/
  5. mojo/
  6. DIR_METADATA
  7. OWNERS
  8. README.md
iioservice/README.md

Chrome OS Iio Service

The repository hosts the core Chrome OS platform iioservice components, including:

Mojo IPC library

This library provides mojo interfaces. Developers should use CrOS Mojo Service Manager to connect to Iio Service via IioSensor service. The first mojo pipe created is cros::mojom::SensorService.

Daemon iioservice

  • /usr/sbin/iioservice

This daemon provides mojo channels that let processes connect to it. iioservice will dispatch devices' event data to the processes that need them. Each process can set the desired frequencies and IIO channels of devices without conflicts, as it owns all IIO devices.

Iioservice test executables

Several test executables are contained under this directory. Developers can also take these as examples when adding sensor clients in platform2.

  • /usr/local/sbin/iioservice_simpleclient
  • /usr/sbin/iioservice_simpleclient

Reads iio samples with a device id, a frequency, channels, and a timeout. Ex:

(device) iioservice_simpleclient --device_id=0 --frequency=100 --timeout=1000 \
(device) --channels="accel_x accel_y accel_z timestamp"
  • /usr/local/sbin/iioservice_event
  • /usr/sbin/iioservice_event

Reads iio events with a device id and event channel indices. Ex:

(device) iioservice_event --device_id=0 --indices="0"
  • /usr/local/sbin/iioservice_query
  • /usr/sbin/iioservice_query

Reads device attributes on all devices. Ex:

(device) iioservice_query --attributes="location scale"