Msg_alloc( ) built-in function, Syntax, Example – Echelon Neuron C User Manual
Page 132: Msg_alloc_priority( ) built-in function
112
Functions
when (io_changes(io_push_button))
{
msec_delay(10); // Delay 10ms at any clock rate
debounced_button_state = (boolean)io_in(io_push_button);
}
msg_alloc( )
Built-in Function
The msg_alloc( ) built-in function allocates a nonpriority buffer for an outgoing
message. The function returns TRUE if a msg_out object can be allocated. The
function returns FALSE if a msg_out object cannot be allocated. When this
function returns FALSE, a program can continue with other processing, if
necessary, rather than waiting for a free message buffer.
See Chapter 6,
How Devices Communicate Using Application Messages,
in the
Neuron C Programmer's Guide
for more information about application messages.
Syntax
boolean
msg_alloc (void);
Example
void f(void)
{
if (msg_alloc()) {
// OK. Build and send message
...
}
}
msg_alloc_priority( )
Built-in Function
The msg_alloc_priority( ) built-in function allocates a priority buffer for an
outgoing message. The function returns TRUE if a priority msg_out object can be
allocated. The function returns FALSE if a priority msg_out object cannot be
allocated. When this function returns FALSE, a program can continue with
other processing, if desired, rather than waiting for a free priority buffer.
See Chapter 6,
How Devices Communicate Using Application Messages,
in the
Neuron C Programmer's Guide
for more information about application messages.
Syntax
boolean
msg_alloc_priority (void);
Example
void f(void)
{
if (msg_alloc_priority()) {
// OK. Build and send message
...