Structure for enabling or disabling sensor event queuing.
typedef union {
sensor_devctl_enable_tx_t tx;
struct {
unsigned int size;
} rx;
} sensor_devctl_queue_u;
BlackBerry 10.0.0
The union sensor__devctl__queue__u is used with the DCMD_SENSOR_QUEUE device command to enable/disable sensor event queuing. Sensor services queues only one event by default. If a new event comes in before the client reads the last event, the previous event is overwritten. When event queuing is enabled, up to X events will be queued by the system. Client can set their read buffers up to X * sizeof(sensor_event_t) to be able to read all events queued.
sensor_devctl_queue_u sensorQue;
sensorQue.tx.enable = 1; // 1 = enable, 0 = disable
result = devctl(fd, DCMD_SENSOR_QUEUE, &sensorQue, sizeof(sensorQue),
NULL);
where: sensorQue.rx.size is the number of events that will be queued.
result is EOK for success (or see errno return code descriptions).