beautypg.com

Legacy neuron c constructs, Using authentication for network variables, Specifying the authentication key – Echelon FTXL User Manual

Page 56

background image

44

Creating a Model File

Legacy Neuron C Constructs

You must use the Neuron C Version 2.1 syntax described in this manual. You

cannot use legacy Neuron C constructs for defining L

ON

M

ARK

-compliant

interfaces. That is, you cannot use the config modifier for network variables, and

you cannot use Neuron C legacy syntax for declaring functional blocks or

configuration properties. The legacy syntax used an sd_string() modifier
containing a string that starts with a ‘&’ or ‘@’ character.

Using Authentication for Network Variables

Authentication is a special acknowledged service between one source device and

one or more (up to 63) destination devices. Authentication is used by the
destination devices to verify the identity of the source device. This type of service

is useful, for example, if a device containing an electronic lock receives a message
to open the lock. By using authentication, the electronic lock device can verify

that the “open” message comes from the owner, not from someone attempting to

break into the system.

Authentication doubles the number of messages per transaction. An

acknowledged message normally requires two messages: an update and an

acknowledgment. An authenticated message requires four messages, as shown
in Figure 8 on page 46. These extra messages can affect system response time

and capacity.
A device can use authentication with acknowledged updates or network variable
polls. However, a device cannot use authentication with unacknowledged or

repeated updates.
For a program to use authenticated network variables or send authenticated
messages, you must perform the following steps:

1. Declare the network variable as authenticated, or allow the network

management tool to specify that the network variable is to be

authenticated.

2. Specify the authentication key to be used for this device using a network

management tool, and enable authentication. You can use the LonMaker

Integration Tool to install a key during network integration, or your

application can use the LonQueryDomainConfig() and
LonUpdateDomainConfig() API functions to install a key locally.

Specifying the Authentication Key

All devices that read or write a given authenticated network variable connection

must have the same authentication key. This 48-bit authentication key is used
in a special way for authentication, as described in

How Authentication Works

on

page 45. If a device belongs to more than one domain, you must specify a

separate key for each domain.

The key itself is transmitted to the device only during the initial configuration.

All subsequent changes to the key do not involve sending it over the network.
The network management tool can modify a device’s key over the network, in a

secure fashion, with a network management message.