Creating a connection with controlled enrollment – Echelon ISI User Manual

Page 82

Advertising
background image

ISI Programmer’s Guide

80

Creating a Connection with Controlled Enrollment

You can create a connection from a connection controller using controlled
enrollment. The connection controller is not a network management tool—it

simply takes the place of the push buttons on devices used to create connections

using manual enrollment. Based on user input to the connection controller, the
controller sends requests to the devices to be connected that are translated to the

same ISI API calls used to create manual connections. A connection controller

will typically be some sort of user interface device such as a user interface touch
panel.

To send a request for controlled enrollment, the connection controller sends a

control request (CTRQ) message to the devices to be connected. If the devices
support controlled enrollment, they respond with control response (CTRP)

messages. The CTRQ and CTRP message are described in Appendix A.

The CTRQ message causes the device to execute the ISI API function indicated

with the control value, using the parameter if needed. For example, a CTRQ
message specifying an isiOpen function with a parameter of 2 may be sent to

cause a device to become a manual enrollment host for assembly 2. The device

receives this message, sends a positive response, and then calls
IsiOpenEnrollment(2). The connection controller must send the CTRQ message

using the request/response service. If the device doesn’t implement controlled

enrollment at all, no response will be received. If the device supports controlled
enrollment, but not the requested operation, a negative response will be received.

If the device supports the requested operation, a positive response will be
received. The request is always sent on the primary domain, typically using

Neuron ID addressing. Using the primary domain is required so that the

response can reach the connection controller. Using Neuron ID addressing
relieves the connection controller from keeping track of Neuron ID versus

subnet/node ID tracking, but the connection controller is free to use subnet/node

ID addressing,

The connection controller must send requests for the ISI API functions described
in

Enrolling in a Connection

in Chapter 2 to create a connection.

When a CTRP response is received from a device, the connection controller can
use the Neuron ID contained in the response to correlate the response to its

device table.

E

XAMPLE

The following connection controller example implements a simple ISI
connection from a switch to a light.

#include <msg_addr.h>

#include <isi.h>
#define RETRY_COUNT 3
#define ENCODED_TX_TIMER 11 // 768ms
#define ENCODED_RPT_TIMER 2
#define PRIMARY_DOMAIN 0

// Issue the ISI controlled enrollment command (with parameter
// assembly) to the destination device indicated by neuronId.
void ControlCommand(const unsigned* neuronId, IsiControl command,

Advertising