Uplink commands, Immediate commands, Network interface commands – Echelon OpenLDV User Manual

Page 85: Ee immediate, Commands, Ee network interface

Advertising
background image

OpenLDV Programmer’s Guide

77

Uplink Commands

An uplink command is a message read from a network interface by an OpenLDV

application with the ldv_read() function:

The OpenLDV interface passes certain network management messages to

the OpenLDV application for processing.

The network interface passes uplink application messages, network

variable updates, and network variable poll requests to the OpenLDV

interface when they are received from the network.

The network interface also passes completion events to the OpenLDV

interface at the conclusion of every downlink message initiated with the

niCOMM network interface command. If the downlink message was a

request message, the network driver also passes up any responses it

might have received from the network.

Layer 2 network interfaces send error codes for physical packet errors.

There are two classes of uplink communication:

Immediate commands are sent to the OpenLDV application by the

network interface to indicate the current operational status of the

network interface.

Local network management responses are sent to the OpenLDV

application when it issues a local network management request to the

network interface.

Commands for Layer 5 devices that can be used with a specified queue include

niCOMM for messages received from the network, and niNETMGMT for local

network management operation messages received from the network interface.

Local network management messages use the Layer 5 buffer structure,

regardless of which layer the network interface uses for network messages.

Immediate Commands

Immediate commands can be sent to the OpenLDV interface using the

ldv_write() function, and received using the ldv_read() function. Most

immediate commands are just two bytes long. This includes a command byte

followed by a trailing zero, which indicates there is no data payload for the

command. However, some commands, such as niXDRVESC (xDriver escape

command), do require a data payload.
The OpenLDV Developer Example also includes an example implementation of a

network interface API. The NiSendImmediate() function, which is part of this

example API, can be used to send immediate commands.

Network Interface Commands

Table 33 on page 78 lists the network interface commands. Unless specifically

described otherwise, the commands in the table apply to Layer 5 network

interfaces only.
The command names listed in the table are suggestions; for the Layer 5 device

commands, they are defined in the OpenLDV Developer Example by the

Advertising