Acquiring a domain address – Echelon ISI User Manual

Page 23

Advertising
background image

21

ISI Programmer’s Guide

E

XAMPLE

1

The following example for a device without domain acquisition tests for
incoming ISI messages, and calls IsiProcessMsgS() to process them:

when (msg_arrives) {

if (IsiApproveMsg() && IsiProcessMsgS()) {

// TODO: process unprocessed ISI messages here (if any)

} else {

// TODO: process other application messages here (if any)

}
}

E

XAMPLE

2

The following partial DAS example tests for incoming ISI messages and
responses on a domain address server. For a complete implementation of a

DAS device, the IsiStartDas() and IsiTickDas() functions must also be called

at a minimum.

when (msg_arrives) {

if (IsiApproveMsgDas() && IsiProcessMsgDas()) {

// TODO: process unprocessed ISI messages here (if any)

} else {

// TODO: process other application messages here (if any)

}
}


when (resp_arrives) {
if (IsiProcessResponse()) {
// TODO: process unprocessed responses here (if any)
}
}

Acquiring a Domain Address

void IsiAcquireDomain(boolean

SharedServicePin

);

void IsiStartDeviceAcquisition(void);
void IsiCancelAcquisition(void);
void IsiCancelAcquisitionDas(void);
void IsiFetchDomain(void);
void IsiFetchDevice(void);

There are three methods to assign a domain to an ISI device:

1. The domain may be fixed and assigned by the device application. All ISI

devices must initially support this method since an initial application

domain is assigned prior to acquiring a domain using one of the other
methods. This enables all devices to be used in an ISI-S network.

2. A device that supports domain acquisition can acquire a unique domain

address from a domain address server. If a domain address server is not

available, domain acquisition will fail and the ISI engine will continue to
use the most recently assigned domain (initially, the default domain).

Devices that support domain acquisition also support multiple,

redundant, domain address servers. Domain address acquisition is
initiated by the user and controlled by the device acquiring the domain,

Advertising