17#include "tuya_cloud_types.h"
25 unsigned int queUnitSize;
26 unsigned int queTolNum;
27 unsigned int queCurNum;
28 unsigned char *queData;
30 unsigned char *queOut;
queue data structure define
Definition: uni_queue.h:24
Common process - adapter the mutex api provide by OS
void ReleaseQueueObj(P_QUEUE_CLASS pQueObj)
release the queue
unsigned char ClearQueue(P_QUEUE_CLASS pQueObj)
clear all unit of the queue
unsigned int GetCurFreeQueNum(P_QUEUE_CLASS pQueObj)
get the free queue unit number
unsigned char InQueue(P_QUEUE_CLASS pQueObj, const unsigned char *pQueUnit, const unsigned int queNum)
unit inqueue
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
unsigned int GetCurQueNum(P_QUEUE_CLASS pQueObj)
get the queue unit number
unsigned char OutQueue(P_QUEUE_CLASS pQueObj, unsigned char *pQueUnit, const unsigned int queNum)
unit outqueue
unsigned char DelQueueMember(P_QUEUE_CLASS pQueObj, const unsigned int queNum)
delete the unit from the queue out position
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
P_QUEUE_CLASS CreateQueueObj(const unsigned int queTolNum, const unsigned int queUnitSize)
create and initialize a queue