Monitoring message monitor points – Echelon LNS User Manual
Page 239
LNS Programmer's Guide
225
Monitoring Message Monitor Points
The first step to take when monitoring application messages is to explicitly connect a
message tag on an application device to the msg_in tag on your application’s Network
Service Device. This will cause any messages sent by the device using the message tag to
be delivered to the Network Service Device. The second step is to create a message
monitor point to receive the messages. The message monitor point is used to inform LNS
that the application is interested in the message, based on the filtering criteria contained
in the point’s configuration, and to provide information to the application about the
message’s origin. Finally, the LNS application must open the monitor set containing the
message monitor point, and enable monitoring. After that, any qualifying message sent
by the application device using the bound message tag will generate an
OnMsgMonitorPointUpdateEvent
event.
It is important to understand that the messages being monitored must be addressed to
the Network Service Device, or the Network Service Device must be in the destination
address scope of the message. That is, the Network Service Device will only receive
messages addressed to itself using standard LonTalk addressing:
• By unicast addressing consisting of the domain/subnet/node Id of the Network
Service Device.
• By unicast addressing using the neuron ID of the Network Service Device.
• By multicast addressing, due to group membership
• By subnet broadcasting if the Network Service Device is member of the
destination subnet.
• By domain-wide broadcasts if the Network Service Device is member of the same
domain.
When a bound message tag connection is used for monitoring, the binding process
ensures that messages sent using the message tag will use addressing details that
ensure that the destination device will actually receive and process the message.
However, unbound input message tags can be used to monitor messages that meet the
above criteria. For example, the LNS application could monitor all messages that are
sent as a domain broadcast, without explicitly establishing a message tag connection.
If the
FilterBySource
monitoring options property is set to False, the monitor point
will receive messages without regard to which device sent the message. To restrict
messages received by a message monitor point to those sent by the device specified as the
targetDevice element when the monitor point was created, make sure that you set the
FilterBySource
property is set to True.
Every L
ON
W
ORKS
message contains a 1-byte message code. Only messages with the
following message codes can be monitored with the techniques described in this section:
• 0x00 – 0x3E: Application messages
• 0x40 – 0x4E: Foreign Frame messages
• 0x7F: Service Pin messages
Attempting to monitor messages with message codes other than the ones listed above
will result in no messages being reported.