Queue Class.
更多...
#include <cpp_queue.h>
|
kstat_t | create (const name_t *name, void *buf, size_t size, size_t max_msg) |
| This function will create a buf-queue 更多...
|
|
kstat_t | destory (void) |
| This function will delete a queue 更多...
|
|
kstat_t | send (void *msg, size_t size) |
| This function will send a msg at the end of queue 更多...
|
|
kstat_t | receive (void *msg, size_t *size, uint32_t millisec) |
| This function will receive msg form aqueue 更多...
|
|
kstat_t | flush (void) |
| This function will reset queue 更多...
|
|
kstat_t | info_get (kbuf_queue_info_t *info) |
| This function will get information of a queue 更多...
|
|
kbuf_queue_t * | self (void) |
| This function will get a Queue struct pointer 更多...
|
|
Queue Class.
在文件 cpp_queue.h 第 21 行定义.
◆ create()
kstat_t create |
( |
const name_t * |
name, |
|
|
void * |
buf, |
|
|
size_t |
size, |
|
|
size_t |
max_msg |
|
) |
| |
This function will create a buf-queue
- 参数
-
[in] | name | name of the queue |
[in] | buf | pointer to the buf |
[in] | size | size of the buf |
[in] | max_msg | max size of one msg |
- 返回
- the operation status, RHINO_SUCCESS is OK, others is error
◆ destory()
This function will delete a queue
- 参数
-
- 返回
- the operation status, RHINO_SUCCESS is OK, others is error
◆ flush()
This function will reset queue
- 参数
-
- 返回
- the operation status, RHINO_SUCCESS is OK, others is error
◆ info_get()
kstat_t info_get |
( |
kbuf_queue_info_t * |
info | ) |
|
This function will get information of a queue
- 参数
-
[out] | free | free size of the queue buf |
[out] | total | total size of the queue buf |
- 返回
- the operation status, RHINO_SUCCESS is OK, others is error
◆ receive()
kstat_t receive |
( |
void * |
msg, |
|
|
size_t * |
size, |
|
|
uint32_t |
millisec |
|
) |
| |
This function will receive msg form aqueue
- 参数
-
[out] | msg | pointer to the buf to save msg |
[out] | size | size of received msg |
[in] | millisec | millisec to wait before receiving msg |
- 返回
- the operation status, RHINO_SUCCESS is OK, others is error
◆ self()
kbuf_queue_t* self |
( |
void |
| ) |
|
This function will get a Queue struct pointer
- 参数
-
- 返回
- Queue struct pointer
◆ send()
kstat_t send |
( |
void * |
msg, |
|
|
size_t |
size |
|
) |
| |
This function will send a msg at the end of queue
- 参数
-
[in] | msg | pointer to msg to be send |
[in] | size | size of the msg |
- 返回
- the operation status, RHINO_SUCCESS is OK, others is error
该类的文档由以下文件生成:
- /Users/yaoqiuguo/workspace/aos33/components/cplusplus/include/cpp_queue.h