Developing an ip 852 router application, Ltlogicalchannel, Ltip852router – Echelon LonTal Stack User Manual

Page 146: Developing an ip-852 router application

Advertising
background image

134

Developing an IP-852 Router Application

Developing an IP-852 Router Application

You can develop an IP-852 router application using the LonTalk Stack. The

IP-852 router application does not require model files, a code framework
generated by the LonWorks Interface Developer, or the LonTalk API. To create

an IP-852 router application you use the following two C++ classes:

Class

Description

File

LtLogicalChannel Represents the

network interface

used to access a native
LonWorks channel.

LonTalkStack\Source\

Shared\include\

LtChannel.h

LtIp852Router

Represents the router
object.

LonTalkStack\Source\
Shared\include\

LtRourterApp.h

LtLogicalChannel

The LtLogicalChannel class represents the network interface used to access a

native LonWorks channel. You must instantiate and open this class before
starting the IP-852 router.
You can call its constructor with either no parameters (if there is only one

possible native network interface supported by the platform), or with a single
parameter representing the name of the network interface.

LtIp852Router

The LtIp852Router class represents the router object. Its constructor takes no
parameters. This class has the following functions:

Function

Syntax

Description

Start

LtErrorType Start(
int ltAppIndex,
LtUniqueId &ltUid,
LtLtLogicalChannel
*pLtChannel,
int ipAppIndex,
LtUniqueId &ipUid,
int ipAddress,
int ipPort)

Creates the IP-852 channel and

starts both sides of the router.
The following describes this
method’s parameters:
ltAppIndex. The application

index of the native LonWorks
side of the router.
The LonTalk Stack requires an
application index whenever

there is more than one stack. It

is mainly used to store the
unique ID of the stack and to

Advertising