Echelon FTXL User Manual
Page 219
![background image](/manuals/735717/219/background.png)
FTXL User’s Guide
207
• Checks whether the object index represents a supported object:
o For non-supported objects, sets the object status to invalid.
o For supported objects:
Checks whether the command applies to all objects or to a
specified functional block
Performs the specified command (implemented in a
switch statement based on the nviRequest.object_request
variable)
Checks whether it should report the status for the object
• Propagates the change to the network
The case statement for the nviVolt network variable (specified by the
LonNvIndexNviVolt network variable index) performs the following tasks:
• Checks whether the functional block is disabled. If it is disabled, it does
nothing. If is it not disabled:
o Performs range checking for the network variable
o Sets the output network variable to double the value of the input
network variable
o Propagates the output network variable to the network
The default statement checks whether the network variable index is within the
total allowed for the device and whether the change is for an input network
variable. In this case, it calls the UpdateCircuitOutput() utility function to
update the logical circuit defined for tracking the device’s aggregated current
usage. Otherwise, it ignores the change.
The functional blocks and network variables are defined in the model file, which
is described in
on page 214.
The myNvUpdateOccurred() function is shown below.
/*
* This function is called by the FTXL LonNvUpdateOccurred
* event handler, indicating that a network variable input
* has arrived.
*/
void myNvUpdateOccurred(const unsigned nvIndex,
const LonReceiveAddress* const pNvInAddr) {
switch (nvIndex) {
case LonNvIndexNciNvType:
{
/* The nciNvType has been updated, which controls the
* type of nviVolt and nvoVoltFb. Validate the change
* to determine whether to accept the update or not.
*/
ProcessTypeChange();
break;
}
case LonNvIndexNviRequest:
{
/* Node object request has been received. */