Table of contents
Introduction
You can output a debug log from AdamApp by using ADAM_DEBUG_PRINT() fuction included in AdamDebug.h. (In this case, you do not need to call ADAM_DEBUG_OPEN() function nor ADAM_DEBUG_CLOSE() function.)
The logs will be saved in non-volatile memory of i-PRO camera itself if the UDP Log setting shown below
was not set.
The non-volatile memory is a ring buffer, thus the older logs will be overwritten by new ones.
The AdamApp log output will be in pf_<install ID>_<processId>.log* within log/adam in syslog.tgz which
can be obtained from the i-PRO Web display.
Also, this tutorial refers to the SDK installation directory as ${SDK_DIR}.
How to view debug logs on i-PRO
(1) Launch Google Chrome
(2) Click the "Extensions" button on the right side of the address bar in Chrome and click "Adam application manager for i-pro".
(3) Enter the IP address of the camera in Target and click the Connect button.
However, you cannot connect to the camera unless you are logged in to the camera.
If you cannot connect, enter the camera's IP address (eg 192.168.0.10) in the browser URL as shown below, and click the "Connect" button while logged into the camera.
UDPLog を有効にする
Set IP address and port number of PC to receive UDPLog by using Adam Control Extension.
Check the PC's IP address by using ipconfig at the command prompt.
Receive UDPLog
The tools for receiving and displaying UDPLog consists of ‘UDPLog receiving server’ and ‘UDPLog Receiver (Google Chrome extension)’. They are included in the iPRO_CAMERA_SDK as shown below.
UDPLog receiving server
${SDK_DIR}/tool/UDPLogRecvSrv
UDPLog Receiver
${SDK_DIR}/tool/ResourceMonitorExtension
* ‘UDPLog Receiver’ is included in ‘Resource Monitor’.
UDPLog receiving server
Start UDP Log receiving server by disabling the firewall on your PC.
On Windows, run UDPLogRecvSrv.exe. On Linux, run startup.sh.
Here, run ${SDK_DIR}/tool/UDPLogRecvSrv/UDPLogRecvSrv-win32-x64/UDPLogRecvSrv.exe.
Run a startup.sh using a root privilege if you are using well-known port for the UDP Log port number on Linux.
The following window will appear as you start ‘UDPLog receiving server’.
WebSocket Port Setting - Port :
Set port number used for WebSocket between ‘UDPLog receiving server’ and ‘UDPLog Receiver’. Normally, you can use the initial setting. If you receive UDPLogs from two or more cameras, change the setting to prevent duplication.
UdpLog File Setting - Write Limit :
Set the number of lines per file when outputting the received log data to files.
Operation - START / STOP :
Starts and stops receiving UDPLog.
Here, leave the default values and click the START button to start the UDPLog receiving server.
UDPLog Receiver
Launch Resource Monitor. Please refer to here(how to install)★link★ and here(how to launch)★link★ for how to install Resource Monitor and how to launch Resource Monitor respectively. Select ‘UDPLog Receiver’ in ‘Select Mode’.
WebSocket Settings - WebSocket Port :
Set port number used for WebSocket between ‘UDPLog receiving server’ and ‘UDPLog Receiver’. Normally, you can use the initial setting. If you receive UDPLogs from two or more cameras, change the setting to prevent duplication. The port number should be the same port number specified in [WebSocket Port Setting]-[Port] of ‘UDPLog receiving server’.
UdpLog Settings - Receive IP Address / Receive Port :
Set IP address and UDPLog receiving port number for the PC. Use the port number set in Adam Operation UI.
Here, specify the IP address (192.168.0.70) and port number (514) framed in red below.
Operation - START / STOP / CLEAR / COPY :
Starts and stops receiving UDPLog from the UDPLog receiving server. Click “CLEAR” to clear the display area. Click “COPY” to copy the display area to the clipboard.
Operation - Save To Files
UDPLog をファイル保存する場合、チェックします。本項目にチェックが入っている場合、START ボタン押下時にログ保存ディレクトリ名を設定するダイアログボックスが表示されます。ログ保存ディレクトリは UDPLog 受信サーバ「UDPLogRecvSrv.exe」と同じディレクトリ内に生成されます。
Operation - Single file
最大行数ごとにファイルを分割せず、単一ファイルにすべての UDPLog を保存する場合にチェックします。
Operation - Show realtime
UDPLog を表示エリアに表示する場合にチェックします。
Operation - Original log
受信ログをそのまま表示する場合にチェックします。チェックしていない場合、ログデータの行頭にシーケンス番号及び受信時の PC 時刻を付与します。
Operation - Show the latest [NNNN] lines
表示エリアに最新何行を表示するかを選択します。古いログから消えます。
Operation - STARTボタンを押してUDPLogが表示されることを確認してください。