Pool di messaggi
Questo modulo include l'astrazione della piattaforma per il pool di messaggi.
Riepilogo
Typedef |
|
---|---|
otMessageBuffer
|
typedefstruct otMessageBuffer
Questa struttura rappresenta un buffer di messaggi OpenThread. |
Functions |
|
---|---|
otPlatMessagePoolFree(otInstance *aInstance, otMessageBuffer *aBuffer)
|
void
Questa funzione viene utilizzata per liberare un buffer nel pool di buffer gestito dalla piattaforma.
|
otPlatMessagePoolInit(otInstance *aInstance, uint16_t aMinNumFreeBuffers, size_t aBufferSize)
|
void
Inizializza il pool di messaggi implementato dalla piattaforma.
|
otPlatMessagePoolNew(otInstance *aInstance)
|
Alloca un buffer dal pool di buffer gestito dalla piattaforma.
|
otPlatMessagePoolNumFreeBuffers(otInstance *aInstance)
|
uint16_t
Calcola il numero di buffer gratuiti.
|
Punti ristoro |
|
---|---|
otMessageBuffer |
Questa struttura rappresenta un buffer di messaggi OpenThread. |
Typedef
otMessageBuffer
struct otMessageBuffer otMessageBuffer
Questa struttura rappresenta un buffer di messaggi OpenThread.
Functions
otPlatMessagePoolFree
void otPlatMessagePoolFree( otInstance *aInstance, otMessageBuffer *aBuffer )
Questa funzione viene utilizzata per liberare un buffer nel pool di buffer gestito dalla piattaforma.
Questa funzione viene utilizzata quando OPENTHREAD_CONFIG_PLATFORM_MESSAGE_MANAGEMENT
è abilitato.
Dettagli | |||||
---|---|---|---|---|---|
Parametri |
|
otPlatMessagePoolInit
void otPlatMessagePoolInit( otInstance *aInstance, uint16_t aMinNumFreeBuffers, size_t aBufferSize )
Inizializza il pool di messaggi implementato dalla piattaforma.
Questa funzione viene utilizzata quando OPENTHREAD_CONFIG_PLATFORM_MESSAGE_MANAGEMENT
è abilitato.
Dettagli | |||||||
---|---|---|---|---|---|---|---|
Parametri |
|
otPlatMessagePoolNuovo
otMessageBuffer * otPlatMessagePoolNew( otInstance *aInstance )
Alloca un buffer dal pool di buffer gestito dalla piattaforma.
Questa funzione viene utilizzata quando OPENTHREAD_CONFIG_PLATFORM_MESSAGE_MANAGEMENT
è abilitato.
L'istanza del buffer restituita DEVE avere almeno aBufferSize
byte (come specificato in otPlatMessagePoolInit()
).
Dettagli | |||
---|---|---|---|
Parametri |
|
||
Resi |
Un puntatore al buffer o NULL se non ci sono buffer disponibili.
|
otPlatMessagePoolNumFreeBuffers
uint16_t otPlatMessagePoolNumFreeBuffers( otInstance *aInstance )
Calcola il numero di buffer gratuiti.
Questa funzione viene utilizzata quando OPENTHREAD_CONFIG_PLATFORM_MESSAGE_MANAGEMENT
è abilitato.
Dettagli | |||
---|---|---|---|
Parametri |
|
||
Resi |
Il numero di buffer attualmente gratuiti e disponibili per OpenThread.
|
Risorse
Gli argomenti di riferimento dell'API OpenThread provengono dal codice sorgente, disponibile su GitHub. Per ulteriori informazioni, o per contribuire alla nostra documentazione, consulta la pagina Risorse.