Echelon OpenLDV User Manual

Browse online or download User Manual for Software Echelon OpenLDV. Echelon OpenLDV User Manual

  • Download
  • Add to my manuals
  • Print
  • Page
    / 194
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews

Summary of Contents

Page 1 - Programmer’s Guide

OpenLDV Programmer’s Guide078-0275-01D

Page 2

2 Introduction Introduction to OpenLDV Networking The OpenLDV driver allows a Windows application to communicate with a LONWORKS network through a lo

Page 3 - Audience

92 The OpenLDV Developer Example Developer Example Diagram Figure 7 shows the hierarchy of the classes described in this chapter. ldv32.dllldv_open

Page 4 - Related Documentation

OpenLDV Programmer’s Guide 93 5 Using the xDriver Default Profile This chapter describes how to use the xDriver default profile. It also

Page 5 - Table of Contents

94 Using the xDriver Default Profile Configuring an xDriver Profile You can edit an xDriver profile to configure a number of parameters that impact h

Page 6

OpenLDV Programmer’s Guide 95 Figure 9. xDriver Profile General Tab You can edit the description of the xDriver profile by modifying the tex

Page 7

96 Using the xDriver Default Profile Figure 10. xDriver Profile Downlink Sessions Tab 4. Select the Uplink Sessions tab to configure how xDriver ma

Page 8

OpenLDV Programmer’s Guide 97 For xDriver to receive these requests for connection, the xDriver Connection Broker must be running. For infor

Page 9 - Introduction

98 Using the xDriver Default Profile Figure 13. xDriver Profile Recovery Options Tab You can configure xDriver to automatically attempt reconnection

Page 10 - ONWORKS network:

OpenLDV Programmer’s Guide 99 6 Extending xDriver You can extend xDriver by creating custom xDriver lookup extension components, and addi

Page 11 - Client Applications

100 Extending xDriver Extending xDriver The OpenLDV driver software includes the LONWORKS Interfaces application, which you can use to create entrie

Page 12 - Network Interfaces

OpenLDV Programmer’s Guide 101 of the downlink lookup key. Chapter 7, LNS Programming with xDriver, on page 137, provides programming samples

Page 13

OpenLDV Programmer’s Guide 3 Client Applications OpenLDV applications, such as the LNS Server and the LonScanner Protocol Analyzer, use the O

Page 14 - Installing the OpenLDV SDK

102 Extending xDriver Figure 15 on page 103 shows the flow of events that occur when a downlink session is initiated within the session-initiating LN

Page 15

OpenLDV Programmer’s Guide 103 Call ObjectServer.open()Does the networkexist?Get the network from Local network collectionAdd the network to

Page 16

104 Extending xDriver The events shown in Figure 15 that occur within the LNS application represent a typical LNS application that opens a downlink s

Page 17 - Using the OpenLDV API

OpenLDV Programmer’s Guide 105 identification message from the RNI that requested the uplink session. From this message, the Connection Brok

Page 18 - ONWORKS network

106 Extending xDriver on page 142. You can also use the xDriver Profile Editor to specify a command to run each time that the listener port for that

Page 19

OpenLDV Programmer’s Guide 107 Call ObjectServer.open()AcceptIncoming Call?Get network from Local network collectionYesCall myNetwork.open()O

Page 20 - Application Layer

108 Extending xDriver The events shown in Figure 17 that occur within the LNS application represent a typical LNS application that registers for upli

Page 21 - Overview of the OpenLDV API

OpenLDV Programmer’s Guide 109 Field Description Uplink Lookup Key The uplink lookup key is an ASCII string (105 characters maximum) passed

Page 22

110 Extending xDriver Field Description Next Authentication Key This field represents the next authentication key to be used by the RNI. The next

Page 23 - The OpenLDV API

OpenLDV Programmer’s Guide 111 Field Description Remote TCP Address The TCP/IP address of the RNI to which to connect. For an uplink sessi

