Msg_fails event, Syntax, Example – Echelon Neuron C User Manual

Page 28: Msg_succeeds event

Advertising
background image

8

Predefined Events

}

msg_fails

Event

The msg_fails event evaluates to TRUE when a message fails to be acknowledged

after all retries have been attempted. This event can be qualified by a specific

message tag.

Checking the completion event (msg_completes, or msg_fails in combination with

msg_succeeds) is optional by message tag. If a program checks for either the
msg_succeeds or msg_fails event for a given message tag, it must check for

both

events for that tag. The alternative is to check only for msg_completes.

Syntax

msg_fails [(

message-tag

)]

message-tag

An optional message tag. If this field is omitted, the

event is TRUE for any message.

Example

msg_tag tag_out;

...
msg_out.tag = tag_out;
msg_send();
...

when (msg_fails(tag_out))
{
...
}

msg_succeeds

Event

The msg_succeeds event evaluates to TRUE when a message is successfully sent

(see the

Neuron C Programmer's Guide

for the definition of success). This event

can be qualified by a specific message tag.
Checking the completion event (msg_completes, or msg_fails in combination with
msg_succeeds) is optional by message tag. If a program checks for either the

msg_succeeds or msg_fails event for a given message tag, it must check for

both

events for that tag. The alternative is to check only for msg_completes.

Syntax

msg_succeeds [(

message-tag

)]

message-tag

An optional message tag. If this field is omitted, the

event is TRUE for any message.

Example

msg_tag tag_out;

Advertising