Porting overview, Osal, Lonlink driver – Echelon LonTal Stack User Manual
Page 150
138
Porting a LonTalk Stack Application
Porting Overview
You can port your LonTalk Stack device or IP-852 router application to your own
platform. Porting your application may require one to all of the following
components:
1. A version of the OSAL for your operating system.
2. A LON-link driver.
3. Socket interfaces.
4. The LonTalk Stack source files.
5. Application-specific files for LonTalk Stack devices.
6. Your own application-specific files.
The following sections provide tips for creating these components.
OSAL
This LonTalk Stack Developer’s Kit contains the following two example
implementations of the OSAL in the Source\VxLayer directory:
File
Description
Osal.c
The Windows OSAL used by the LonTalk Stack
example applications.
PosixOsal.c
The Linux version of the OSAL that uses
p-threads.
LonLink Driver
If your application uses a native LonWorks interface, you need to create a class
that is derived from the LonLink class to enable the stack to communicate with
the network interface. The LonLink class is defined in the
Source\Shared\LonLink.h file.
The LonTalk Stack Developer’s Kit contains the two example LonLink base
classes.
File/Folder
Description
Shared\LonLinkWin.cpp
The Windows version, which uses
OpenLDV to communicate with any
OpenLDV compatible network interface
that includes a Layer 2 MIP.
Source\Target\Drivers
\Linux\SMIP
The Linux version which communicates
with an Echelon Smart Transceiver or
Neuron Chip running the Layer 2 Serial