Page 24 - ONWORKS name (such as

4 Introduction Network Interfaces A local network interface (one that is physically connected to the computer running the OpenLDV driver) uses its ow

Page 25

112 Extending xDriver unique, 32-character hexadecimal string representing the 128-bit MD5 key that is used by the RNI. The xDriver lookup interface

Page 26

OpenLDV Programmer’s Guide 113 Table 36. Changing Authentication Keys Phase One, Lookup Extension Component Is Called Initially, the current

Page 27

114 Extending xDriver Prerequisite: You must install the OpenLDV 4.0 SDK and Microsoft Visual Studio 2008 SP1 (or later). Important: If you use t

Page 28

OpenLDV Programmer’s Guide 115 Figure 19. Visual Studio New Project Dialog In the New Project dialog: • Expand the C++ category and select

Page 29

116 Extending xDriver Figure 20. Visual Studio ATL Project Wizard Click Finish to close the ATL Project Wizard and create the project. Add a COM Obj

Page 30

OpenLDV Programmer’s Guide 117 Figure 21. Visual Studio Add Class Dialog From the Add Class dialog, select the ATL category, select the ATL

Page 31

118 Extending xDriver Figure 22. Visual Studio ATL Simple Object Wizard – Names Page From the ATL Simple Object Wizard Names page, enter a name for

Page 32

OpenLDV Programmer’s Guide 119 From the ATL Simple Object Wizard, select the Options page, as shown in Figure 23. Figure 23. Visual Studio A

Page 33

120 Extending xDriver Figure 24. Visual Studio Implement Interface Wizard Within the Implement Interface wizard, select Echelon OpenLDV xDriver 1.0

Page 34

OpenLDV Programmer’s Guide 121 } STDMETHOD(SetOptions)(BSTR options) { return E_NOTIMPL; } // ILdvxLookup Methods public: ST

Page 35

OpenLDV Programmer’s Guide 5 connections with a group of remote networks. For example, you could have hundreds of remote networks, each of w

Page 36

122 Extending xDriver Project : error PRJ0050: Failed to register output. Please try enabling Per-user Redirection or register the component from a

Page 37

OpenLDV Programmer’s Guide 123 Figure 26. OpenLDV xDriver Profile Properties – General Tab 6. For the Lookup tab of the OpenLDV xDriver Pr

Page 38

124 Extending xDriver Figure 27. OpenLDV xDriver Profile Properties – Lookup Tab 7. Make any other changes that are appropriate for your custom pr

Page 39

OpenLDV Programmer’s Guide 125 interface ILdvxConfigure; // add to coclass SampleLookupCsv • Add additional private methods and properties t

Page 40

126 Extending xDriver Figure 28. Visual Studio New Project Dialog In the New Project dialog: • Expand the Visual Basic category and select Class Li

Page 41

OpenLDV Programmer’s Guide 127 Click OK to create the project. Add a Reference to the xDriver Type Library From the Visual Studio main window

Page 42

128 Extending xDriver Figure 30. Visual Studio Add New Item Dialog Select COM Class as the template. This template generates the proper GUIDs and t

Page 43

OpenLDV Programmer’s Guide 129 Figure 31. Delete Class1.vb Import xDriver Types to Your System Namespace Add the following lines to the begi

Page 44

130 Extending xDriver Figure 32. Visual Studio Object Browser View Your class must implement the DownlinkLookup, UpdateLookup, and UplinkLookup memb

Page 45

OpenLDV Programmer’s Guide 131 2. Click Add to open the New Profile dialog, as shown in Figure 33. Figure 33. xDriver Profile Editor New P

Page 46 - LDVDevices Structure

6 Introduction See the OpenLDV 4.0 ReadMe document for updates to the OpenLDV driver documentation. To develop an OpenLDV application or xDriver exte

Page 47 - LdvCombineFlags Enumeration

132 Extending xDriver 6. For the Lookup tab of the OpenLDV xDriver Profile Properties dialog for the new profile, select the newly built profile fro

Page 48 - LdvDeviceCaps Enumeration

OpenLDV Programmer’s Guide 133 • Windows Vista or Windows 7: \Users\Public\Documents \LonWorks\OpenLDV SDK\xDriver API Examples • Windows

