4-19
Remote Control
Reading the Measurement Results
The
GetParm
subroutine finds the first row in the recordset that contains the
desired parameter name and returns its value. Note the use of the Visual Basic
GetChunk method and the
ByteArrayToVariant
routine. This is the technique
used to store array values in the results database. The database treats the long
binary as a binary large object (or “BLOB”) and in order to obtain the actual
array values, the BLOB must be converted. The
ByteArrayToVariant
function uses
file I/O to convert between data stored as a long binary and a Visual Basic vari-
ant array.
The GetParm subroutine
The routine GetParm is given by the following:
Public Function GetParm(rsData As Recordset, sParmName As String) As Variant
' Caution: All non-array values are returned as strings. Thus if you are
' getting a number, it may be necessary for you to use Val(GetParm())
' so that the parameter is converted to a number.
Dim btByteArray() As Byte
With rsData
If Not .BOF Then
.FindFirst "sParmName = '" & sParmName & "'"
If Not .NoMatch Then
If !vValue <> "<ARRAY>" Then
GetParm = !vValue
Else
btByteArray = !vArrayValue.GetChunk(0, vArrayValue.FieldSize())
GetParm = ByteArrayToVariant(btByteArray)
End If
Else
Err.Raise vbObjectError, "GetParm", sParmName & _
" parameter undefined in results database!”
End If
Else
Err.Raise vbObjectError, "GetParm", sParmName & _
" parameter undefined in results database!”
End If
End With
End Function
Summary of Contents for 86037B
Page 1: ...User s Guide HP 86037B Chromatic Dispersion Test System ...
Page 31: ...2 13 Operation The Main Window Figure 2 4 Repeat Measurement Selector ...
Page 72: ...3 16 Normalization Setting Normalization Preferences ...
Page 94: ...4 22 Remote Control TES Parameters Main chromatic dispersion screen ...
Page 100: ...4 28 Remote Control TES Parameters CD and Gain Measurement Settings Dialog Box ...
Page 102: ...4 30 Remote Control TES Parameters Length Measurement Settings Dialog Box ...
Page 104: ...4 32 Remote Control TES Parameters Normalization Settings Dialog Box ...
Page 106: ...4 34 Remote Control TES Parameters New Normalization Button Dialog Box ...
Page 120: ...4 48 Remote Control Output Parameters ...
Page 158: ...5 38 Maintenance Hewlett Packard Sales and Service Offices ...
Page 170: ...6 12 Installation Installation ...
Page 174: ...7 4 Reference Theory of Operation Figure 7 3 HP 86037B Block Diagram Options 121 and 122 ...
Page 175: ...7 5 Reference Theory of Operation Figure 7 4 The HP 86037B Option 114 block diagram ...
Page 190: ...7 20 Reference System Options ...
Page 191: ...8 Specifications 8 3 Regulatory Information 8 7 Specifications and Regulatory Information ...
Page 204: ...Index 6 Index ...