Echelon OpenLDV User Manual Page 146

  • Download
  • Add to my manuals
  • Print
  • Page
    / 194
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 145
138 LNS Programming with xDriver
Downlink Sample Applications
LNS applications that manage downlink sessions operate like any other type of
network interface. However, the network interface name for an xDriver RNI
must use the following naming convention:
X.[Profile Name].[Downlink Lookup Key]
where [Profile Name] represents the name of the xDriver profile to be used in this
session and [Downlink Lookup Key] represents the downlink lookup key assigned
to the RNI when it was added to the xDriver database. xDriver network
interface names are not case-sensitive.
Example: If the downlink lookup key assigned to an RNI is “RNI-0001” and this
RNI uses the default profile, the network interface name to use for that device
would be “X.Default.RNI-0001”.
All physical local interfaces appear in the NetworkInterfaces collection.
However, xDriver RNIs that use custom lookup extension components do not
appear in the NetworkInterfaces collection until a session with that RNI has
been fully established. On the other hand, because the default xDriver lookup
extension uses the same part of Windows Registry that describes local network
interfaces, all configured RNIs assigned to the default profile appear in the LNS
NetworkInterfaces collection.
Even if a custom lookup extension is used, and the network interface does not
appear in the network interfaces collection, it is possible to open the appropriate
NetworkInterface object by name from the LNS Network Interfaces collection
using the NetworkInterfaces.Item(NetworkInterfaces As String) method.
For example:
NetworkInterfaces.Item(“X.Default.RNI-0001”)
See the second downlink programming sample on page 139.
Opening a Single Remote Network With xDriver
The following Visual Basic programming sample is an LNS application that
creates, opens, and closes a single remote network with xDriver.
At the completion of the function, the Object Server contains a new network
named Network1whose database is stored in c:\Network1, and a new
subsystem named Subsystem1.The network interface name used to access the
new network is “X.Default.RNI-0001.”
This sample demonstrates the use of the xDriver network interface naming
convention. Relevant comments are shown in bold.
Dim LcaOs As LcaObjectServer
Dim ActiveNetwork As LcaNetwork
Dim ActiveSystem As LcaSystem
Dim ActiveSubsystem As LcaSubsystem
Dim TempNetworkInterface As LcaNetworkInterface
Private Sub InitializeObjectServer()
'Initialize the global LNS database.
Set lcaOs.RemoteFlag = False
Set lcaOs.SingleUserMode = False
Page view 145
1 2 ... 141 142 143 144 145 146 147 148 149 150 151 ... 193 194

Comments to this Manuals

No comments