Layers of neuron software, Implicit messages: network variables – Echelon Neuron C User Manual
Page 131

Neuron C Programmer’s Guide
119
Layers of Neuron Software
When you use network variables in a program, the actual building and sending of
messages takes place behind the scenes. This is called
implicit
messaging. As
shown in Figure 11, three layers of software are involved: the application layer
(which includes the scheduler), the network layer, and the Media Access Control
(MAC) layer. Each of these layers of software corresponds to one or more layers
of the LonTalk protocol and is handled by a separate processor on a Neuron Chip
or Smart Transceiver.
Only one of these layers, the application layer, can be programmed. Your
program also has access to some of the information provided by the network layer
through the services of the scheduler, as described later in this chapter.
Application
Scheduler
Network
MAC
Hardware
Sender Device (writer)
Application
Scheduler
Network
MAC
Hardware
Receiver Device (reader)
= data
Figure 11. Sending a Message
Implicit Messages: Network Variables
Figure 11 illustrates what happens when a device assigns a value to an output
network variable. First, the application program assigns a value to the network
variable. The scheduler then builds a network variable message and passes the
message to the network layer. The network layer adds addressing information to
the network variable message and then passes the message to the MAC layer.
The MAC layer adds more information to the network variable message, and
then sends the message over the communications channel.
When a device receives the network variable message, the message is
unpackaged, as follows. First, the MAC layer validates the message. The
network layer then checks the addressing information contained in the message
to see if it is intended for this device. If it is, it passes the network variable
information to the scheduler. The scheduler then makes the new value available
to the appropriate task within the application program.
These messages are referred to as
implicit messages
because they are sent and
received automatically. Application messages are also referred to as
explicit
messages
.