List Channels
Function signature: list_channels
This returns a list of dictionaries containing all the available sensors on the device. The returned dictionary has the following format:
[ {'id': channel id, 'type': channel type, 'name': channel name} {'id': channel id, 'type': channel type, 'name': channel name} .... ]
where, channel_id
, channel_type
, and channel_name
have strings as values of the respective channels.
Query Logical Name
Function signature : get_logicalname(<DataLookupClass>, value)
This function can be used for querying the logical name based on value. The file sensor_defs.py has the mapping of different sensor properties to their respective hex/decimal values. The following table contains the sensor classes, supported by get_logicalname() and the respective data lookup classes.
Sensor Class | DataLookupClass |
ProximityMonitor |
ProximityState |
OrientationData |
DeviceOrientation |
AmbientLightData |
AmbientLightData |
AccelerometerDoubleTappingData |
AccelerometerDirection |
See About this document... for information on suggesting changes.