RIL 守护进程事件队列
More...
#include <pthread.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "ril_backend.h"
#include "ril_probe.h"
Go to the source code of this file.
|
|
#define | RIL_NOTIFICATION_QUEUE_CAPACITY 32U |
| | 业务通知队列容量
|
|
#define | RIL_STATE_QUEUE_CAPACITY 32U |
| | 状态事件队列容量
|
|
|
typedef struct ril_notification_node | ril_notification_node_t |
| | 业务通知链表节点前置声明。
|
RIL 守护进程事件队列
- Version
- 1.0.0
- Date
- 2026-07-17
- Copyright
- Copyright © 2026 Shenzhen One IOT World Co., Ltd. All rights reserved.
◆ ril_notification_type_t
业务通知类别
| Enumerator |
|---|
| RIL_NOTIFICATION_SMS | 接收短信通知
|
| RIL_NOTIFICATION_VOICE | 语音或 eCall 通知
|
◆ ril_queue_class_t
事件所在队列
| Enumerator |
|---|
| RIL_QUEUE_NOTIFICATION | 业务通知队列
|
| RIL_QUEUE_STATE | 状态事件队列
|
◆ ril_state_event_type_t
守护进程状态事件类别
| Enumerator |
|---|
| RIL_STATE_RADIO_REFRESH | 无线网络状态刷新结果
|
| RIL_STATE_SIM | SIM 卡状态变化
|
| RIL_STATE_DATA | 数据链路状态变化
|
| RIL_STATE_PROBE | 网络探测结果
|
◆ ril_event_queues_deinit()
◆ ril_event_queues_get_stats()
◆ ril_event_queues_init()
初始化两个事件队列。
- Parameters
-
- Returns
- TBOX_OK 成功,其他值失败。
◆ ril_event_queues_notification_count()
查询当前通知事件数。
- Parameters
-
- Returns
- 当前通知事件数;参数无效时返回 0。
◆ ril_event_queues_pop_next()
在非空的通知和状态队列之间交替取出事件。
- Parameters
-
| queues | 事件队列。 |
| queue_class | 输出事件所在队列。 |
| notification | 通知队列被选中时输出业务通知。 |
| state | 状态队列被选中时输出状态事件。 |
- Returns
- TBOX_OK 成功,其他值失败。
◆ ril_event_queues_pop_notification()
取出最早的业务通知。
- Parameters
-
| queues | 事件队列。 |
| notification | 输出业务通知。 |
- Returns
- TBOX_OK 成功,其他值失败。
◆ ril_event_queues_pop_state()
取出最早的状态事件。
- Parameters
-
- Returns
- TBOX_OK 成功,其他值失败。
◆ ril_event_queues_push_notification()
将业务通知复制到通知队列。
- Parameters
-
| queues | 事件队列。 |
| notification | 业务通知。 |
- Returns
- TBOX_OK 成功,队列已满返回 TBOX_ERROR_BUSY,其他值失败。
◆ ril_event_queues_push_state()
将状态事件复制到状态队列。
- Parameters
-
- Returns
- TBOX_OK 成功,其他值失败。
◆ ril_event_queues_state_count()
查询当前状态事件数。
- Parameters
-
- Returns
- 当前状态事件数;参数无效时返回 0。