Page 49

134 Extending xDriver these fields should only be updated from the UpdateLookup function. The database configuration interface that you create must

Page 50 - LDVDriverInfo Structure

OpenLDV Programmer’s Guide 135 installing the software does not return the default values to these profiles. However, the xDriver Profile Ed

Page 51 - LdvDriverID Enumeration

136 Extending xDriver Figure 36. Services Administrative Control Panel Applet 3. To start the Connection Broker, right-click Echelon xDriver Connec

Page 52 - LdvDriverType Enumeration

OpenLDV Programmer’s Guide 137 7 LNS Programming with xDriver This chapter describes sample programs to assist you when creating LNS appl

Page 53 - OpenLDV API Return Codes

138 LNS Programming with xDriver Downlink Sample Applications LNS applications that manage downlink sessions operate like any other type of network

Page 54

OpenLDV Programmer’s Guide 139 lcaOS.Open 'Add a new network object and open the 'network database. “Network1” represents the nam

Page 55

140 LNS Programming with xDriver Figure 37. Downlink Application Form This application can open either of the two remote LONWORKS networks by clicki

Page 56

OpenLDV Programmer’s Guide 141 Set curRNI = NIs.Item("X.Default.RNI-0001") 'Set the variable curRNI as the 'network

Page 57 - ONWORKS Interfaces

OpenLDV Programmer’s Guide 7 information about xDriver extensions, see Chapter 6, Extending xDriver, on page 99. Getting Started with the Ope

Page 58

142 LNS Programming with xDriver Private Sub CloseNetB_Click() OpenNetB.Enabled = True CloseNetB.Enabled = False g_SystemB.Close g_N

Page 59

OpenLDV Programmer’s Guide 143 be called from the Timer1_Timer() function after the next timer control interval expires. The StartButton_Cli

Page 60

144 LNS Programming with xDriver 'local. m_cOS.SingleUserMode = False 'Allow multiple applications to access

Page 61

OpenLDV Programmer’s Guide 145 ByVal DataPoint As Object, ByVal srcaddr As Object) Dim src_addr As LcaSourceAddress Set src_addr = sr

Page 62 - msgSize);

146 LNS Programming with xDriver 'event and will now close the monitor points 'and the network. m_gbIn

Page 63

OpenLDV Programmer’s Guide 147 A Custom Network Interfaces This appendix provides high-level guidance for working with a custom network inte

Page 64

148 Custom Network Interface Overview Echelon and other manufacturers provide a wide selection of network interfaces for different LONWORKS channel t

Page 65

OpenLDV Programmer’s Guide 149 close calls. The OpenLDV driver calls these driver functions to interact with the custom network interface. Y

Page 66 - Application Buffer Structure

150 Custom Network Interface OR of the LDV_DEVCAP_L5 and LDV_DEVCAP_SICB enumeration values. g. Set the capsMask to suitable current capabilities of

Page 67

OpenLDV Programmer’s Guide 151 for the custom network interface should be “MyCustomLON1”. The subkey for the device within the registry shou

Page 68

8 Introduction Table 1. NI Application Settings Network Interface NI Application Setting for Layer 2 Image NI Application Setting for Layer 5 Image P

Page 70 - Message Header

OpenLDV Programmer’s Guide 153 B LNS Methods and Events for xDriver Support This appendix describes the methods and events that are included

Page 71 - ExpMsgHdr

154 LNS Methods and Events for xDriver Support xDriver Methods and Events This appendix describes the LNS methods and events you use when creating an

Page 72

OpenLDV Programmer’s Guide 155 automatically. The session establishment time for a profile can be configured using the xDriver Profile Edito

Page 73 - NetVarHdr

156 LNS Methods and Events for xDriver Support Syntax objServer.EndIncomingSessionEvents xDriverProfileName Table 39. EndIncomingSessionEvents Parame

Page 74 - ONWORKS transceivers

OpenLDV Programmer’s Guide 157 Element Description stringExpression A string type specifying the name of the object to retrieve. For xDriv

