User's Manual

lcl_guarding = Timer - g_guarding
If lcl_guarding < 0 Then lcl_guarding = lcl_guarding + 86400
If (lab_guarding <> Format$(lcl_guarding, 00000)) Then
lab_guarding = Format$(lcl_guarding, 00000)
End If
' Process ekernel
process_ekernel
' Enable timer to resume processing
tim.Enabled = True
End Sub
Private Sub txt_log_GotFocus()
lst_log.SetFocus
End Sub
Sub log(log_type As String, log_sts As String, log_dta As String)
Dim lcl_rc As Integer
' Check log_type
Select Case log_type
eAPI_form - 7
Case I
Case O
Case S
Case E
Case Else
lcl_rc = MsgBox(Invalid log type & log_type)
Exit Sub
End Select
' Check log_sts
Select Case log_sts
Case TCP
Case COM
Case INF
Case ERR
Case Else
lcl_rc = MsgBox(Invalid log status & log_sts)
Exit Sub
End Select
' Add log data to listbox
lst_log.AddItem log_type & : & log_sts & : & log_dta
Do While lst_log.ListCount > 99
lst_log.RemoveItem 0
Loop
lst_log.ListIndex = lst_log.ListCount - 1
'--------------------------------------------------------------------------------
' Add log data to logfile
'
--------------------------------------------------------------------------------
' do not log is g_log_days=0
If g_ekernel_remote_port = Then Exit Sub
' build directory and file
Dim lcl_path As String
Dim lcl_file As String
' start error recovery
On Error Resume Next: Err = 0
' if specified drive is valid, try to toggle between C: drive and D: drive
Err = 0
Dim lcl_chk As Integer
lcl_chk = Len(Dir$(g_log_path, vbDirectory))
lcl_path = g_log_path
If Len(Dir$(lcl_path, vbDirectory)) = 0 Then
MkDir lcl_path
End If
lcl_chk = Len(Dir$(g_log_path, vbDirectory))
If ((Err = 52) Or (lcl_chk = 0)) Then
Module - eAPI sample
78 DECT Messenger Installation and Commissioning — Book 1 March 2012
Comments? infodev@avaya.com