Accelerating device discovery – Echelon ISI User Manual
Page 79
77
ISI Programmer’s Guide
// Iterate through the device table again and decrement the
// credits at each call of IsiCreatePeriodicMsg(), removing any
// devices that have not sent a DRUM in the max possible amount
// of credits. IsiCreatePeriodicMsg() calls occur at a rate
// roughly equal to the DRUM rate expected from each device;
// this IsiCreatePeriodicMsg() override does not actually cause
// the generation of a periodic message (it always returns
// FALSE), and is used here to decrement each device’s
// credit at the best interval possible
boolean IsiCreatePerodicMsg(void) {
unsigned
i;
for (i = 0; i < devicecount; i++) {
devices[i].credits--;
if (devices[i].credits == 0) {
devicecount--;
if (devicecount != i) {
// Move device from end to this spot’s location
memcpy(devices+i,
devices+devicecount,
sizeof(Device));
}
}
}
return
FALSE;
}
when (msg_arrives) {
IsiMessage
message;
if (IsiApproveMsg()) {
// Received packets are kept in msg_in;
// compare the message code of the received msg
// to that of a DRUM
memcpy(&message,
msg_in.data,
sizeof(IsiMessage));
if (message.Header.Code == isiDrum ||
message.Header.Code == isiDrumEx) {
MaintainDevices(&message.Msg.Drum);
}
IsiProcessMsgS();
}
}
Accelerating Device Discovery
You can accelerate device discovery to reduce the time to discovery of all devices
in an ISI network. Discovering devices using DRUMs as described in the
previous section can take a long time due to the automatic bandwidth utilization
control implemented by the ISI protocol. For example, discovering five devices in
an ISI-S power line network without a domain address server can take up to 5
minutes 30 seconds. Discovering 200 devices in an ISI-DA power line network
can take up to 34 minutes.
You can accelerate device discovery by using the 709.1 Query ID message. You
can broadcast this message to all devices in the primary domain. All devices will
respond with their Neuron ID and program ID. If there are many devices in the
network, it is likely that some of the responses will be lost due to the requesting
device’s buffers becoming full, or due to network collisions. To accommodate this,
the requesting device disables responses from any devices discovered by the first