Echelon Neuron C Manual do Utilizador Página 133

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 267
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 132
Neuron C Reference Guide 113
}
}
msg_cancel( ) Built-in Function
The msg_cancel( ) built-in function cancels the message currently being built and
frees the associated buffer, allowing another message to be constructed.
If a message is constructed but not sent before the critical section (for example, a
task) is exited, the message is automatically cancelled. This function is used to
cancel both priority and nonpriority messages.
See Chapter 6,
How Devices Communicate Using Application Messages,
in the
Neuron C Programmer's Guide
for more information about application messages.
Syntax
void
msg_cancel (void);
Example
void f(void)
{
if (msg_alloc()) {
...
if (offline()) {
// Requested to go offline
msg_cancel();
} else {
msg_send();
}
}
}
msg_free( ) Built-in Function
The msg_free( ) built-in function frees the msg_in object for an incoming
message.
See Chapter 6,
How Devices Communicate Using Application Messages,
in the
Neuron C Programmer's Guide
for more information about application messages.
Syntax
void
msg_free (void);
Example
void f(void)
{
...
if (msg_receive()) {
// Process message
...
msg_free();
Vista de página 132
1 2 ... 128 129 130 131 132 133 134 135 136 137 138 ... 266 267

Comentários a estes Manuais

Sem comentários