automotive-dlt
|
Go to the source code of this file.
Macros | |
#define | DLT_FILETRANSFER_ERROR_FILE_COMPLETE -300 |
#define | DLT_FILETRANSFER_ERROR_FILE_COMPLETE1 -301 |
#define | DLT_FILETRANSFER_ERROR_FILE_COMPLETE2 -302 |
#define | DLT_FILETRANSFER_ERROR_FILE_COMPLETE3 -303 |
#define | DLT_FILETRANSFER_ERROR_FILE_HEAD -400 |
#define | DLT_FILETRANSFER_ERROR_FILE_DATA -500 |
#define | DLT_FILETRANSFER_ERROR_FILE_DATA_USER_BUFFER_FAILED -501 |
#define | DLT_FILETRANSFER_ERROR_FILE_END -600 |
#define | DLT_FILETRANSFER_ERROR_INFO_ABOUT -700 |
#define | DLT_FILETRANSFER_ERROR_PACKAGE_COUNT -800 |
Functions | |
int | dlt_user_log_file_complete (DltContext *fileContext, const char *filename, int deleteFlag, int timeout) |
Transfer the complete file as several dlt logs. More... | |
int | dlt_user_log_file_packagesCount (DltContext *fileContext, const char *filename) |
This method gives information about the number of packages the file have. More... | |
int | dlt_user_log_file_infoAbout (DltContext *fileContext, const char *filename) |
Logs specific file inforamtions to dlt. More... | |
int | dlt_user_log_file_header_alias (DltContext *fileContext, const char *filename, const char *alias) |
Transfer the head of the file as a dlt logs. More... | |
int | dlt_user_log_file_header (DltContext *fileContext, const char *filename) |
Transfer the head of the file as a dlt logs. More... | |
int | dlt_user_log_file_data (DltContext *fileContext, const char *filename, int packageToTransfer, int timeout) |
Transfer the content data of a file. More... | |
int | dlt_user_log_file_end (DltContext *fileContext, const char *filename, int deleteFlag) |
Transfer the end of the file as a dlt logs. More... | |
Definition in file dlt_filetransfer.h.
#define DLT_FILETRANSFER_ERROR_FILE_COMPLETE -300 |
Definition at line 35 of file dlt_filetransfer.h.
Referenced by dlt_user_log_file_complete().
#define DLT_FILETRANSFER_ERROR_FILE_COMPLETE1 -301 |
Definition at line 37 of file dlt_filetransfer.h.
Referenced by dlt_user_log_file_complete().
#define DLT_FILETRANSFER_ERROR_FILE_COMPLETE2 -302 |
Definition at line 39 of file dlt_filetransfer.h.
Referenced by dlt_user_log_file_complete().
#define DLT_FILETRANSFER_ERROR_FILE_COMPLETE3 -303 |
Definition at line 41 of file dlt_filetransfer.h.
Referenced by dlt_user_log_file_complete().
#define DLT_FILETRANSFER_ERROR_FILE_DATA -500 |
Definition at line 45 of file dlt_filetransfer.h.
Referenced by dlt_user_log_file_data().
#define DLT_FILETRANSFER_ERROR_FILE_DATA_USER_BUFFER_FAILED -501 |
Definition at line 47 of file dlt_filetransfer.h.
#define DLT_FILETRANSFER_ERROR_FILE_END -600 |
Definition at line 49 of file dlt_filetransfer.h.
Referenced by dlt_user_log_file_end().
#define DLT_FILETRANSFER_ERROR_FILE_HEAD -400 |
Definition at line 43 of file dlt_filetransfer.h.
Referenced by dlt_user_log_file_header(), and dlt_user_log_file_header_alias().
#define DLT_FILETRANSFER_ERROR_INFO_ABOUT -700 |
Definition at line 51 of file dlt_filetransfer.h.
Referenced by dlt_user_log_file_infoAbout().
#define DLT_FILETRANSFER_ERROR_PACKAGE_COUNT -800 |
Definition at line 53 of file dlt_filetransfer.h.
Referenced by dlt_user_log_file_packagesCount().
int dlt_user_log_file_complete | ( | DltContext * | fileContext, |
const char * | filename, | ||
int | deleteFlag, | ||
int | timeout | ||
) |
Transfer the complete file as several dlt logs.
This method transfer the complete file as several dlt logs. At first it will be checked that the file exist. In the next step some generic informations about the file will be logged to dlt. Now the header will be logged to dlt. See the method dlt_user_log_file_header for more informations. Then the method dlt_user_log_data will be called with the parameter to log all packages in a loop with some timeout. At last dlt_user_log_end is called to signal that the complete file transfer was okey. This is important for the plugin of the dlt viewer.
fileContext | Specific context to log the file to dlt |
filename | Absolute file path |
deleteFlag | Flag if the file will be deleted after transfer. 1->delete, 0->notDelete |
timeout | Timeout in ms to wait between some logs. Important that the FIFO of dlt will not be flooded with to many messages in a short period of time. |
This method transfer the complete file as several dlt logs. At first it will be checked that the file exist. In the next step some generic informations about the file will be logged to dlt. Now the header will be logged to dlt. See the method dlt_user_log_file_header for more informations. Then the method dlt_user_log_data will be called with the parameter to log all packages in a loop with some timeout. At last dlt_user_log_end is called to signal that the complete file transfer was okey. This is important for the plugin of the dlt viewer.
fileContext | Specific context to log the file to dlt |
filename | Absolute file path |
deleteFlag | Flag if the file will be deleted after transfer. 1->delete, 0->notDelete |
timeout | Timeout in ms to wait between some logs. Important that the FIFO of dlt will not be flooded with to many messages in a short period of time. |
Definition at line 317 of file dlt_filetransfer.c.
References DLT_FILETRANSFER_ERROR_FILE_COMPLETE, DLT_FILETRANSFER_ERROR_FILE_COMPLETE1, DLT_FILETRANSFER_ERROR_FILE_COMPLETE2, DLT_FILETRANSFER_ERROR_FILE_COMPLETE3, DLT_FILETRANSFER_TRANSFER_ALL_PACKAGES, dlt_user_log_file_data(), dlt_user_log_file_end(), dlt_user_log_file_errorMessage(), dlt_user_log_file_header(), and isFile().
Referenced by main(), testFile1Run1(), testFile2Run1(), and testFile3Run1().
int dlt_user_log_file_data | ( | DltContext * | fileContext, |
const char * | filename, | ||
int | packageToTransfer, | ||
int | timeout | ||
) |
Transfer the content data of a file.
See the Mainpages.c for more informations.
fileContext | Specific context to log the file to dlt |
filename | Absolute file path |
packageToTransfer | Package number to transfer. If this param is LONG_MAX, the whole file will be transferred with a specific timeout |
timeout | Timeout to wait between dlt logs. Important because the dlt FIFO should not be flooded. Default is defined by MIN_TIMEOUT. The given timeout in ms can not be smaller than MIN_TIMEOUT. |
See the Mainpages.c for more informations.
fileContext | Specific context to log the file to dlt |
filename | Absolute file path |
packageToTransfer | Package number to transfer. If this param is LONG_MAX, the whole file will be transferred with a specific timeout |
timeout | Timeout to wait between dlt logs. Important because the dlt FIFO should not be flooded. Default is defined by MIN_TIMEOUT. The given timeout in ms can not be smaller than MIN_TIMEOUT. |
Definition at line 496 of file dlt_filetransfer.c.
References buffer, BUFFER_SIZE, checkUserBufferForFreeSpace(), DLT_FILETRANSFER_ERROR_FILE_DATA, DLT_FILETRANSFER_TRANSFER_ALL_PACKAGES, DLT_INT, DLT_LOG, DLT_LOG_ERROR, DLT_LOG_INFO, DLT_RAW, DLT_STRING, DLT_UINT, dlt_user_log_file_errorMessage(), dlt_user_log_file_packagesCount(), doTimeout(), getFileSerialNumber(), isFile(), and NULL.
Referenced by dlt_user_log_file_complete(), send_dumped_file(), testFile1Run2(), testFile2Run2(), and testFile3Run2().
int dlt_user_log_file_end | ( | DltContext * | fileContext, |
const char * | filename, | ||
int | deleteFlag | ||
) |
Transfer the end of the file as a dlt logs.
The end of the file must be logged to dlt because the end contains inforamtion about the file serial number. This informations is needed from the plugin of the dlt viewer. See the Mainpages.c for more informations.
fileContext | Specific context to log the file to dlt |
filename | Absolute file path |
deleteFlag | Flag to delete the file after the whole file is transferred (logged to dlt).1->delete,0->NotDelete |
The end of the file must be logged to dlt because the end contains inforamtion about the file serial number. This informations is needed from the plugin of the dlt viewer. See the Mainpages.c for more informations.
fileContext | Specific context to log the file to dlt |
filename | Absolute file path |
deleteFlag | Flag to delete the file after the whole file is transferred (logged to dlt).1->delete,0->NotDelete |
Definition at line 621 of file dlt_filetransfer.c.
References DLT_FILETRANSFER_ERROR_FILE_END, DLT_LOG, DLT_LOG_ERROR, DLT_LOG_INFO, DLT_STRING, DLT_UINT, dlt_user_log_file_errorMessage(), doRemoveFile(), getFileSerialNumber(), and isFile().
Referenced by dlt_user_log_file_complete(), send_dumped_file(), testFile1Run2(), testFile2Run2(), and testFile3Run2().
int dlt_user_log_file_header | ( | DltContext * | fileContext, |
const char * | filename | ||
) |
Transfer the head of the file as a dlt logs.
The head of the file must be logged to dlt because the head contains inforamtion about the file serial number, the file name, the file size, package number the file have and the buffer size. All these informations are needed from the plugin of the dlt viewer. See the Mainpages.c for more informations.
fileContext | Specific context to log the file to dlt |
filename | Absolute file path |
The head of the file must be logged to dlt because the head contains inforamtion about the file serial number, the file name, the file size, package number the file have and the buffer size. All these informations are needed from the plugin of the dlt viewer. See the Mainpages.c for more informations.
fileContext | Specific context to log the file to dlt |
filename | Absolute file path |
Definition at line 447 of file dlt_filetransfer.c.
References BUFFER_SIZE, DLT_FILETRANSFER_ERROR_FILE_HEAD, DLT_LOG, DLT_LOG_ERROR, DLT_LOG_INFO, DLT_STRING, DLT_UINT, dlt_user_log_file_errorMessage(), dlt_user_log_file_packagesCount(), getFileCreationDate2(), getFileSerialNumber(), getFilesize(), and isFile().
Referenced by dlt_user_log_file_complete(), testFile1Run2(), testFile2Run2(), and testFile3Run2().
int dlt_user_log_file_header_alias | ( | DltContext * | fileContext, |
const char * | filename, | ||
const char * | alias | ||
) |
Transfer the head of the file as a dlt logs.
The head of the file must be logged to dlt because the head contains inforamtion about the file serial number, the file name, the file size, package number the file have and the buffer size. All these informations are needed from the plugin of the dlt viewer. See the Mainpages.c for more informations.
fileContext | Specific context to log the file to dlt |
filename | Absolute file path |
alias | Alias for the file. An alternative name to show in the receiving end |
The head of the file must be logged to dlt because the head contains inforamtion about the file serial number, the file name, the file size, package number the file have and the buffer size. All these informations are needed from the plugin of the dlt viewer. See the Mainpages.c for more informations.
fileContext | Specific context to log the file to dlt |
filename | Absolute file path |
alias | Alias for the file. An alternative name to show in the receiving end |
Definition at line 398 of file dlt_filetransfer.c.
References BUFFER_SIZE, DLT_FILETRANSFER_ERROR_FILE_HEAD, DLT_LOG, DLT_LOG_ERROR, DLT_LOG_INFO, DLT_STRING, DLT_UINT, dlt_user_log_file_errorMessage(), dlt_user_log_file_packagesCount(), getFileCreationDate2(), getFileSerialNumber(), getFilesize(), and isFile().
Referenced by send_dumped_file().
int dlt_user_log_file_infoAbout | ( | DltContext * | fileContext, |
const char * | filename | ||
) |
Logs specific file inforamtions to dlt.
The filename, file size, file serial number and the number of packages will be logged to dlt.
fileContext | Specific context |
filename | Absolute file path |
The filename, file size, file serial number and the number of packages will be logged to dlt.
fileContext | Specific context |
filename | Absolute file path |
Definition at line 270 of file dlt_filetransfer.c.
References DLT_FILETRANSFER_ERROR_INFO_ABOUT, DLT_LOG, DLT_LOG_ERROR, DLT_LOG_INFO, DLT_STRING, DLT_UINT, dlt_user_log_file_errorMessage(), dlt_user_log_file_packagesCount(), getFileCreationDate2(), getFileSerialNumber(), getFilesize(), and isFile().
Referenced by main(), and testFile3Run3().
int dlt_user_log_file_packagesCount | ( | DltContext * | fileContext, |
const char * | filename | ||
) |
This method gives information about the number of packages the file have.
Every file will be divided into several packages. Every package will be logged as a single dlt log. The number of packages depends on the BUFFER_SIZE. At first it will be checked if the file exist. Then the file will be divided into several packages depending on the buffer size.
fileContext | Specific context to log the file to dlt |
filename | Absolute file path |
Every file will be divided into several packages. Every package will be logged as a single dlt log. The number of packages depends on the BUFFER_SIZE. At first it will be checked if the file exist. Then the file will be divided into several packages depending on the buffer size.
fileContext | Specific context to log the file to dlt |
filename | Absolute file path |
Definition at line 352 of file dlt_filetransfer.c.
References BUFFER_SIZE, DLT_FILETRANSFER_ERROR_PACKAGE_COUNT, DLT_INT, DLT_LOG, DLT_LOG_ERROR, DLT_STRING, getFilesize(), and isFile().
Referenced by dlt_user_log_file_data(), dlt_user_log_file_errorMessage(), dlt_user_log_file_header(), dlt_user_log_file_header_alias(), dlt_user_log_file_infoAbout(), send_dumped_file(), testFile1Run2(), testFile2Run2(), and testFile3Run2().