Owner's manual

Section 9. Developing an Application Using the Datalogger Control
Private Sub cmdDataStart_Click()
'Begin a manual poll to retrieve data
If DataLogger.serverConnected Then
DataLogger.manualPollStart
WriteMessage "Manual Poll Started"
Else
WriteMessage "Not connected to the LoggerNet server"
End If
End Sub
Private Sub cmdDataStop_Click()
'Try to cancel a manual poll that is in progress.
If DataLogger.serverConnected Then
DataLogger.manualPollCancel
WriteMessage "Trying to Cancel Manual Poll"
Else
WriteMessage "Not connected to the LoggerNet server"
End If
End Sub
Private Sub DataLogger_onManualPollComplete(ByVal _
successful As Boolean, ByVal response_code As _
CSIDATALOGGERLibCtl.manual_poll_outcome_type)
If successful Then
WriteMessage "Manual Poll Complete"
Else
If response_code = mp_outcome_aborted Then
WriteMessage "Manual Poll Aborted Successfully"
Else
WriteMessage "Manual Poll Failed. Code: " & _
response_code
End If
End If
End Sub
The programReceiveStart() method retrieves the current program from a
datalogger and saves it as a specified filename. The
onProgramReceiveProgress() event is triggered and provides information
regarding the progress of the program retrieval.
The
onProgramReceiveComplete() event also runs when the file retrieval
process either completes or fails. The following table shows example code for
the programReceiveStart() method:
9-6