|
WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
|

结构体 | |
| struct | tagQueueInfo |
类型定义 | |
| typedef struct tagQueueInfo | QUEUE_INFO_S |
函数 | |
| UINT32 | LOS_QueueReadCopy (UINT32 queueId, void *bufferAddr, UINT32 *bufferSize, UINT32 timeout) |
| Read a queue. | |
| UINT32 | LOS_QueueWriteCopy (UINT32 queueId, void *bufferAddr, UINT32 bufferSize, UINT32 timeout) |
| Write data into a queue. | |
| UINT32 | LOS_QueueRead (UINT32 queueId, void *bufferAddr, UINT32 bufferSize, UINT32 timeout) |
| Read a queue. | |
| UINT32 | LOS_QueueWrite (UINT32 queueId, void *bufferAddr, UINT32 bufferSize, UINT32 timeout) |
| Write data into a queue. | |
| UINT32 | LOS_QueueWriteHead (UINT32 queueId, void *bufferAddr, UINT32 bufferSize, UINT32 timeout) |
| Write data into a queue header. | |
| UINT32 | LOS_QueueWriteHeadCopy (UINT32 queueId, void *bufferAddr, UINT32 bufferSize, UINT32 timeout) |
| Write data into a queue header. | |
| UINT32 | LOS_QueueDelete (UINT32 queueId) |
| Delete a queue. | |
| UINT32 | LOS_QueueInfoGet (UINT32 queueId, QUEUE_INFO_S *queueInfo) |
| Obtain queue information. | |
| #define LOS_ERRNO_QUEUE_CB_UNAVAILABLE LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x04) |
Queue error code: The upper limit of the number of created queues is exceeded.
Value: 0x02000604.
Solution: Increase the configured number of resources for queues.
| #define LOS_ERRNO_QUEUE_CREAT_PTR_NULL LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x0c) |
Queue error code: Parameters passed in during queue creation are null pointers.
Value: 0x0200060c.
Solution: Ensure the passed-in parameters are not null pointers.
| #define LOS_ERRNO_QUEUE_CREATE_NO_MEMORY LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x02) |
Queue error code: The memory for queue creation fails to be requested.
Value: 0x02000602.
Solution: Allocate more memory for queue creation, or decrease the queue length and the number of nodes in the queue to be created.
| #define LOS_ERRNO_QUEUE_IN_TSKUSE LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x08) |
Queue error code: The queue that blocks a task cannot be deleted.
Value: 0x02000608.
Solution: Enable the task to obtain resources rather than be blocked on the queue.
| #define LOS_ERRNO_QUEUE_IN_TSKWRITE LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x0b) |
Queue error code: Queue reading and writing are not synchronous.
Value: 0x0200060b.
Solution: Synchronize queue reading with queue writing.
| #define LOS_ERRNO_QUEUE_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x0e) |
Queue error code: The handle of the queue is invalid.
Value: 0x0200060e.
Solution: Check whether the passed-in queue handle value is valid.
| #define LOS_ERRNO_QUEUE_ISEMPTY LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x1d) |
Queue error code: No resource is in the queue that is being read when the time for waiting to processing the queue expires.
Value: 0x0200061d.
Solution: Ensure that the queue contains messages when it is being read.
| #define LOS_ERRNO_QUEUE_ISFULL LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x16) |
Queue error code: No free node is available during queue writing.
Value: 0x02000616.
Solution: Ensure that free nodes are available before queue writing.
| #define LOS_ERRNO_QUEUE_MAIL_FREE_ERROR LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x1b) |
Queue error code: The memory for the queue fails to be freed.
Value: 0x0200061b.
Solution: Pass in correct input parameters.
| #define LOS_ERRNO_QUEUE_MAIL_HANDLE_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x19) |
Queue error code: The handle of the queue passed-in when the memory for the queue is being freed is invalid.
Value: 0x02000619.
Solution: Check whether the passed-in queue handle value is valid.
| #define LOS_ERRNO_QUEUE_MAIL_PTR_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x1a) |
Queue error code: The pointer to the memory to be freed is null.
Value: 0x0200061a.
Solution: Check whether the passed-in pointer is null.
| #define LOS_ERRNO_QUEUE_MAXNUM_ZERO LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x00) |
Queue error code: The maximum number of queue resources is configured to 0.
Value: 0x02000600.
Solution: Configure the maximum number of queue resources to be greater than 0. If queue modules are not used, set the configuration item for the tailoring of the maximum number of queue resources to NO.
| #define LOS_ERRNO_QUEUE_NO_MEMORY LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x01) |
Queue error code: The queue block memory fails to be initialized.
Value: 0x02000601.
Solution: Allocate the queue block bigger memory partition, or decrease the maximum number of queue resources.
| #define LOS_ERRNO_QUEUE_NOT_CREATE LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x0a) |
Queue error code: The queue is not created.
Value: 0x0200060a.
Solution: Check whether the passed-in queue handle value is valid.
| #define LOS_ERRNO_QUEUE_NOT_FOUND LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x05) |
Queue error code: Invalid queue.
Value: 0x02000605.
Solution: Ensure that the passed-in queue ID is valid.
| #define LOS_ERRNO_QUEUE_PARA_ISZERO LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x0d) |
Queue error code: The queue length or message node size passed in during queue creation is 0.
Value: 0x0200060d.
Solution: Pass in correct queue length and message node size.
| #define LOS_ERRNO_QUEUE_PEND_IN_LOCK LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x06) |
Queue error code: The task is forbidden to be blocked on a queue when the task is locked.
Value: 0x02000606.
Solution: Unlock the task before using a queue.
| #define LOS_ERRNO_QUEUE_PTR_NULL LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x17) |
Queue error code: The pointer passed in when the queue information is being obtained is null.
Value: 0x02000617.
Solution: Check whether the passed-in pointer is null.
| #define LOS_ERRNO_QUEUE_READ_IN_INTERRUPT LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x18) |
Queue error code: The queue cannot be read during an interrupt when the time for waiting to processing the queue expires.
Value: 0x02000618.
Solution: Set the expiry time to the never-waiting mode, or use asynchronous queues.
| #define LOS_ERRNO_QUEUE_READ_PTR_NULL LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x0f) |
Queue error code: The pointer passed in during queue reading is null.
Value: 0x0200060f.
Solution: Check whether the passed-in pointer is null.
| #define LOS_ERRNO_QUEUE_READ_SIZE_TOO_SMALL LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x1f) |
Queue error code: The buffer size passed in during queue reading is smaller than the queue size.
Value: 0x0200061f.
Solution: Increase the buffer size, or use a queue in which nodes are smaller.
| #define LOS_ERRNO_QUEUE_READSIZE_IS_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x10) |
Queue error code: The buffer size passed in during queue reading is too small or too big.
Value: 0x02000610.
Solution: Pass in a correct buffer size between [sizeof(CHAR*), OS_NULL_SHORT].
| #define LOS_ERRNO_QUEUE_SIZE_TOO_BIG LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x03) |
Queue error code: The size of the biggest message in the created queue is too big.
Value: 0x02000603.
Solution: Change the size of the biggest message in the created queue.
| #define LOS_ERRNO_QUEUE_TIMEOUT LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x07) |
Queue error code: The time set for waiting to processing the queue expires.
Value: 0x02000607.
Solution: Check whether the expiry time setting is appropriate.
| #define LOS_ERRNO_QUEUE_WRITE_IN_INTERRUPT LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x09) |
Queue error code: The queue cannot be written during an interrupt when the time for waiting to processing the queue expires.
Value: 0x02000609.
Solution: Set the expiry time to the never-waiting mode, or use asynchronous queues.
| #define LOS_ERRNO_QUEUE_WRITE_PTR_NULL LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x12) |
Queue error code: The pointer passed in during queue writing is null.
Value: 0x02000612.
Solution: Check whether the passed-in pointer is null.
| #define LOS_ERRNO_QUEUE_WRITE_SIZE_TOO_BIG LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x15) |
Queue error code: The buffer size passed in during queue writing is bigger than the queue size.
Value: 0x02000615.
Solution: Decrease the buffer size, or use a queue in which nodes are bigger.
| #define LOS_ERRNO_QUEUE_WRITESIZE_ISZERO LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x13) |
Queue error code: The buffer size passed in during queue writing is 0.
Value: 0x02000613.
Solution: Pass in a correct buffer size.
| typedef struct tagQueueInfo QUEUE_INFO_S |
Structure of the block for queue information query
Delete a queue.
| queueId | [IN] Queue ID created by LOS_QueueCreate or LOS_QueueCreateStatic. The value range is [0, LOSCFG_BASE_IPC_QUEUE_LIMIT - 1]. |
| LOS_OK | The queue is successfully deleted. |
| LOS_NOK | Failed to release the queue memory. |
| LOS_ERRNO_QUEUE_NOT_FOUND | The queue cannot be found. |
| LOS_ERRNO_QUEUE_NOT_CREATE | The queue handle passed in when the queue is being deleted is incorrect. |
| LOS_ERRNO_QUEUE_IN_TSKUSE | The queue that blocks a task cannot be deleted. |
| LOS_ERRNO_QUEUE_IN_TSKWRITE | Queue reading and writing are not synchronous. |
|
extern |
Obtain queue information.
| queueId | [IN] Queue ID created by LOS_QueueCreate or LOS_QueueCreateStatic. The value range is [0, LOSCFG_BASE_IPC_QUEUE_LIMIT - 1]. |
| queueInfo | [OUT] The queue information to be read must not be null. |
| LOS_OK | The queue information is successfully obtained. |
| LOS_ERRNO_QUEUE_PTR_NULL | The pointer to the queue information to be obtained is null. |
| LOS_ERRNO_QUEUE_INVALID | The handle of the queue that is being read is invalid. |
| LOS_ERRNO_QUEUE_NOT_CREATE | The queue in which the information to be obtained is stored is not created. |
|
extern |
Read a queue.
| queueId | [IN] Queue ID created by LOS_QueueCreate or LOS_QueueCreateStatic. The value range is [0, LOSCFG_BASE_IPC_QUEUE_LIMIT - 1]. |
| bufferAddr | [OUT] Starting address that stores the obtained data. The starting address must not be null. |
| bufferSize | [IN] Passed-in buffer size,The value must be greater than sizeof(CHAR*). |
| timeout | [IN] Expiry time. The value range is [0,LOS_WAIT_FOREVER](unit: Tick). |
| LOS_OK | The queue is successfully read. |
| LOS_ERRNO_QUEUE_INVALID | The handle of the queue that is being read is invalid. |
| LOS_ERRNO_QUEUE_READ_PTR_NULL | The pointer passed in during queue reading is null. |
| LOS_ERRNO_QUEUE_READ_IN_INTERRUPT | The queue cannot be read during an interrupt when the time for waiting to processing the queue expires. |
| LOS_ERRNO_QUEUE_NOT_CREATE | The queue to be read is not created. |
| LOS_ERRNO_QUEUE_ISEMPTY | No resource is in the queue that is being read when the time for waiting to processing the queue expires. |
| LOS_ERRNO_QUEUE_PEND_IN_LOCK | The task is forbidden to be blocked on a queue when the task is locked. |
| LOS_ERRNO_QUEUE_TIMEOUT | The time set for waiting to processing the queue expires. |
|
extern |
Read a queue.
| queueId | [IN] Queue ID created by LOS_QueueCreate or LOS_QueueCreateStatic. The value range is [0, LOSCFG_BASE_IPC_QUEUE_LIMIT - 1]. |
| bufferAddr | [OUT] Starting address that stores the obtained data. The starting address must not be null. |
| bufferSize | [IN/OUT] Where to maintain the buffer wanted-size before read, and the real-size after read. |
| timeout | [IN] Expiry time. The value range is [0,LOS_WAIT_FOREVER](unit: Tick). |
| LOS_OK | The queue is successfully read. |
| LOS_ERRNO_QUEUE_INVALID | The handle of the queue that is being read is invalid. |
| LOS_ERRNO_QUEUE_READ_PTR_NULL | The pointer passed in during queue reading is null. |
| LOS_ERRNO_QUEUE_READ_IN_INTERRUPT | The queue cannot be read during an interrupt when the time for waiting to processing the queue expires. |
| LOS_ERRNO_QUEUE_NOT_CREATE | The queue to be read is not created. |
| LOS_ERRNO_QUEUE_ISEMPTY | No resource is in the queue that is being read when the time for waiting to processing the queue expires. |
| LOS_ERRNO_QUEUE_PEND_IN_LOCK | The task is forbidden to be blocked on a queue when the task is locked. |
| LOS_ERRNO_QUEUE_TIMEOUT | The time set for waiting to processing the queue expires. |
| LOS_ERRNO_QUEUE_READ_SIZE_TOO_SMALL | The buffer size passed in during queue reading is less than the queue size. |
|
extern |
Write data into a queue.
| queueId | [IN] Queue ID created by LOS_QueueCreate or LOS_QueueCreateStatic. The value range is [0, LOSCFG_BASE_IPC_QUEUE_LIMIT - 1]. |
| bufferAddr | [IN] Starting address that stores the data to be written. The starting address must not be null. |
| bufferSize | [IN] This parameter is not in use temporarily. |
| timeout | [IN] Expiry time. The value range is [0,LOS_WAIT_FOREVER](unit: Tick). |
| LOS_OK | The data is successfully written into the queue. |
| LOS_ERRNO_QUEUE_INVALID | The queue handle passed in during queue writing is invalid. |
| LOS_ERRNO_QUEUE_WRITE_PTR_NULL | The pointer passed in during queue writing is null. |
| LOS_ERRNO_QUEUE_WRITESIZE_ISZERO | The buffer size passed in during queue writing is 0. |
| LOS_ERRNO_QUEUE_WRITE_IN_INTERRUPT | The queue cannot be written during an interrupt when the time for waiting to processing the queue expires. |
| LOS_ERRNO_QUEUE_NOT_CREATE | The queue into which the data is written is not created. |
| LOS_ERRNO_QUEUE_WRITE_SIZE_TOO_BIG | The buffer size passed in during queue writing is bigger than the queue size. |
| LOS_ERRNO_QUEUE_ISFULL | No free node is available during queue writing. |
| LOS_ERRNO_QUEUE_PEND_IN_LOCK | The task is forbidden to be blocked on a queue when the task is locked. |
| LOS_ERRNO_QUEUE_TIMEOUT | The time set for waiting to processing the queue expires. |
|
extern |
Write data into a queue.
| queueId | [IN] Queue ID created by LOS_QueueCreate or LOS_QueueCreateStatic. The value range is [0, LOSCFG_BASE_IPC_QUEUE_LIMIT - 1]. |
| bufferAddr | [IN] Starting address that stores the data to be written.The starting address must not be null. |
| bufferSize | [IN] Passed-in buffer size. The value range is [1,USHRT_MAX - sizeof(UINT32)]. |
| timeout | [IN] Expiry time. The value range is [0,LOS_WAIT_FOREVER](unit: Tick). |
| LOS_OK | The data is successfully written into the queue. |
| LOS_ERRNO_QUEUE_INVALID | The queue handle passed in during queue writing is invalid. |
| LOS_ERRNO_QUEUE_WRITE_PTR_NULL | The pointer passed in during queue writing is null. |
| LOS_ERRNO_QUEUE_WRITESIZE_ISZERO | The buffer size passed in during queue writing is 0. |
| LOS_ERRNO_QUEUE_WRITE_IN_INTERRUPT | The queue cannot be written during an interrupt when the time for waiting to processing the queue expires. |
| LOS_ERRNO_QUEUE_NOT_CREATE | The queue into which the data is written is not created. |
| LOS_ERRNO_QUEUE_WRITE_SIZE_TOO_BIG | The buffer size passed in during queue writing is bigger than the queue size. |
| LOS_ERRNO_QUEUE_ISFULL | No free node is available during queue writing. |
| LOS_ERRNO_QUEUE_PEND_IN_LOCK | The task is forbidden to be blocked on a queue when the task is locked. |
| LOS_ERRNO_QUEUE_TIMEOUT | The time set for waiting to processing the queue expires. |
|
extern |
Write data into a queue header.
| queueId | [IN] Queue ID created by LOS_QueueCreate or LOS_QueueCreateStatic. The value range is [0, LOSCFG_BASE_IPC_QUEUE_LIMIT - 1]. |
| bufferAddr | [OUT] Starting address that stores the data to be written. The starting address must not be null. |
| bufferSize | [IN] This parameter is not in use temporarily. |
| timeout | [IN] Expiry time. The value range is [0,LOS_WAIT_FOREVER](unit: Tick). |
| LOS_OK | The data is successfully written into the queue. |
| LOS_ERRNO_QUEUE_INVALID | The queue handle passed in during queue writing is invalid. |
| LOS_ERRNO_QUEUE_WRITE_PTR_NULL | The pointer passed in during queue writing is null. |
| LOS_ERRNO_QUEUE_WRITESIZE_ISZERO | The buffer size passed in during queue writing is 0. |
| LOS_ERRNO_QUEUE_WRITE_IN_INTERRUPT | The queue cannot be written during an interrupt when the time for waiting to processing the queue expires. waiting to processing the queue expires. |
| LOS_ERRNO_QUEUE_NOT_CREATE | The queue into which the data is written is not created. |
| LOS_ERRNO_QUEUE_WRITE_SIZE_TOO_BIG | The buffer size passed in during queue writing is bigger than the queue size. |
| LOS_ERRNO_QUEUE_ISFULL | No free node is available during queue writing. |
| LOS_ERRNO_QUEUE_PEND_IN_LOCK | The task is forbidden to be blocked on a queue when the task is locked. |
| LOS_ERRNO_QUEUE_TIMEOUT | The time set for waiting to processing the queue expires. |
|
extern |
Write data into a queue header.
| queueId | [IN] Queue ID created by LOS_QueueCreate or LOS_QueueCreateStatic. The value range is [0, LOSCFG_BASE_IPC_QUEUE_LIMIT - 1]. |
| bufferAddr | [OUT] Starting address that stores the data to be written. The starting address must not be null. |
| bufferSize | [IN] Passed-in buffer size, which must not be 0. The value range is [1,0xffffffff]. |
| timeout | [IN] Expiry time. The value range is [0,LOS_WAIT_FOREVER](unit: Tick). |
| LOS_OK | The data is successfully written into the queue. |
| LOS_ERRNO_QUEUE_INVALID | The queue handle passed in during queue writing is invalid. |
| LOS_ERRNO_QUEUE_WRITE_PTR_NULL | The pointer passed in during queue writing is null. |
| LOS_ERRNO_QUEUE_WRITESIZE_ISZERO | The buffer size passed in during queue writing is 0. |
| LOS_ERRNO_QUEUE_WRITE_IN_INTERRUPT | The queue cannot be written during an interrupt when the time for waiting to processing the queue expires. |
| LOS_ERRNO_QUEUE_NOT_CREATE | The queue into which the data is written is not created. |
| LOS_ERRNO_QUEUE_WRITE_SIZE_TOO_BIG | The buffer size passed in during queue writing is bigger than the queue size. |
| LOS_ERRNO_QUEUE_ISFULL | No free node is available during queue writing. |
| LOS_ERRNO_QUEUE_PEND_IN_LOCK | The task is forbidden to be blocked on a queue when the task is locked. |
| LOS_ERRNO_QUEUE_TIMEOUT | The time set for waiting to processing the queue expires. |