mensagem
Este módulo inclui funções que manipulam buffers de mensagens OpenThread.
Resumo
Enumerações | |
---|---|
otMessagePriority { | enum Essa enumeração define os níveis de prioridade da mensagem OpenThread. |
Typedefs | |
---|---|
otBufferInfo | typedefstruct otBufferInfo Essa estrutura representa as informações do buffer de mensagem. |
otMessage | typedefstruct otMessage Essa estrutura aponta para um buffer de mensagem OpenThread. |
otMessagePriority | typedefenum otMessagePriority Essa enumeração define os níveis de prioridade da mensagem OpenThread. |
otMessageSettings | typedefstruct otMessageSettings Esta estrutura representa as configurações de uma mensagem. |
Funções | |
---|---|
otMessageAppend ( otMessage *aMessage, const void *aBuf, uint16_t aLength) | Acrescente bytes a uma mensagem. |
otMessageFree ( otMessage *aMessage) | void Libere um buffer de mensagem alocado. |
otMessageGetBufferInfo ( otInstance *aInstance, otBufferInfo *aBufferInfo) | void Obtenha as informações do Message Buffer. |
otMessageGetLength (const otMessage *aMessage) | uint16_t Obtenha o comprimento da mensagem em bytes. |
otMessageGetOffset (const otMessage *aMessage) | uint16_t Obtenha o deslocamento da mensagem em bytes. |
otMessageGetRss (const otMessage *aMessage) | int8_t Esta função retorna o RSS médio (intensidade do sinal recebido) associado à mensagem. |
otMessageIsLinkSecurityEnabled (const otMessage *aMessage) | bool Esta função indica se a segurança do link está ou não habilitada para a mensagem. |
otMessageQueueDequeue ( otMessageQueue *aQueue, otMessage *aMessage) | void Esta função remove uma mensagem da fila de mensagens fornecida. |
otMessageQueueEnqueue ( otMessageQueue *aQueue, otMessage *aMessage) | void Esta função adiciona uma mensagem ao final da fila de mensagens fornecida. |
otMessageQueueEnqueueAtHead ( otMessageQueue *aQueue, otMessage *aMessage) | void Esta função adiciona uma mensagem no início / frente da fila de mensagens fornecida. |
otMessageQueueGetHead ( otMessageQueue *aQueue) | Esta função retorna um ponteiro para a mensagem no início da fila. |
otMessageQueueGetNext ( otMessageQueue *aQueue, const otMessage *aMessage) | Esta função retorna um ponteiro para a próxima mensagem na fila, iterando para frente (do início ao fim). |
otMessageQueueInit ( otMessageQueue *aQueue) | void Inicialize a fila de mensagens. |
otMessageRead (const otMessage *aMessage, uint16_t aOffset, void *aBuf, uint16_t aLength) | uint16_t Leia bytes de uma mensagem. |
otMessageSetDirectTransmission ( otMessage *aMessage, bool aEnabled) | void Esta função define / força o encaminhamento da mensagem por meio de transmissão direta. |
otMessageSetLength ( otMessage *aMessage, uint16_t aLength) | Defina o comprimento da mensagem em bytes. |
otMessageSetOffset ( otMessage *aMessage, uint16_t aOffset) | void Defina o deslocamento da mensagem em bytes. |
otMessageWrite ( otMessage *aMessage, uint16_t aOffset, const void *aBuf, uint16_t aLength) | int Escreva bytes em uma mensagem. |
Structs | |
---|---|
otBufferInfo | Essa estrutura representa as informações do buffer de mensagem. |
otMessage | Essa estrutura aponta para um buffer de mensagem OpenThread. |
otMessageQueue | Esta estrutura representa uma fila de mensagens OpenThread. |
otMessageSettings | Esta estrutura representa as configurações de uma mensagem. |
Enumerações
otMessagePriority
otMessagePriority
Typedefs
otBufferInfo
struct otBufferInfo otBufferInfo
Essa estrutura representa as informações do buffer de mensagem.
otMessagePriority
enum otMessagePriority otMessagePriority
Essa enumeração define os níveis de prioridade da mensagem OpenThread.
otMessageSettings
struct otMessageSettings otMessageSettings
Esta estrutura representa as configurações de uma mensagem.
Funções
otMessageAppend
otError otMessageAppend( otMessage *aMessage, const void *aBuf, uint16_t aLength )
Acrescente bytes a uma mensagem.
Detalhes | |||||||
---|---|---|---|---|---|---|---|
Parâmetros |
| ||||||
Valores Retornados |
|
otMessageFree
otMessageGetLength
otMessageSetLength
otMessageGetOffset
otMessageSetOffset
otMessageRead
otMessageWrite
otMessageFree
void otMessageFree( otMessage *aMessage )
Libere um buffer de mensagem alocado.
Detalhes | |||
---|---|---|---|
Parâmetros |
|
otMessageAppend
otMessageGetLength
otMessageSetLength
otMessageGetOffset
otMessageSetOffset
otMessageRead
otMessageWrite
otMessageGetBufferInfo
void otMessageGetBufferInfo( otInstance *aInstance, otBufferInfo *aBufferInfo )
Obtenha as informações do Message Buffer.
Detalhes | |||||
---|---|---|---|---|---|
Parâmetros |
|
otMessageGetLength
uint16_t otMessageGetLength( const otMessage *aMessage )
Obtenha o comprimento da mensagem em bytes.
Detalhes | |||
---|---|---|---|
Parâmetros |
| ||
Devoluções | O comprimento da mensagem em bytes. |
otMessageFree
otMessageAppend
otMessageSetLength
otMessageGetOffset
otMessageSetOffset
otMessageRead
otMessageWrite
otMessageSetLength
otMessageGetOffset
uint16_t otMessageGetOffset( const otMessage *aMessage )
Obtenha o deslocamento da mensagem em bytes.
Detalhes | |||
---|---|---|---|
Parâmetros |
| ||
Devoluções | O valor do deslocamento da mensagem. |
otMessageFree
otMessageAppend
otMessageGetLength
otMessageSetLength
otMessageSetOffset
otMessageRead
otMessageWrite
otMessageGetRss
int8_t otMessageGetRss( const otMessage *aMessage )
Esta função retorna o RSS médio (intensidade do sinal recebido) associado à mensagem.
Detalhes | |
---|---|
Devoluções | O valor RSS médio (em dBm) ou OT_RADIO_RSSI_INVALID se nenhum RSS médio estiver disponível. |
otMessageIsLinkSecurityEnabled
bool otMessageIsLinkSecurityEnabled( const otMessage *aMessage )
Esta função indica se a segurança do link está ou não habilitada para a mensagem.
Detalhes | |||||
---|---|---|---|---|---|
Parâmetros |
| ||||
Valores Retornados |
|
otMessageQueueDequeue
void otMessageQueueDequeue( otMessageQueue *aQueue, otMessage *aMessage )
Esta função remove uma mensagem da fila de mensagens fornecida.
Detalhes | |||||
---|---|---|---|---|---|
Parâmetros |
|
otMessageQueueEnqueue
void otMessageQueueEnqueue( otMessageQueue *aQueue, otMessage *aMessage )
Esta função adiciona uma mensagem ao final da fila de mensagens fornecida.
Detalhes | |||||
---|---|---|---|---|---|
Parâmetros |
|
otMessageQueueEnqueueAtHead
void otMessageQueueEnqueueAtHead( otMessageQueue *aQueue, otMessage *aMessage )
Esta função adiciona uma mensagem no início / frente da fila de mensagens fornecida.
Detalhes | |||||
---|---|---|---|---|---|
Parâmetros |
|
otMessageQueueGetHead
otMessage * otMessageQueueGetHead( otMessageQueue *aQueue )
Esta função retorna um ponteiro para a mensagem no início da fila.
Detalhes | |||
---|---|---|---|
Parâmetros |
| ||
Devoluções | Um ponteiro para a mensagem no início da fila ou NULL se a fila estiver vazia. |
otMessageQueueGetNext
otMessage * otMessageQueueGetNext( otMessageQueue *aQueue, const otMessage *aMessage )
Esta função retorna um ponteiro para a próxima mensagem na fila, iterando para frente (do início ao fim).
Detalhes | |||||
---|---|---|---|---|---|
Parâmetros |
| ||||
Devoluções | Um ponteiro para a próxima mensagem na fila após aMessage ou NULL se aMessage is the tail of queue. NULL is returned if aMessage is not in the queue aQueue`. |
otMessageQueueInit
void otMessageQueueInit( otMessageQueue *aQueue )
Inicialize a fila de mensagens.
Esta função DEVE ser chamada uma vez e apenas uma vez para uma instância otMessageQueue
antes de qualquer outra função otMessageQueue
. O comportamento é indefinido se outras APIs de fila forem usadas com um otMessageQueue
antes de ser inicializado ou se for inicializado mais de uma vez.
Detalhes | |||
---|---|---|---|
Parâmetros |
|
otMessageRead
uint16_t otMessageRead( const otMessage *aMessage, uint16_t aOffset, void *aBuf, uint16_t aLength )
Leia bytes de uma mensagem.
Detalhes | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parâmetros |
| ||||||||
Devoluções | O número de bytes lidos. |
otMessageFree
otMessageAppend
otMessageGetLength
otMessageSetLength
otMessageGetOffset
otMessageSetOffset
otMessageWrite
otMessageSetDirectTransmission
void otMessageSetDirectTransmission( otMessage *aMessage, bool aEnabled )
Esta função define / força o encaminhamento da mensagem por meio de transmissão direta.
A configuração padrão para uma nova mensagem é false
.
Detalhes | |||||
---|---|---|---|---|---|
Parâmetros |
|
otMessageSetLength
otError otMessageSetLength( otMessage *aMessage, uint16_t aLength )
Defina o comprimento da mensagem em bytes.
Detalhes | |||||
---|---|---|---|---|---|
Parâmetros |
| ||||
Valores Retornados |
|
otMessageFree
otMessageAppend
otMessageGetLength
otMessageGetOffset
otMessageSetOffset
otMessageRead
otMessageWrite
otMessageSetOffset
void otMessageSetOffset( otMessage *aMessage, uint16_t aOffset )
Defina o deslocamento da mensagem em bytes.
Detalhes | |||||
---|---|---|---|---|---|
Parâmetros |
|
otMessageFree
otMessageAppend
otMessageGetLength
otMessageSetLength
otMessageGetOffset
otMessageRead
otMessageWrite
otMessageWrite
int otMessageWrite( otMessage *aMessage, uint16_t aOffset, const void *aBuf, uint16_t aLength )
Escreva bytes em uma mensagem.
Detalhes | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parâmetros |
| ||||||||
Devoluções | O número de bytes gravados. |
otMessageFree
otMessageAppend
otMessageGetLength
otMessageSetLength
otMessageGetOffset
otMessageSetOffset
otMessageRead