Let me share what i have learned and experienced:
The short answer to how to catch iio events is, it depends on the kernel driver of the sensor and the Sensor-HAL on Android.
First of all an iio event is driven by an hw-based interrupt ; an interrupt pin on sensor connected to and recognized by board sends signal to the board when for instance there is new data .
Second , the Sensor Manager/Service does not communicate with the driver directly. What it listens is Sensor-HAL. The Sensor-HAL generates events for the Sensor Service , not the driver self directly.That means the SensorHAL should read the data from sysfs(file interfaces created by driver) and return that data to the Sensor Service calls (see poll() , sensor_event struct in https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/sensors.h )
At last, catchevent is only for "interrupt events" which are generated by devices defined as interrupt device(like touchscreen).Interrupt , iio and hwmon are different types of device sw-based structures in linux kernel.
Conclusion : If you have a new sensor and want to catch/read data from it in Android, you should
1.find/ write a driver with a suitable device model(input, iio,hwmon etc.)
2.make the board recognize the device (by adding information to the device tree or board config. file )
3.find/write a suitable Sensor-HAL or add the sensor to the existing HAL.
Only after this steps an app can reach sensor data through SensorListener.
how to catch/test the event catches from native level : Can not find a direct way to catch events.
The general native way to reach sensor data (after adding the proper driver and getting the board recognize the device ) is to use the sysfs interfaces.
For instance ,from android device shell (as root):
#sys/bus/iio/devices/iio:device0/ls
in_accel_x_raw in_accel_y_raw in_accel_z_raw in_accel_scale ....
#cat in_accel_x_raw