Update_alias( ) function, Syntax, Example – Echelon Neuron C User Manual

Page 171: Update_clone_domain( ) function

Advertising
background image

Neuron C Reference Guide

151

void f(void)
{

address_copy = *access_address(

addr_table_index(my_mt));

// Modify the address_copy here as necessary

...
update_address(&address_copy,
addr_table_index(my_mt));
}

update_alias( )

Function

The update_alias( ) function copies from the structure referenced by the

alias

pointer parameter to the alias table entry specified by the

index

parameter.

The Neuron 3120 Chip with version 4 firmware does not support aliasing.
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 <access.h>

void update_alias (const alias_struct *

alias

, int

index

);

Example

#include <access.h>
alias_struct alias_copy;
unsigned int index;

void f(void)
{

alias_copy = *(access_alias(index));

// Modify the alias_copy here as necessary

update_alias(&alias_copy,

index);

}

update_clone_domain( )

Function

The update_clone_domain( ) function copies from the structure referenced by the

domain

pointer parameter to the domain table entry specified by the

index

parameter.

This function differs from update_domain( ) in that it is only used for a cloned

device. A cloned device is a device that does not have a unique

Advertising