User's Manual
281
.
Module - eAPI sample
eAPI_form - 1
Option Explicit
’ --------------------------------------
’ This program requires a valid command$
’ --------------------------------------
’ /Site:1
’ /eKernel address:*LOCAL or value xxx.xxx.xxx.xxx
’/eKernel port:2001
’ /Log drive:C
’ --------------------------------------
Private Function parse_cmd_line(keyword As String) As String
’ This routine isolates the value of a keyword from the command$
Dim lcl_cmd As String
Dim lcl_str As Integer
Dim lcl_end As Integer
On Error Resume Next
Err = 0
lcl_cmd = g_command
lcl_str = InStr(1, UCase(lcl_cmd), / & UCase(keyword) & :)
If lcl_str = 0 Then
parse_cmd_line = N/A
log S, INF, Warning : parameter ’ & keyword & ’ not available in ’ & lcl_cmd & ’
Else
lcl_end = InStr(lcl_str + 1, UCase(lcl_cmd) + /, /)
parse_cmd_line = Mid$(g_command + Space$(5), lcl_str + 2 + Len(keyword),
lcl_end - lcl_st
r - Len(keyword) - 3)
End If
If Err Then
MsgBox (Err.Description & - Unexpected error in parse_cmd_line() function)
log E, ERR, Err.Description & - Unexpected error in parse_cmd_line() function
End If
On Error GoTo 0
End Function
Private Function parse_xml(keyword As String, xml As String) As String
’ Isolates the ’value’ for a ’keyword’ from a ’xml’ string
’ When no value is found, ’N/A’ is returned
On Error Resume Next: Err = 0
Nortel Communication Server 1000
DECT Messenger Installation and Commissioning — Book 1
NN43120-301 02.01 4 June 2010
Copyright © 2003-2010 Nortel Networks. All Rights Reserved.
.