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

Page 37: Timer_expires event

Advertising
background image

Neuron C Reference Guide

17

Syntax

reset

Example

when (reset)
{
// initialize peripheral devices, and so on
}

resp_arrives

Event

The resp_arrives event evaluates to TRUE when a response arrives. This event
can be qualified by a specific message tag.

Syntax

resp_arrives [(

message-tag

)]

message-tag

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

event is TRUE for receipt of any response message.

Example

msg_tag tag_out;

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

when (resp_arrives(tag_out))
{
...
}

timer_expires

Event

The timer_expires event evaluates to TRUE when a previously declared timer

object expires. If the

timer_name

option is not included, the event is an

unqualified timer_expires event. Unlike all other predefined events, which are

TRUE only once per occurrence, the unqualified timer_expires event remains

TRUE as long as any timer object has expired. This event can be cleared only by
checking for specific timer expiration events.

Syntax

timer_expires [(

timer-name

)]

timer-name

An optional timer object. If this field is omitted, the event
is TRUE as long as any timer object has expired.

Advertising