AM263Px MCU+ SDK: Enet Queue API

| AM263Px MCU+ SDK 26.00.00 |

Data Structures | Functions
Enet Queue API
APIs for Networking modules » APIs for Enet LLD

## Introduction

## Data Structures
struct | EnetQ_Node
| A generic node structure for a single link list. More...
struct | EnetQ
| Generic queue. More...

## Functions
void | EnetQueue_initQ (EnetQ *queue)
| Init queue. More...
void | EnetQueue_copyQ (EnetQ *dstQueue, const EnetQ *srcQueue)
| Copy queues. More...
void | EnetQueue_enq (EnetQ *queue, EnetQ_Node *node)
| Enqueue a packet into the queue. More...
void | EnetQueue_enqHead (EnetQ *queue, EnetQ_Node *node)
| Enqueue a packet at head into the queue. More...
EnetQ_Node * | EnetQueue_deq (EnetQ *queue)
| Dequeue a packet from the queue. More...
void | EnetQueue_append (EnetQ *dstQueue, EnetQ *srcQueue)
| Append queue. More...
uint32_t | EnetQueue_getQCount (EnetQ *queue)
| Get queue count. More...
void | EnetQueue_verifyQCount (EnetQ *queue)
| Checks queue corruption. More...

## Function Documentation

## ◆ EnetQueue_initQ()

void EnetQueue_initQ | ( | EnetQ * | queue | ) |

Init queue.

Initializes a queue.

Parameters

  queue | Queue pointer

## ◆ EnetQueue_copyQ()

void EnetQueue_copyQ | ( | EnetQ * | dstQueue,
|  | const EnetQ * | srcQueue
| ) |  |

Copy queues.

Copies queues. The copied queue will have the same head/tail pointers and count as the source queue.

Parameters

  dstQueue | Destination queue pointer
  srcQueue | Source queue pointer

## ◆ EnetQueue_enq()

void EnetQueue_enq | ( | EnetQ * | queue,
|  | EnetQ_Node * | node
| ) |  |

Enqueue a packet into the queue.

Enqueues a packet into the queue.

Parameters

  queue | Queue pointer
  node | Queue node pointer

## ◆ EnetQueue_enqHead()

void EnetQueue_enqHead | ( | EnetQ * | queue,
|  | EnetQ_Node * | node
| ) |  |

Enqueue a packet at head into the queue.

Enqueues a packet into head of queue.

Parameters

  queue | Queue pointer
  node | Queue node pointer

## ◆ EnetQueue_deq()

EnetQ_Node* EnetQueue_deq | ( | EnetQ * | queue | ) |

Dequeue a packet from the queue.

Dequeues a packet from the queue. A null pointer is returned if the queue was already empty.

Parameters

  queue | Queue pointer

Returns
  Queue node pointer or NULL if queue was empty

## ◆ EnetQueue_append()

void EnetQueue_append | ( | EnetQ * | dstQueue,
|  | EnetQ * | srcQueue
| ) |  |

Append queue.

Appends a packet queue into another queue. The packets in the source queue are queued to the tail of the destination queue.

Parameters

  dstQueue | Destination queue node pointer
  srcQueue | Source queue pointer

## ◆ EnetQueue_getQCount()

uint32_t EnetQueue_getQCount | ( | EnetQ * | queue | ) |

Get queue count.

Gets the number of packets in the queue.

Parameters

  queue | Queue pointer

Returns
  Number of packets in the queue

## ◆ EnetQueue_verifyQCount()

void EnetQueue_verifyQCount | ( | EnetQ * | queue | ) |

Checks queue corruption.

Debug API which verifies the queue memory corruption by checking queue count to actual elements in queue. Asserts if queue count doesn't match.

Parameters

  queue | Queue pointer