Echelon OpenLDV Uživatelský manuál

Procházejte online nebo si stáhněte Uživatelský manuál pro Software Echelon OpenLDV. Echelon OpenLDV User Manual Uživatelská příručka

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 194
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků

Shrnutí obsahu

Strany 1 - Programmer’s Guide

OpenLDV Programmer’s Guide078-0275-01D

Strany 2

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 8

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

Strany 9 - Introduction

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

Strany 10 - ONWORKS network:

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

Strany 11 - Client Applications

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

Strany 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

Strany 13

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

Strany 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

Strany 15

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

Strany 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

Strany 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

Strany 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

Strany 19

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

Strany 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

Strany 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

Strany 22

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

Strany 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

Strany 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

Strany 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

Strany 26

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

Strany 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

Strany 28

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 33

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

Strany 34

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

Strany 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

Strany 36

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

Strany 37

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

Strany 38

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

Strany 39

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 44

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

Strany 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

Strany 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

Strany 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

Strany 48 - LdvDeviceCaps Enumeration

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

Strany 49

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

Strany 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

Strany 51 - LdvDriverID Enumeration

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

Strany 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

Strany 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

Strany 54

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

Strany 55

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

Strany 56

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

Strany 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

Strany 58

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

Strany 59

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

Strany 60

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

Strany 61

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

Strany 62 - msgSize);

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

Strany 63

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

Strany 64

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

Strany 65

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

Strany 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

Strany 67

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

Strany 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

Strany 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

Strany 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

Strany 72

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

Strany 73 - NetVarHdr

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

Strany 74 - ONWORKS transceivers

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

Strany 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

Strany 76

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

Strany 78 - RcvAddrDtl

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

Strany 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

Strany 80 - RespAddrDtl

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

Strany 81 - Message Data

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

Strany 82 - ExplicitMsg

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

Strany 83

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

Strany 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

Strany 85 - Network Interface Commands

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

Strany 86

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

Strany 87

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

Strany 88

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

Strany 89

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

Strany 90

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

Strany 91

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

Strany 92

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

Strany 93

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

Strany 94

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

Strany 95

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

Strany 96

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

Strany 97

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

Strany 98 - Dispatchers

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

Strany 99 - Toolkits and User Interface

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

Strany 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

Strany 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

Strany 102

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

Strany 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

Strany 104

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

Strany 105

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

Strany 107 - Extending xDriver

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

Strany 108 - Downlink Sessions

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

Strany 109

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 115 - Typical Uplink Scenario

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

Strany 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

Strany 117

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

Strany 118

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 125

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

Strany 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

Strany 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

Strany 128

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

Strany 129

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

Strany 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

Strany 131

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

Strany 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

Strany 133

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

Strany 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

Strany 135 - Add a COM Class

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

Strany 136

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

Strany 137

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

Strany 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 (

Strany 139

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

Strany 140

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

Strany 141

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

Strany 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_

Strany 143

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

Strany 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.

Strany 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

Strany 146

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 151

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

Strany 152

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

Strany 153

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

Strany 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

Strany 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

Strany 157

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

Strany 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

Strany 159

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

Strany 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

Strany 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

Strany 162 - Remarks

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

Strany 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)

Strany 164 - Syntax

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

Strany 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

Strany 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

Strany 167

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

Strany 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

Strany 169 - Component Programming

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

Strany 170 - SetInstance Method

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

Strany 171 - SetOptions Method

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

Strany 172 - DownlinkLookup Method

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

Strany 173 - UplinkLookup Method

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

Strany 174 - ILdvxSCO Interface

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

Strany 175

OpenLDV Programmer’s Guide 73 msb lsbFormatRespAddrDtlResponse Address For GroupAddressingDomainNodeSubnetReservedSourceAddressflex_domainDes

Strany 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

Strany 177 - GetDownlinkKey Method

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

Strany 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

Strany 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

Strany 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

Strany 181 - SetAuthenticationFlag Method

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

Strany 182

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

Strany 183 - SetEncryptionType Method

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

Strany 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

Strany 185

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

Strany 186 - ILdvxSCO_TCP Interface

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

Strany 187 - GetRemoteTCPPort Method

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

Strany 188 - SetRemoteTCPPort Method

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

Strany 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

Strany 190

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

Strany 192 - 184 Index

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

Strany 193

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

Strany 194

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

Komentáře k této Příručce

Žádné komentáře