tuya common queue module
更多...
#include "tuya_cloud_types.h"
#include "tal_mutex.h"
浏览源代码.
|
unsigned char | ClearQueue (P_QUEUE_CLASS pQueObj) |
| clear all unit of the queue 更多...
|
|
P_QUEUE_CLASS | CreateQueueObj (const unsigned int queTolNum, const unsigned int queUnitSize) |
| create and initialize a queue 更多...
|
|
unsigned char | DelQueueMember (P_QUEUE_CLASS pQueObj, const unsigned int queNum) |
| delete the unit from the queue out position 更多...
|
|
unsigned int | GetCurFreeQueNum (P_QUEUE_CLASS pQueObj) |
| get the free queue unit number 更多...
|
|
unsigned int | GetCurQueNum (P_QUEUE_CLASS pQueObj) |
| get the queue unit number 更多...
|
|
unsigned char | GetQueueMember (P_QUEUE_CLASS pQueObj, const unsigned int start, unsigned char *pQueUnit, const unsigned int queNum) |
| get the unit from start postion, not outqueue 更多...
|
|
unsigned char | InQueue (P_QUEUE_CLASS pQueObj, const unsigned char *pQueUnit, const unsigned int queNum) |
| unit inqueue 更多...
|
|
unsigned char | OutQueue (P_QUEUE_CLASS pQueObj, unsigned char *pQueUnit, const unsigned int queNum) |
| unit outqueue 更多...
|
|
unsigned char | RegisterQueueObj (P_QUEUE_CLASS pQueObj, const unsigned char *pQueData, const unsigned int queTolNum, const unsigned int queUnitSize) |
| register a queue, the queue handle and queue buffer malloc from other place 更多...
|
|
void | ReleaseQueueObj (P_QUEUE_CLASS pQueObj) |
| release the queue 更多...
|
|
tuya common queue module
- 版本
- 1.0
- 日期
- 2019-10-30
- 版权所有
- Copyright (c) tuya.inc 2019
◆ ClearQueue()
clear all unit of the queue
- 参数
-
[in] | pQueObj | the queue handle |
- 返回
- OPRT_OK on success, others on failed, please refer to tuya_error_code.h
◆ CreateQueueObj()
P_QUEUE_CLASS CreateQueueObj |
( |
const unsigned int |
queTolNum, |
|
|
const unsigned int |
queUnitSize |
|
) |
| |
create and initialize a queue
- 参数
-
[in] | queTolNum | the total number of the queue |
[in] | queUnitSize | the unit size of the queue |
- 返回
- the queue handle
◆ DelQueueMember()
unsigned char DelQueueMember |
( |
P_QUEUE_CLASS |
pQueObj, |
|
|
const unsigned int |
queNum |
|
) |
| |
delete the unit from the queue out position
- 参数
-
[in] | pQueObj | the queue handle |
[in] | queNum | the delete unit counts |
- 返回
- OPRT_OK on success, others on failed, please refer to tuya_error_code.h
◆ GetCurFreeQueNum()
get the free queue unit number
- 参数
-
[in] | pQueObj | the queue handle |
- 返回
- the current free unit counts
◆ GetCurQueNum()
get the queue unit number
- 参数
-
[in] | pQueObj | the queue handle |
- 返回
- the current unit counts
◆ GetQueueMember()
unsigned char GetQueueMember |
( |
P_QUEUE_CLASS |
pQueObj, |
|
|
const unsigned int |
start, |
|
|
unsigned char * |
pQueUnit, |
|
|
const unsigned int |
queNum |
|
) |
| |
get the unit from start postion, not outqueue
- 参数
-
[in] | pQueObj | the queue handle |
[in] | start | the outqueue start postion |
[in] | pQueUnit | the outqueue unit buffer |
[in] | queNum | the outqueue unit counts |
- 返回
- OPRT_OK on success, others on failed, please refer to tuya_error_code.h
◆ InQueue()
unsigned char InQueue |
( |
P_QUEUE_CLASS |
pQueObj, |
|
|
const unsigned char * |
pQueUnit, |
|
|
const unsigned int |
queNum |
|
) |
| |
unit inqueue
- 参数
-
[in] | pQueObj | the queue handle |
[in] | pQueUnit | the inqueue unit buffer |
[in] | queNum | the inqueue unit counts |
- 返回
- 1 on success, 0 on failed
◆ OutQueue()
unsigned char OutQueue |
( |
P_QUEUE_CLASS |
pQueObj, |
|
|
unsigned char * |
pQueUnit, |
|
|
const unsigned int |
queNum |
|
) |
| |
unit outqueue
- 参数
-
[in] | pQueObj | the queue handle |
[in] | pQueUnit | the outqueue unit buffer |
[in] | queNum | the outqueue unit counts |
- 返回
- OPRT_OK on success, others on failed, please refer to tuya_error_code.h
◆ RegisterQueueObj()
unsigned char RegisterQueueObj |
( |
P_QUEUE_CLASS |
pQueObj, |
|
|
const unsigned char * |
pQueData, |
|
|
const unsigned int |
queTolNum, |
|
|
const unsigned int |
queUnitSize |
|
) |
| |
register a queue, the queue handle and queue buffer malloc from other place
- 参数
-
[in] | pQueObj | the queue handle |
[in] | pQueData | the queue unit buffer |
[in] | queTolNum | the total number of queue |
[in] | queUnitSize | the unit size of queue |
- 返回
- 1 on success, 0 on failed
- 警告
- this API was NOT USED!!!
◆ ReleaseQueueObj()
release the queue
- 参数
-
[in] | pQueObj | the queue handle |