Lonbridge api, General message format – Echelon LonBridg Server User Manual

Page 30

Advertising
background image

24

LonBridge API

LonBridge API

The communications between the LonBridge Server and various LonBridge

applications uses the LonBridge API. This API consists of XML strings
(commands) passed as messages between the LonBridge Server and a LonBridge

application.
Each message is a well-formed XML string with a <lon> element as the top-most
element.
Table 3 lists the commands that form the LonBridge API.

Table 3. LonBridge API Commands

Command

Message Type Description

<discover>

Output

Instructs the LonBridge Server to perform device
discovery

<error>

Input

Allows the LonBridge application to specify error
conditions

<get>

Output

Retrieves an object and its attributes with
optional matching criteria

<is>

Input

Announces the current value of the attributes for
a device

<is_new>

Input

Announces new devices

<is_pending> Input

Announces the value of an object before any

change has occurred

<lon>

Input or

Output

Defines the LonBridge XML message

<set>

Output

Modifies one or more objects

General Message Format

Each XML element that defines a message (that is, all elements other than the

<lon> element) can use either of the following formats for the element name:

• Element name (for example, <get>)
• Object name concatenated with the element name (for example,

<o1.get>)

The

object.element

message format allows you to send the message to a specific

device. Object names must start with the letter

o

plus a number. This number is

the ID (id attribute) specified for the device by LonBridge. A <get> message

Advertising