1. overview
	diagsaver works as agent to receive diag message from UE and save diag log on AP board.

2. how to compile the code
	Makefile is provided in the source directory, what need to be done is to
	modify the tool change defined in the Makefile

	CC = gcc // change it to cross tool change on your platform
	LD = ld // change it to cross tool change on your platform
	AR = ar // change it to cross tool change on your platform

Example:
sudo ./diagsaver

>========================================================
>               ASE DiagSaver v3.0.0.0
>========================================================
>========================================================
>Please input the communication number to select one method to capture
>               0 Diag
>               1 ttyUSB
:0 or 1 #if UE transfer log by Diag USB,input 0;if UE transfer log by ttyUSB/ttyACM input 1

#if input 0, the diagsaver would find all support Device, as follows:
>========================================================
>Found Diag Devices:
>  DevNum    Path                  iSerialNumber
>--------------------------------------------------------
># Device 0: /dev/bus/usb/001/112  123456789ABCD
>--------------------------------------------------------
>Please input the device number to select one device to capture
>Or input "r" to refresh device list
>[Example: "0" means capture the log from device 0 ]
:0 or r #input "0" means select Device 0,or input "r" to refresh device list

#if we select ttyUSB, we should input the dev path of Device,as follows:
>========================================================
>Please input Device path [Example: /dev/ttyUSB0]
:/dev/ttyUSB0


>========================================================
>Please enter Max sdl file count[Example: 20]:
100 #this means the max count of log is 100

>========================================================
>Please enter the Dir of Log Files[Example: ./]:
/tmp/DiagLogs #this means the logs will be saved in /tmp/DiagLogs

>========================================================
>Please enter the Log File Size MB, Not Bigger than 200M or Input 0 to Create a new Log File when UE reboot[Example: 20]:
0 or 100 #if input 0 means we will create a new log file when UE reboot, if input 100 means we will create a new log file when log file is bigger than 100M

then the diagsaver would capture log from UE...

For convenience we can use redirect to input,like sudo ./diagsaver < input
the content of input may like:
0 #transfer by Diag USB
0 #select Device0
100 #max count of log is 100
./b #save logs in ./b
0 #create a new log file when UE reboot