Page 75 - Network Address

158 LNS Methods and Events for xDriver Support Element Description netName A string that represents the LNS network name of the network that reques

Page 76

OpenLDV Programmer’s Guide 159 Recommendation: Open the network in server-independent mode when you plan to use this method, because using t

Page 78 - RcvAddrDtl

OpenLDV Programmer’s Guide 161 C Custom Lookup Extension Component Programming This appendix describes the interfaces and methods that your

Page 79

OpenLDV Programmer’s Guide 9 2 Using the OpenLDV API This chapter describes the OpenLDV API functions and types, including the input and ou

Page 80 - RespAddrDtl

162 Custom Lookup Extension Component Programming Overview This appendix describes the interfaces and methods that your custom lookup extension compo

Page 81 - Message Data

OpenLDV Programmer’s Guide 163 Syntax C++ STDMETHOD(SetInstance)(BSTR instance) Visual Basic Sub SetInstance(ByVal instance As String) Tab

Page 82 - ExplicitMsg

164 Custom Lookup Extension Component Programming ILdvxLookup Interface The lookup interface is the primary interface implemented by an xDriver looku

Page 83

OpenLDV Programmer’s Guide 165 E_HANDLE, LDVX_E_INVALID_DOWNLINK_KEY, or LDVX_E_LOOKUP_FAILURE. UpdateLookup Method Applies to: xDriver Look

Page 84 - Downlink Commands

166 Custom Lookup Extension Component Programming The ILdvxSCO interface provides methods that you can use to obtain the uplink lookup key and fill i

Page 85 - Network Interface Commands

OpenLDV Programmer’s Guide 167 Field Name Called From DownlinkLookup UplinkLookup UpdateLookup Uplink Key Read/Write Read Only Read Only

Page 86

168 Custom Lookup Extension Component Programming Syntax C++ STDMETHOD(GetAdditionalDownlinkPacketTrailer)(BSTR * hexBytes) Visual Basic Function G

Page 87

OpenLDV Programmer’s Guide 169 Syntax C++ STDMETHOD(GetCurrentAuthenticationKey)(BSTR * authKey) Visual Basic Function GetCurrentAuthentica

Page 88

170 Custom Lookup Extension Component Programming GetEncryptionType Method Applies to: Session Control Object This method obtains the type of encryp

Page 89

OpenLDV Programmer’s Guide 171 GetNextAuthenticationKey Method Applies to: Session Control Object This method obtains the next xDriver authe

Page 90

10 Using the OpenLDV API Introduction to OpenLDV Programming An application that uses the OpenLDV API is called an OpenLDV application. The communic

Page 91

172 Custom Lookup Extension Component Programming GetUplinkKey Method Applies to: Session Control Object This method obtains the xDriver uplink look

Page 92

OpenLDV Programmer’s Guide 173 Table 59. SetAdditionalDownlinkPacketHeader Parameters Parameter Description hexBytes Hexadecimal string con

Page 93

174 Custom Lookup Extension Component Programming For more information about how the xDriver lookup extension component handles authentication, see A

Page 94

OpenLDV Programmer’s Guide 175 Table 62. SetCurrentAuthenticationKey Parameters Parameter Description authKey xDriver authentication key fo

Page 95

176 Custom Lookup Extension Component Programming must set this value appropriately depending on the RNI used. The default value is LDVX_ENCRYPTION_

Page 96

