Myreset(), Myonline() – Echelon FTXL User Manual

Page 224

Advertising
background image

212

Example FTXL Applications

void myNvDeleted(const unsigned index) {
LonByte oldCircuitId = circuitMap[index].circuitId;
if (oldCircuitId != NO_CIRCUIT) {

/* Remove the NV from the circuit. */

circuitMap[index].circuitId = NO_CIRCUIT;
/* Update the output NV of the circuit to which this NV
* used to belong.

*/

UpdateCircuitOutput(oldCircuitId);
}

}

myReset()

The myReset() function calls the ProcessOnlineEvent() utility function to process

changes to input network variables and configuration property values.

The myReset() function is shown below.

/*
* This function is called by the FTXL LonReset event

* handler, indicating that the FTXL LonTalk protocol stack

* has been reset.
*/

void myReset(void) {

LonStatus status;

/* Check to see if the device is online. */
if (LonQueryStatus(&status) == LonApiNoError &&

status.NodeState == LonConfigOnLine)

{
/* Process inputs that may have changed while the

* device was offline. */

ProcessOnlineEvent();
}

}

myOnline()

The myOnline() function calls the the ProcessOnlineEvent() utility function to

process changes to input network variables and configuration property values.
The myOnline() function is shown below.

/*

* This function is called by the FTXL LonOnline event

* handler, indicating that the FTXL LonTalk protocol stack

* has been set online.

*/

void myOnline(void) {

/* Process inputs that may have changed while the device

* was offline. */

ProcessOnlineEvent();

}

Advertising