Campbell-scientific LoggerNet-SDK Software Development Kit Manuel d'utilisateur Page 84

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 178
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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
Vue de la page 83
1 2 ... 79 80 81 82 83 84 85 86 87 88 89 ... 177 178

Commentaires sur ces manuels

Pas de commentaire