Layer 2 buffer structure, Application layer header, Layer 2 header – Echelon OpenLDV User Manual

Page 69: Npdu

Advertising
background image

OpenLDV Programmer’s Guide

61

Layer 2 Buffer Structure

The following sections provide an overview of the Layer 2 buffer structure shown

in Figure 6. Bit transmission order within a byte is “most significant first”,

meaning that the most significant bit is transmitted first. Byte transmission

order is also “most significant first”, meaning that the most significant byte of a

field is transmitted first.
A Layer 2 network interface uses the Layer 2 buffer structure for most messages.

However, local network management messages use the Layer 5 buffer structure,

regardless of which layer the network interface uses for network messages.
For a more complete description of the Layer 2 buffer structure, see the

ISO/IEC 14908-1 Interconnection of information technology equipment –

Control Network Protocol - Part 1: Protocol Stack.

Application Layer Header

The application layer header contains the network interface command (and

queue) and a byte that indicates the length of the rest of the message. The most

significant nibble of the network interface command contains the command code

(for example, niCOMM for network messages), and the least significant nibble

contains the queue code, if any. These nibbles combine to form the

command/queue byte, which is the network interface command.
An OpenLDV application sends these commands using the ldv_write() function,

and receives them using the ldv_read() function. See Network Interface

Commands on page 76 for a description of the network interface commands.

Layer 2 Header

The Layer 2 header is a single byte that includes the following fields:

A 1-bit field to specify the priority of the data packet. 0 = Normal; 1 =

Priority.

A 1-bit field to specify the channel to use, primary or alternate. This field

allows transceivers that have the ability to transmit on two different

channels and receive on either one, without the need to instruct the

transceiver to explicitly receive on a specific channel. The transport layer

sets this bit.

A 6-bit unsigned field (≥ 0) to specify the channel backlog increment to be

generated as a result of delivering this packet. The backlog represents

the number of messages that the packet shall cause to be generated upon

reception. This value is used by the Smart Transceiver or Neuron Chip

MAC algorithm.

NPDU

The Network Protocol Data Unit (NPDU) encapsulates the physical packet data.

The NPDU includes the following fields:

Protocol version (2 bits)

Physical packet type (2 bits)

Address format (2 bits)

Advertising