Campbell-scientific LoggerNet-SDK Software Development Kit Instrukcja Użytkownika Strona 84

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 178
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 83
Section 16. CsiBrokerMap Control Reference
16.2.2 Methods
BrokerCollection.Item()
Name
BrokerCollection.Item(id) As Broker
Description
A Broker can be referenced by an integer, a long, or by the name of the Broker
(a string). If the number is less than zero or is greater than the number of
brokers minus one, then the COM error E_CSI_ARRAY_OUT_OF_BOUNDS
will be returned. If the broker cannot be found by name, then the COM error
E_CSI_NOT_FOUND will be returned.
COM Return Values
Table of Possible Values
Code Meaning
S_OK
Success: Normal return
E_CSI_ARRAY_OUT_OF_BOUNDS
Error: Array out of bounds
E_CSI_NOT_FOUND
Error: Couldn't find the broker by
name in the broker map
E_CSI_FAIL
Error: Wrong variant type passed to
this method or unexpected error
Visual Basic
Return Type
Broker
Example
Referencing the broker by a number value
Dim iterator As Long
For iterator = 0 to BrokerMap.Broker.Count – 1
Debug.Print
BrokerMap.Brokers(iterator).ID
Next iterator
Referencing the broker by name:
Dim brokerName as String
Dim myid as long
brokerName = "cr10x"
myid = BrokerMap.Brokers(brokerName).id
16-8
Przeglądanie stron 83
1 2 ... 79 80 81 82 83 84 85 86 87 88 89 ... 177 178

Komentarze do niniejszej Instrukcji

Brak uwag