Creating a lonbridge device class file – Echelon LonBridg Server User Manual

Page 49

Advertising
background image

LonBridge Server User’s Guide

43

<attribute name="state" enum="true">
<enum input="on" output="1" />
<enum input="off" output="0" />
</attribute>
</byte>
</nv>
<nv index="2" direction="output">
<byte index="0">
<attribute name="state" enum="true" scale="100">
<enum input="2" output="off" />
<enum input="3" output="on" />
<enum input="11" output="return" />
<enum input="12" output="return" />
</attribute>
</byte>
<byte index="1">
<attribute name="brightness" scale="50"/>
</byte>
</nv>
<nv index="5" direction="output" size="2">
<byte index="0">
<attribute name="power" scale="10" length="2" />
</byte>
</nv>
<nv index="7" direction="output" size="2">
<byte index="0">
<attribute name="energy_hi" scale="100"
length="2" />
</byte>
</nv>
<nv index="8" direction="output" size="2">
<byte index="0">
<attribute name="energy_lo" scale="100"
length="2" />
</byte>
</nv>
</nvs>
</device>

Creating a LonBridge Device Class File

A LonBridge device class file represents the device interface for a LonBridge
application. This interface can be the same as, or different from, the device’s

interface. The device’s interface is defined by its source files (Neuron C files for
Neuron-hosted devices or model files for ShortStack devices). These files define

the functional blocks, network variables, and configuration properties for the

L

ON

W

ORKS

device; for Neuron-hosted devices, these files also define the device’s

behavior. You use a tool such as the NodeBuilder Development Tool or the Mini

EVK to develop and manage these files. For a LonBridge device class file, you

can use any appropriate development tool or code editor.

To create a device class file:

1. Examine the L

ON

W

ORKS

device’s interface as defined by its source files.

This interface includes the device’s network variable definitions.

Advertising