Getting isi version information, Discovering devices – Echelon ISI User Manual
Page 77
75
ISI Programmer’s Guide
#define CONTABSIZE 16u
static IsiConnection connectionBuffer;
unsigned IsiGetConnectionTableSize(void) {
return CONTABSIZE;
}
const IsiConnection* IsiGetConnection(unsigned index) {
// TODO: fetch data for index from external storage,
// for example by using a I2C serial I/O model; fill
// connectionBuffer with that data.
…
return &connectionBuffer;
}
void IsiSetConnection(IsiConnection* pConnection,
unsigned index) {
// TODO: transfer data referenced by pConnection to
// external storage, saving it for the given Index
…
}
Getting ISI Version Information
unsigned IsiImplementationVersion(void);
unsigned IsiProtocolVersion(void);
You can get the version number of the ISI engine, and of the ISI protocol
supported by the ISI engine. Two functions are included to provide information
about the current implementation of ISI.
To get the version number of the ISI engine, call the IsiImplementationVersion()
function.
To get the maximum version of the ISI protocol supported by the ISI engine, call
the IsiProtocolVersion() function. The ISI engine implicitly supports protocol
versions less then the version returned by the function unless otherwise noted.
Discovering Devices
You can discover all the devices in an ISI network. All devices in an ISI network
periodically broadcast their status by sending out DRUM messages. To discover
devices, you can monitor these status messages. This is useful for gateways and
controllers that need to maintain a table of all devices in a network, or provide
unique capabilities for specific types of devices in a network.
To discover devices, monitor the DRUM messages being sent on the network by
other devices and store the relevant information in a
device table
. A device table
is a table containing a list of devices and their attributes including their network
addresses. The DRUM messages contain all of the relevant information to do
explicit messaging. To create a device table, store the relevant DRUM fields,
such as subnet ID, node ID, and Neuron ID in a table that you can use to directly
communicate with other devices as described in the next section. To detect