Memory for non volatile data, Memory for non-volatile data – Echelon LonTal Stack User Manual

Page 208

Advertising
background image

196

Appendix E: Appendix E


Determining Memory Usage for LonTalk

Stack Applications

Resource Type

Bytes Required

Notes:

SD_length is the length of the self-documentation string for the network

variable

NV_length is the declared size of the network variable (for

changeable-type network variables, NV_length is the maximum size of

the network variable)

In addition to RAM, L

ON

W

ORKS

resources also require memory for constant data.

This constant data must be included in both the total RAM size and the total
flash memory size, because all of the constant data is typically loaded from flash

memory into RAM.
The following table lists the estimated amount of flash memory required for each
type of L

ON

W

ORKS

resource.

Resource Type

Bytes Required

Static network variable

24 + SD_length + NV_name_length

Dynamic network variable

Dyn_NV_count

Alias

Alias_count

Address table entry

Address_count

Notes:

SD_length is the length of the self-documentation string for the network

variable

NV_name_length is the length of the network variable’s name, as defined

in the device’s model file

Dyn_NV_count is the number of dynamic network variables that are

defined for the application

Alias_count is the number of aliases that are defined for the application
Address_count is the number of address table entries that are defined for

the application

In addition to storing constant data, flash memory stores non-volatile data for the

application, as described in Memory for Non-Volatile Data.

Memory for Non-Volatile Data

A LonTalk Stack application typically has some non-volatile data that it must

maintain across device reset (see Providing Persistent Storage for Non-Volatile

Data). The LonTalk host stack stores only non-volatile data that is in use. For
example, it does not store address table and alias table entries that are not used.

Therefore, the actual amount of non-volatile memory used can be smaller than
the maximum amount required. The example direct flash implementation of the

Advertising