This file defines sync queue platform abstraction interface.
More...
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
Go to the source code of this file.
|
|
typedef struct iotmiPal_SyncQueue * | iotmiPal_SyncQueueHandle_t |
| |
|
| iotmiPal_SyncQueueHandle_t | iotmiPal_syncQueueCreate (uint32_t numberOfQueueItems, size_t queueItemSize) |
| | Platform queue create API.
|
| |
| void | iotmiPal_syncQueueDelete (iotmiPal_SyncQueueHandle_t syncQueueHandle) |
| | Platform queue delete API.
|
| |
| bool | iotmiPal_syncQueueSend (iotmiPal_SyncQueueHandle_t syncQueueHandle, void *pQueueItemToSend, uint32_t blockTimeMs) |
| | Platform queue send API.
|
| |
| bool | iotmiPal_syncQueueReceive (iotmiPal_SyncQueueHandle_t syncQueueHandle, void *pvBuffer, uint32_t blockTimeMs) |
| | Platform queue receive API.
|
| |
This file defines sync queue platform abstraction interface.
◆ iotmiPal_syncQueueCreate()
| iotmiPal_SyncQueueHandle_t iotmiPal_syncQueueCreate |
( |
uint32_t |
numberOfQueueItems, |
|
|
size_t |
queueItemSize |
|
) |
| |
Platform queue create API.
- Parameters
-
| [in] | numberOfQueueItems | Maximum number of queue item can be enqueued. |
| [in] | queueItemSize | Size of the queue item. |
- Returns
- Handle to the created iotmiPal_SyncQueue structure on success. NULL on failure to indicate queue creation failure.
◆ iotmiPal_syncQueueDelete()
| void iotmiPal_syncQueueDelete |
( |
iotmiPal_SyncQueueHandle_t |
syncQueueHandle | ) |
|
Platform queue delete API.
- Parameters
-
| syncQueueHandle | Handle to the iotmiPal_SyncQueue structure to be deleted. |
◆ iotmiPal_syncQueueReceive()
| bool iotmiPal_syncQueueReceive |
( |
iotmiPal_SyncQueueHandle_t |
syncQueueHandle, |
|
|
void * |
pvBuffer, |
|
|
uint32_t |
blockTimeMs |
|
) |
| |
Platform queue receive API.
- Parameters
-
| [in] | syncQueueHandle | Handle to the iotmiPal_SyncQueue structure. |
| [in] | pvBuffer | pointer to buffer for receiving from queue. |
| [in] | blockTimeMs | Maximum block time to send the item in miliseconds. |
- Returns
- true to indicate receive from queue success. false to indicate failure.
◆ iotmiPal_syncQueueSend()
| bool iotmiPal_syncQueueSend |
( |
iotmiPal_SyncQueueHandle_t |
syncQueueHandle, |
|
|
void * |
pQueueItemToSend, |
|
|
uint32_t |
blockTimeMs |
|
) |
| |
Platform queue send API.
- Parameters
-
| [in] | syncQueueHandle | Handle to the iotmiPal_SyncQueue structure. |
| [in] | pQueueItemToSend | pointer to queue item to be sent. |
| [in] | blockTimeMs | Maximum block time to send the item in miliseconds. |
- Returns
- true to indicate send to queue success. false to indicate failure.