Echelon OpenLDV Manual do Utilizador

Consulte online ou descarregue Manual do Utilizador para Software Echelon OpenLDV. Echelon OpenLDV User Manual Manual do Utilizador

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 194
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes

Resumo do Conteúdo

Página 1 - Programmer’s Guide

OpenLDV Programmer’s Guide078-0275-01D

Página 2

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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 8

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

Página 9 - Introduction

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

Página 10 - ONWORKS network:

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

Página 11 - Client Applications

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

Página 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

Página 13

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

Página 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

Página 15

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

Página 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

Página 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

Página 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

Página 19

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

Página 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

Página 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

Página 22

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

Página 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

Página 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

Página 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

Página 26

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

Página 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

Página 28

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

Página 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

Página 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

Página 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

Página 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

Página 33

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

Página 34

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

Página 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

Página 36

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

Página 37

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

Página 38

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

Página 39

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

Página 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

Página 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

Página 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

Página 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

Página 44

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

Página 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

Página 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

Página 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

Página 48 - LdvDeviceCaps Enumeration

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

Página 49

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

Página 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

Página 51 - LdvDriverID Enumeration

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

Página 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

Página 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

Página 54

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

Página 55

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

Página 56

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

Página 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

Página 58

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

Página 59

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

Página 60

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

Página 61

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

Página 62 - msgSize);

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

Página 63

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

Página 64

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

Página 65

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

Página 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

Página 67

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

Página 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

Página 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

Página 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

Página 72

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

Página 73 - NetVarHdr

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

Página 74 - ONWORKS transceivers

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

Página 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

Página 76

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

Página 78 - RcvAddrDtl

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

Página 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

Página 80 - RespAddrDtl

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

Página 81 - Message Data

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

Página 82 - ExplicitMsg

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

Página 83

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

Página 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

Página 85 - Network Interface Commands

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

Página 86

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

Página 87

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

Página 88

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

Página 89

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

Página 90

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

Página 91

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

Página 92

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

Página 93

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

Página 94

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

Página 95

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

Página 96

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

Página 97

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

Página 98 - Dispatchers

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

Página 99 - Toolkits and User Interface

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

Página 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

Página 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

Página 102

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

Página 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

Página 104

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

Página 105

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

Página 107 - Extending xDriver

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

Página 108 - Downlink Sessions

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

Página 109

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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 115 - Typical Uplink Scenario

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

Página 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

Página 117

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

Página 118

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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 125

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

Página 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

Página 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

Página 128

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

Página 129

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

Página 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

Página 131

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

Página 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

Página 133

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

Página 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

Página 135 - Add a COM Class

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

Página 136

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

Página 137

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

Página 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 (

Página 139

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

Página 140

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

Página 141

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

Página 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_

Página 143

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

Página 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.

Página 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

Página 146

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

Página 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

Página 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

Página 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

Página 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

Página 151

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

Página 152

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

Página 153

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

Página 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

Página 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

Página 157

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

Página 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

Página 159

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

Página 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

Página 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

Página 162 - Remarks

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

Página 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)

Página 164 - Syntax

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

Página 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

Página 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

Página 167

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

Página 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

Página 169 - Component Programming

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

Página 170 - SetInstance Method

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

Página 171 - SetOptions Method

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

Página 172 - DownlinkLookup Method

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

Página 173 - UplinkLookup Method

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

Página 174 - ILdvxSCO Interface

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

Página 175

OpenLDV Programmer’s Guide 73 msb lsbFormatRespAddrDtlResponse Address For GroupAddressingDomainNodeSubnetReservedSourceAddressflex_domainDes

Página 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

Página 177 - GetDownlinkKey Method

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

Página 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

Página 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

Página 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

Página 181 - SetAuthenticationFlag Method

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

Página 182

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

Página 183 - SetEncryptionType Method

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

Página 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

Página 185

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

Página 186 - ILdvxSCO_TCP Interface

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

Página 187 - GetRemoteTCPPort Method

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

Página 188 - SetRemoteTCPPort Method

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

Página 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

Página 190

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

Página 192 - 184 Index

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

Página 193

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

Página 194

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

Comentários a estes Manuais

Sem comentários