OpenLDV Programmer’s Guide 177 Table 65. SetLNSNetworkName Parameters Parameter Description lnsNetwork LNS network name as String (a maximu

Page 97

178 Custom Lookup Extension Component Programming SetUplinkKey Method Applies to: Session Control Object This method sets the uplink lookup key. Th

Page 98 - Dispatchers

OpenLDV Programmer’s Guide 179 GetRemoteTCPAddress Method Applies to: Session Control Object This method obtains the remote TCP address of t

Page 99 - Toolkits and User Interface

180 Custom Lookup Extension Component Programming Table 70. GetRemoteTCPPort Parameters Parameter Description tcpPort Integer variable that stores

Page 100 - Developer Example Diagram

OpenLDV Programmer’s Guide 181 This method sets the remote TCP port that the RNI at the other end of the connection uses to receive connectio

Page 101 - ONWORKS

OpenLDV Programmer’s Guide 11 the seven layers of the OSI Model and which OSI layers a Layer 2 or Layer 5 network interface handles. Physical

Page 102

182 Custom Lookup Extension Component Programming Table 73. GetNeuronID Parameters Parameter Description nNeuronID String variable that stores the

Page 103

OpenLDV Programmer’s Guide 183 Index A AcceptIncomingSession, 154 ANSI/CEA 709.1-B, 10 API devices and drivers, 16 enumerations, 37, 42 examp

Page 104

184 Index GetRemoteTCPPort, 179 GetSessionControlObjectID, 171 GetUplinkKey, 172 H hardware requirements, 5

Page 105

OpenLDV Programmer’s Guide 185 N NetVarHdr, 65 network address, 67 network interface application settings, 7 command interface, 76 custom, 14

Page 107 - Extending xDriver

Echelon, i.LON, LonMaker, LONMARK, LonTalk, LONWORKS, LNS, Neuron, NodeBuilder, 3120, 3150, and the Echelon logo are trademarks of Echelon Corporation

Page 108 - Downlink Sessions

12 Using the OpenLDV API Application LayerOpenLDV APIPresentation LayerOpenLDV ApplicationOpenLDV Driver (Ldv32.dll)SLTA Link LayerPCLTA Link LayerPC

Page 109

OpenLDV Programmer’s Guide 13 The OpenLDV API does not include an application layer. However, the OpenLDV Developer Example demonstrates how

Page 110 - 102 Extending xDriver

14 Using the OpenLDV API Referencing the OpenLDV Component You can develop applications that use the OpenLDV API with any Windows application develop

Page 111 - Typical Downlink Scenario

OpenLDV Programmer’s Guide 15 The OpenLDV API This section describes the functions included in the OpenLDV API. Table 3 summarizes these fun

Page 112 - Uplink Sessions

16 Using the OpenLDV API Function Description Added in OpenLDV Version ldv_read() Reads a message from an open session. 1.0 ldv_register_event() R

Page 113

OpenLDV Programmer’s Guide 17 • The ldv_set_device_info() function allows you to modify certain information for a device. • The ldv_get_m

Page 114 - ONWORKS network, in a

18 Using the OpenLDV API See Structures and Enumerations for the Driver API on page 42 for descriptions of the structures and enumerations used by th

Page 115 - Typical Uplink Scenario

OpenLDV Programmer’s Guide 19 Syntax LDVCode ldv_free_device_info( const LDVDeviceInfo* pDeviceInfo ) Table 5. ldv_free_devi

Page 116 - Session Control Object

20 Using the OpenLDV API ldv_free_matching_devices() Call this function to release resources allocated by the ldv_get_matching_devices() function. Sy

Page 117

OpenLDV Programmer’s Guide 21 Remarks Use this function to retrieve device information about a LONWORKS interface device. This function r

Page 118

OpenLDV Programmer’s Guide iii Welcome This document describes Echelon’s OpenLDV™ Release 4.0 Network Driver and Software Development Kit (SDK

Page 119 - Authentication Key Handling

22 Using the OpenLDV API ldv_get_matching_devices() Call this function to retrieve information about all LONWORKS interface devices that match a set

Page 120

OpenLDV Programmer’s Guide 23 Remarks This function returns a string for the version number of the OpenLDV driver being used: • OpenLDV 1.0

Page 121

24 Using the OpenLDV API along with other data, such as timestamp data, that could be useful for some applications). See Application Buffer Structur

Page 122

OpenLDV Programmer’s Guide 25 the network interface enters an initial quiet mode (flush state) after a reset. To start using such a network

Page 123 - ONWORKS \xDriver\Components

26 Using the OpenLDV API Table 13. ldv_open_cap() Parameters Parameter Direction Description szDevice Input The network interface with which to

Page 124 - Add a COM Object

OpenLDV Programmer’s Guide 27 For local network interfaces, after the ldv_open_cap() function returns the LDV_OK success code, the network in

Page 125

28 Using the OpenLDV API Table 14. ldv_read() Parameters Parameter Direction Description handle Input The network interface device to be read. T

Page 126

OpenLDV Programmer’s Guide 29 format, the maximum length of a message is 257 bytes, and so you should use a buffer length of at least 257 byt

Page 127

30 Using the OpenLDV API To de-register a current event and register a new event, call ldv_register_event()with a new event parameter. You can also

Page 128

OpenLDV Programmer’s Guide 31 specify the Windows device path, for example, \\.\MYLON1.0. See Appendix A, Custom Network Interfaces, on page

Page 129

iv Examples Throughout this guide, C++, Visual Basic, and other language programming samples are used to illustrate concepts. To make these samples m

Page 130

32 Using the OpenLDV API Table 17. ldv_set_driver_info() Parameters Parameter Direction Description nDriverId Input The driver ID of the driver t

Page 131

OpenLDV Programmer’s Guide 33 Table 18. ldv_write() Parameters Parameter Direction Description handle Input The LONWORKS interface devic

Page 132 - Optional Steps

34 Using the OpenLDV API Syntax LDVCode ldv_xlate_device_name( LPCSTR device_name, LPSTR driver_name, int* driver_name_len ) Tabl

Page 133

OpenLDV Programmer’s Guide 35 Table 20. ldvx_open() Parameters Parameter Direction Description id Input The LONWORKS interface device wi

Page 134

36 Using the OpenLDV API information. If you do not specify a valid network interface name as the id parameter when you call this function, or if th

Page 135 - Add a COM Class

OpenLDV Programmer’s Guide 37 Parameter Direction Description tag Input Correlates notification messages with sessions. This tag is supp

Page 136

38 Using the OpenLDV API /* (read-only) */ typedef const LDVDeviceInfo* LDVDeviceInfoPtr; The LDVDeviceInfo structure contains info

Page 137

OpenLDV Programmer’s Guide 39 typedef struct LDVDevices { DWORD nInfos; LDVDeviceInfoPtr* pInfos;

Page 138

40 Using the OpenLDV API 1. Set the nCaps to LDV_DEVCAP_PA to specify protocol analyzer capability. 2. Set nCombine to LDV_COMBINE_DEFINITELY_ALL (

Page 139

OpenLDV Programmer’s Guide 41 Device Capability Numeric Value Description LDV_DEVCAP_XDRIVER 0x00000040 The device is an xDriver-based dev

Page 140

OpenLDV Programmer’s Guide v Table of Contents Welcome ...

Page 141

42 Using the OpenLDV API Device Capability Numeric Value Description LDV_DEVCAP_CURRENTLY_AVAILABLE 0x40000000 The device is currently not in use

Page 142

OpenLDV Programmer’s Guide 43 See the following functions for their use of this structure: ldv_get_driver_info() on page 21, ldv_set_driver_

Page 143

44 Using the OpenLDV API LdvDriverType Enumeration Table 28 describes the enumerated values for the LdvDriverType driver type. The driver type descr

Page 144

OpenLDV Programmer’s Guide 45 OpenLDV API Return Codes Table 30 describes the return codes that can be returned by the OpenLDV API functions.

Page 145 - LNS Programming with xDriver

46 Using the OpenLDV API Return Code Numeric Value Description LDV_DEVICE_ERR 4 This code is returned if a function fails to execute as a result o

Page 146

OpenLDV Programmer’s Guide 47 Return Code Numeric Value Description LDV_NO_RESOURCES 8 No resources are available. This code is returned

Page 147 - ONWORKS networks

48 Using the OpenLDV API Return Code Numeric Value Description LDVX_OPEN_FAILED 12 The remote network interface (RNI) could not be opened. LDVX_CL

Page 148 - ONWORKS networks by

OpenLDV Programmer’s Guide 49 Return Code Numeric Value Description LDVX_INVALID_XDRIVER 17 This code is returned if you attempt to open a

Page 149

50 Using the OpenLDV API Return Code Numeric Value Description LDV_CAPABILITY_NOT_SUPPORTED 22 The capability specified for the ldv_open_cap() fun

Page 150 - Uplink Sample Application

OpenLDV Programmer’s Guide 51 Return Code Numeric Value Description LDV_DEVICE_UPDATE_FAILED 33 The device information specified for the l

Page 151

vi LdvCombineFlags Enumeration ... 39 LdvDeviceCaps Enumeration ...

Page 152

52 Using the OpenLDV API Return Code Numeric Value Description LDV_BUFFER_CONFIGURATION_TOO_LARGE 45 The specified buffer configuration is too lar

Page 153

OpenLDV Programmer’s Guide 53 // Include the header file from the OpenLDV API Example // (contains definitions for ExpMsgHdr, ExpAppBuffer

Page 154

54 Using the OpenLDV API if (ldvCmdOk) { // Build message to send to NI m_msgOut.ni_hdr.q.queue = niNTQ; m_msgOut.ni_hdr.q.q_cmd

Page 155 - Custom Network Interfaces

OpenLDV Programmer’s Guide 55 // Perform the following tasks regardless of ldvCmdOk value: // Deregister event for NI ldv_register_event(m_O

Page 157

OpenLDV Programmer’s Guide 57 3 Sending and Receiving Messages with the OpenLDV API This chapter describes the network interface message co

Page 158 - Windows Registry Entries

58 Sending and Receiving Messages with the OpenLDV API Constructing Messages You can construct outgoing messages for OpenLDV application using applic

Page 159

OpenLDV Programmer’s Guide 59 Extended HeaderExtended Data TypeExtended Data VersionExtended DataBFPacket SizeFlagsExtended Header SizeAbsolu

Page 160

60 Sending and Receiving Messages with the OpenLDV API SICB application buffer structure is defined as a structure of type ExpAppBuffer in the OpenLD

Page 161 - LNS Methods and Events for

OpenLDV Programmer’s Guide 61 Layer 2 Buffer Structure The following sections provide an overview of the Layer 2 buffer structure shown in Fi

Page 162 - Remarks

OpenLDV Programmer’s Guide vii Implement the ILdvxLookup Interface ... 119 Add the Extension to th

Page 163 - EndIncomingSessionEvents

62 Sending and Receiving Messages with the OpenLDV API • Domain length (2 bits) • Data (variable length, depending on the packet type and the data)

Page 164 - Syntax

OpenLDV Programmer’s Guide 63 • NetVarHdr — for sending and receiving network variables that are processed by the network interface ExpMsgH

Page 165 - OnIncomingSessionEvent

64 Sending and Receiving Messages with the OpenLDV API For an uplink message (read from a network interface), the tag field indicates the index into

Page 166 - ReleasePendingUpdates

OpenLDV Programmer’s Guide 65 alternate path If the alternate path bit is set, the message is delivered on the path specified in the path bit

Page 167

66 Sending and Receiving Messages with the OpenLDV API and request messages. When the OpenLDV application generates a response to an uplink request

Page 168

OpenLDV Programmer’s Guide 67 turnaround If the turnaround bit is set, the message is a turnaround message, that is, a message sent from one

Page 169 - Component Programming

68 Sending and Receiving Messages with the OpenLDV API msb lsbFormatSendAddrDtlDestination Address For BroadcastAddressing0Domaintx_timerRetryrpt_tim

Page 170 - SetInstance Method

OpenLDV Programmer’s Guide 69 msb lsbFormatSendAddrDtlDestination Address For Subnet/NodeAddressing0Domain Nodetx_timerRetryrpt_timerSubnetRe

Page 171 - SetOptions Method

70 Sending and Receiving Messages with the OpenLDV API 0 1 1 111 1 1msb lsbFormatReservedSendAddrDtlDestination Address For LocalAddressingDestinatio

Page 172 - DownlinkLookup Method

OpenLDV Programmer’s Guide 71 msb lsbFormatRcvAddrDtlReceived Address For BroadcastAddressingDomainNodeSubnetReservedSourceAddress0 0 0 0 0

Page 173 - UplinkLookup Method

viii GetEncryptionType Method ... 170 GetLNSNetworkName Method ...

Page 174 - ILdvxSCO Interface

72 Sending and Receiving Messages with the OpenLDV API msb lsbFormatRcvAddrDtlReceived Address For Subnet/NodeAddressingDomainNodeSubnetReservedSourc

Page 175

OpenLDV Programmer’s Guide 73 msb lsbFormatRespAddrDtlResponse Address For GroupAddressingDomainNodeSubnetReservedSourceAddressflex_domainDes

Page 176

74 Sending and Receiving Messages with the OpenLDV API UnprocessedNV 7 6 5 4 3 2 1 0 1 dir NV selector hi NV selector lo

Page 177 - GetDownlinkKey Method

OpenLDV Programmer’s Guide 75 Message Type Message Codes (Hex) Foreign responder offline 4F Network diagnostic message 50 .. 5F Network ma

Page 178

76 Sending and Receiving Messages with the OpenLDV API Message Code Comments Set Node Mode 0x6C On-line and off-line only. OpenLDV application s

Page 179

OpenLDV Programmer’s Guide 77 Uplink Commands An uplink command is a message read from a network interface by an OpenLDV application with the

Page 180 - GetUplinkKey Method

78 Sending and Receiving Messages with the OpenLDV API enumeration type definition NI_QueueCmd used in the field NI_Hdr.q.q_cmd of the application la

Page 181 - SetAuthenticationFlag Method

OpenLDV Programmer’s Guide 79 Network Interface Command Value Direction Description niCOMM + niTQ_P 0x13 Downlink Used for downlink pri

Page 182

80 Sending and Receiving Messages with the OpenLDV API Network Interface Command Value Direction Description niCOMM + niINCOMING 0x18 Uplink Us

Page 183 - SetEncryptionType Method

OpenLDV Programmer’s Guide 81 Network Interface Command Value Direction Description niNETMGMT + niNTQ_P 0x25 Downlink Used for downlink

Page 184 - SetLNSNetworkName Method

OpenLDV Programmer’s Guide 1 1 Introduction This chapter introduces the OpenLDV driver and how you can use it to send and receive LonTalk

Page 185

82 Sending and Receiving Messages with the OpenLDV API Network Interface Command Value Direction Description niL2_PRE_SHORT 0x34 Uplink Specifi

Page 186 - ILdvxSCO_TCP Interface

OpenLDV Programmer’s Guide 83 Network Interface Command Value Direction Description niONLINE 0x70 Downlink Requests that the network in

Page 187 - GetRemoteTCPPort Method

84 Sending and Receiving Messages with the OpenLDV API Network Interface Command Value Direction Description niFLUSH 0x90 Downlink Requests tha

Page 188 - SetRemoteTCPPort Method

OpenLDV Programmer’s Guide 85 Network Interface Command Value Direction Description niSERVICE 0xE6 Downlink Requests that the network i

Page 189 - GetNeuronID Method

86 Sending and Receiving Messages with the OpenLDV API Table 34. xDriver Specific Commands xDriver Command Description LDVX_NICMD_ENCRYPTION_ON_SEN

Page 190

OpenLDV Programmer’s Guide 87 xDriver Command Description LDVX_NICMD_ENCRYPTION_OFF_RECEIVE=0x05 Use this command to disable RC4 encryption

Page 192 - 184 Index

OpenLDV Programmer’s Guide 89 4 The OpenLDV Developer Example This chapter describes the OpenLDV Developer Example introduced with Open

Page 193

90 The OpenLDV Developer Example Overview The OpenLDV Developer Example is an example application that uses the OpenLDV API. The example application

Page 194

OpenLDV Programmer’s Guide 91 NiSendImmediate(), NiGetNextResponse(), NiSendResponse(), NiClose(), and NiEncryption(). The OpenLDVni.h heade

Comments to this Manuals

No comments