TuyaOS
结构体 | 类型定义 | 函数
uni_queue.h 文件参考

tuya common queue module 更多...

#include "tuya_cloud_types.h"
#include "tal_mutex.h"
uni_queue.h 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

结构体

struct  QUEUE_CLASS
 queue data structure define 更多...
 

类型定义

typedef struct QUEUE_CLASSP_QUEUE_CLASS
 

函数

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

函数说明

◆ ClearQueue()

unsigned char ClearQueue ( P_QUEUE_CLASS  pQueObj)

clear all unit of the queue

参数
[in]pQueObjthe 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]queTolNumthe total number of the queue
[in]queUnitSizethe 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]pQueObjthe queue handle
[in]queNumthe delete unit counts
返回
OPRT_OK on success, others on failed, please refer to tuya_error_code.h

◆ GetCurFreeQueNum()

unsigned int GetCurFreeQueNum ( P_QUEUE_CLASS  pQueObj)

get the free queue unit number

参数
[in]pQueObjthe queue handle
返回
the current free unit counts

◆ GetCurQueNum()

unsigned int GetCurQueNum ( P_QUEUE_CLASS  pQueObj)

get the queue unit number

参数
[in]pQueObjthe 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]pQueObjthe queue handle
[in]startthe outqueue start postion
[in]pQueUnitthe outqueue unit buffer
[in]queNumthe 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]pQueObjthe queue handle
[in]pQueUnitthe inqueue unit buffer
[in]queNumthe 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]pQueObjthe queue handle
[in]pQueUnitthe outqueue unit buffer
[in]queNumthe 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]pQueObjthe queue handle
[in]pQueDatathe queue unit buffer
[in]queTolNumthe total number of queue
[in]queUnitSizethe unit size of queue
返回
1 on success, 0 on failed
警告
this API was NOT USED!!!

◆ ReleaseQueueObj()

void ReleaseQueueObj ( P_QUEUE_CLASS  pQueObj)

release the queue

参数
[in]pQueObjthe queue handle