Echelon Neuron C Uživatelský manuál Strana 133

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 267
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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();
Zobrazit stránku 132
1 2 ... 128 129 130 131 132 133 134 135 136 137 138 ... 266 267

Komentáře k této Příručce

Žádné komentáře