Syntax, Example, Update_domain( ) function – Echelon Neuron C User Manual
Page 173
Neuron C Reference Guide
153
See the ISO/IEC 14908 (ANSI/EIA/CEA-709.1)
Control Network Specification
for
a description of the data structure.
Syntax
#include
void update_config_data (const config_data_struct *
p
);
Example
#include
config_data_struct config_data_copy;
void f(void)
{
config_data_copy = config_data;
// Modify the config_data_copy as necessary
update_config_data(&config_data_copy);
}
update_domain( )
Function
The update_domain( ) function copies from the structure referenced by the
domain
pointer parameter to the domain table entry specified by the
index
parameter.
Important: This function has a mechanism that ensures that a reset or power
cycle during an EEPROM modification does not cause the device to go
unconfigured. This mechanism uses the error log to serve as a semaphore. Thus,
the error log is written to on every call to this function, even if the net effect of
the function is to not modify or write to the configuration data at all (because the
new contents match the old). Applications must minimize calls to this function to
ensure that the maximum number of supported writes for EEPROM is not
exceeded over the lifetime of the application.
See the ISO/IEC 14908 (ANSI/EIA/CEA-709.1)
Control Network Specification
for
a description of the data structure.
Syntax
#include
void update_domain (domain_struct *
domain
, int
index
);
Example
#include
domain_struct domain_copy;
void f(void)
{
domain_copy = *access_domain(0);
// Modify the domain_copy as necessary
...
update_domain(&domain_copy,
0);