Buffer size, Application buffer size – Echelon Neuron C User Manual

Page 203

Advertising
background image

Neuron C Programmer’s Guide

191

Application

Scheduler

Network

MAC

Hardware

Sender Device (writer)

Application

Scheduler

Network

MAC

Hardware

Receiver Device (reader)

= data

Figure 18. Application and Network Buffers

This section outlines a few guidelines for allocating buffers, depending on the
needs of an individual application.

Buffer Size

If you use application messaging, you must set the appropriate buffer sizes to

accommodate the largest message that the application or Neuron firmware could
generate or receive for processing. In some cases, this could require an increase

in buffer size. If you only use network variables, the compiler chooses buffer

sizes based on the size of the largest network variable that you declare and the
minimum sizes required by the Neuron firmware.
Figure 19 shows the basic components of an application buffer and a network

buffer. An application buffer contains application message data and system
overhead. A network buffer contains application message data, protocol layer 2

through layer 5 overhead, and system overhead.

Application

Message

Application

Message

Protocol L2 - L5

System Overhead

Network Buffer

Application Buffer

System Overhead

Figure 19. System and Protocol Overhead in Application and Network

Buffers

Application Buffer Size

The size of an application buffer is equal to the following:

message_size

+ 5 bytes of system overhead

Advertising