Bluetooth Special Interest Group Inc. BTSIG15A Manual Do Utilizador

Página de 162
Extended Automating 
81 
 
Release() 
 
QueryInterface() 
In addition, the object needs to implement a function called Log() which will be called every time that PTS would normally 
send something to the Test Case execution log window. 
The second step to diverting the execution log is to provide an instance of the IPTSControlClientLogger derived object to 
the PTS Control API via the SetControlClientLoggerCallback() function. 
IPTSControlClientLogger::Log() 
Declaration: 
HRESULT Log(PTS_LOGTYPE logType, LPCWSTR szLogType, LPCWSTR szTime, 
LPCWSTR pszMessage); 
  
  
Parameters:  logType: The type of the logging event. See the table below. 
  
  
  
szLogType: A Unicode character string that contains the name of the Test Case event being logged. 
  
  
  
szTime: A Unicode character string that contains the time of the event being logged. The time is a value in 
milliseconds from the start of the Test Case execution. 
  
  
  
pszMessage: A Unicode character string that contains the information about the event that is being logged. 
  
  
Return 
values: 
The user implementation of this function should return a value greater than or equal to zero if successful. 
The user implementation of this function should return a value less than zero if not successful. 
  
The three character strings passed to the Log() function contain the three pieces of information that are normally shown in 
the Test Case execution log window in the PTS User Interface. These strings may be used to create log output that looks 
just like the information displayed in the Test Case execution window. For example, the following event might be 
displayed in the Test Case execution log window: 
+3666 ms 
Receive event:
 
:[3]HCI?HCI_READ_LOCAL_VERSION_INFORMATION_COMPLETE_EVENT=PDU:{ 
status:HCI_OK, 
hciVersion:4, 
hciRevision:5360, 
lmpVersion:4, 
manufacturerName:10, 
lmpSubversion:5360