Pool di messaggi
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Questo modulo include l'astrazione della piattaforma per il pool di messaggi.
Riepilogo
Typedef |
|
|---|---|
otMessageBuffer
|
typedefstruct otMessageBuffer
Rappresenta un buffer dei messaggi OpenThread. |
Funzioni |
|
|---|---|
otPlatMessagePoolFree(otInstance *aInstance, otMessageBuffer *aBuffer)
|
void
Viene utilizzato per liberare un buffer nel pool gestito dalla piattaforma.
|
otPlatMessagePoolInit(otInstance *aInstance, uint16_t aMinNumFreeBuffers, size_t aBufferSize)
|
void
Inizializzare il pool di messaggi implementato dalla piattaforma.
|
otPlatMessagePoolNew(otInstance *aInstance)
|
Alloca un buffer dal pool gestito dalla piattaforma.
|
otPlatMessagePoolNumFreeBuffers(otInstance *aInstance)
|
uint16_t
Ottieni il numero di buffer senza costi.
|
Strutture |
|
|---|---|
| otMessageBuffer |
Rappresenta un buffer dei messaggi OpenThread. |
Typedef
otMessageBuffer
struct otMessageBuffer otMessageBuffer
Rappresenta un buffer dei messaggi OpenThread.
Funzioni
otPlatMessagePoolFree
void otPlatMessagePoolFree(
otInstance *aInstance,
otMessageBuffer *aBuffer
)
Viene utilizzato per liberare un buffer nel pool gestito dalla piattaforma.
Viene utilizzato quando OPENTHREAD_CONFIG_PLATFORM_MESSAGE_MANAGEMENT è abilitato.
| Dettagli | |||||
|---|---|---|---|---|---|
| Parametri |
|
||||
otPlatMessagePoolInit
void otPlatMessagePoolInit(
otInstance *aInstance,
uint16_t aMinNumFreeBuffers,
size_t aBufferSize
)
Inizializzare il pool di messaggi implementato dalla piattaforma.
Viene utilizzato quando OPENTHREAD_CONFIG_PLATFORM_MESSAGE_MANAGEMENT è abilitato.
| Dettagli | |||||||
|---|---|---|---|---|---|---|---|
| Parametri |
|
||||||
otPlatMessagePoolNew
otMessageBuffer * otPlatMessagePoolNew(
otInstance *aInstance
)
Alloca un buffer dal pool gestito dalla piattaforma.
Viene utilizzato quando OPENTHREAD_CONFIG_PLATFORM_MESSAGE_MANAGEMENT è abilitato.
L'istanza di buffer restituita DEVE avere almeno aBufferSize byte (come specificato in otPlatMessagePoolInit()).
| Dettagli | |||
|---|---|---|---|
| Parametri |
|
||
| Restituisce |
Un puntatore al buffer o NULL se non sono disponibili buffer.
|
||
otPlatMessagePoolNumFreeBuffers
uint16_t otPlatMessagePoolNumFreeBuffers(
otInstance *aInstance
)
Ottieni il numero di buffer senza costi.
Viene utilizzato quando OPENTHREAD_CONFIG_PLATFORM_MESSAGE_MANAGEMENT è abilitato.
| Dettagli | |||
|---|---|---|---|
| Parametri |
|
||
| Restituisce |
Il numero di buffer attualmente liberi e disponibili per OpenThread.
|
||
Risorse
Gli argomenti di riferimento dell'API OpenThread provengono dal codice sorgente, disponibile su GitHub. Per saperne di più o per contribuire alla nostra documentazione, consulta la sezione Risorse.