Define <attribute> elements, Determine needed network variables – Echelon LonBridg Server User Manual

Page 51

Advertising
background image

LonBridge Server User’s Guide

45


network output polled SNVT_power nvoPower
nv_properties {
cpPwrSendOnDelta
};

network input const SCPTenergyCntInit cp cp_info(device_specific)
cpEnergyCntInit;
network output eeprom SNVT_elec_kwh nvoEnergyHi
nv_properties {
cpEnergyCntInit
};
network output SNVT_elec_whr nvoEnergyLo;

network output SNVT_multiplier_s nvoMultiplierFb =
DEFAULT_MULTIPLIER;

network input far const SCPTrunHrInit cp cp_info(device_specific)
cpRunHrInit;
network output SNVT_elapsed_tm nvoRunHours
nv_properties {
cpRunHrInit
};

network output SNVT_count nvoConnSize = 0;

After you are familiar with the device’s interface, you need to determine how

much of that interface a LonBridge application requires. Thus, the next step is to
define the attributes within the device class file.

Define <attribute> Elements

Because the simplified Lamp Module only manages the lamp’s state and power

use, the device class file needs to define two attributes:

<attributes>
<attribute name="state">
...
</attribute>
<attribute name="power">
...
</attribute>
</attributes>

The next step is to determine which network variables match these attributes.

Determine Needed Network Variables

The LonBridge application for the simplified Lamp Module will manage the

lamp’s state and power use. Although the Neuron C source file for the device

includes definitions for a number of network variables, the device class file for
the simplified Lamp Module only needs to include the following three network

variables:

network input SNVT_switch_2 nviValue;

network output polled SNVT_switch_2 nvoValueFb
nv_properties {
cpMinSendTime
};

Advertising