sensor_error_t

Updated: October 28, 2024

Error codes for the Sensor library

Synopsis:

#include <sensor/sensor_api.h>
typedef enum {
    SENSOR_EOK = EOK,
    SENSOR_EPERM = EPERM,
    SENSOR_EAGAIN = EAGAIN,
    SENSOR_EINVAL = EINVAL,
    SENSOR_ENODEV = ENODEV,
    SENSOR_EBADF = EBADF,
    SENSOR_EACCESS = EACCES,
    SENSOR_EBADR = EBADR,
    SENSOR_ENODATA = ENODATA,
    SENSOR_ENOENT = ENOENT,
    SENSOR_ENOMEM = ENOMEM,
    SENSOR_EOPNOTSUPP = EOPNOTSUPP,
    SENSOR_ETIMEDOUT = ETIMEDOUT,
    SENSOR_EBUSY = EBUSY,
    SENSOR_ENOSPC = ENOSPC,
    SENSOR_EIO = EIO,
    SENSOR_EEXIST = EEXIST,
    SENSOR_EDEADLK = EDEADLK,
    SENSOR_EMFILE = EMFILE,
    SENSOR_EUNINIT = 0x1000,
    SENSOR_EREGFAULT,
    SENSOR_3ALOCKED = 0x1005,
    SENSOR_EOVERFLOW = 0x1007,
    SENSOR_EHARDWARE = 0x1009
} sensor_error_t;

Data:

SENSOR_EOK
The function call to the sensor completed successfully.
SENSOR_EPERM
The function call failed due to a permission issue.
SENSOR_EAGAIN
The function call failed due to a temporary unavailable condition.

Try to call the function again.

SENSOR_EINVAL
The function call failed because of an invalid argument.
SENSOR_ENODEV
The function call failed because the specified sensor wasn't found.
SENSOR_EBADF
The function call failed because an invalid sensor_handle_t value was used.
SENSOR_EACCESS
The function call failed because the necessary permissions to access the sensor aren't available.
SENSOR_EBADR
The function call failed because an invalid file descriptor was used.
SENSOR_ENODATA
The function call failed because the requested data doesn't exist.
SENSOR_ENOENT
The function call failed because the specified file or directory doesn't exist.
SENSOR_ENOMEM
The function call failed because memory allocation failed.
SENSOR_EOPNOTSUPP
The function call failed because the requested operation isn't supported.
SENSOR_ETIMEDOUT
The function call failed due to a communication problem or timeout with the sensor.
SENSOR_EBUSY
The function call failed because the sensor is busy.

Typically you receive this error when you try to open a sensor while the sensor or its required resources are in use.

SENSOR_ENOSPC
The function call failed because the disk is full.

This typically happens when you are trying to start a recording and less than the system-reserved amount of disk space remains.

SENSOR_EIO
The function call failed because of an input or output error.

This typically happens when a file I/O operation has failed.

SENSOR_EEXIST
The function call failed because the entity trying to be created already exists.
SENSOR_EDEADLK
The function call failed because the sensor is in a bad state.
SENSOR_EMFILE
The function call failed because of a file table overflow.
SENSOR_EUNINIT
The function call failed because the library hasn't been initialized.
SENSOR_EREGFAULT
The function call failed because the registration of a callback failed.
SENSOR_3ALOCKED
The function call failed because a 3A lock is active.
SENSOR_EOVERFLOW
The function call failed due to an internal overflow.
SENSOR_EHARDWARE
The function call failed due to a hardware fault with the sensor.

Library:

libsensor

Description:

If you receive an error code which isn't enumerated in this list, see the system-wide list of error codes in errno.h.