automotive-dlt
dlt_filetransfer.h
Go to the documentation of this file.
1 /*
2  * @licence app begin@
3  * SPDX license identifier: MPL-2.0
4  *
5  * Copyright (C) 2011-2015, BMW AG
6  *
7  * This file is part of GENIVI Project DLT - Diagnostic Log and Trace.
8  *
9  * This Source Code Form is subject to the terms of the
10  * Mozilla Public License (MPL), v. 2.0.
11  * If a copy of the MPL was not distributed with this file,
12  * You can obtain one at http://mozilla.org/MPL/2.0/.
13  *
14  * For further information see http://www.genivi.org/.
15  * @licence end@
16  */
17 
27 #include <limits.h> /* Needed for LONG_MAX */
28 #include <sys/stat.h> /* Needed for struct stat st*/
29 #include "dlt.h" /* Needed for DLT Logs */
30 #include <signal.h> /* Signal handling */
31 #include "errno.h"
32 
33 
34 /* ! Error code for dlt_user_log_file_complete */
35 #define DLT_FILETRANSFER_ERROR_FILE_COMPLETE -300
36 /* ! Error code for dlt_user_log_file_complete */
37 #define DLT_FILETRANSFER_ERROR_FILE_COMPLETE1 -301
38 /* ! Error code for dlt_user_log_file_complete */
39 #define DLT_FILETRANSFER_ERROR_FILE_COMPLETE2 -302
40 /* ! Error code for dlt_user_log_file_complete */
41 #define DLT_FILETRANSFER_ERROR_FILE_COMPLETE3 -303
42 /* ! Error code for dlt_user_log_file_head */
43 #define DLT_FILETRANSFER_ERROR_FILE_HEAD -400
44 /* ! Error code for dlt_user_log_file_data */
45 #define DLT_FILETRANSFER_ERROR_FILE_DATA -500
46 /* ! Error code for dlt_user_log_file_data */
47 #define DLT_FILETRANSFER_ERROR_FILE_DATA_USER_BUFFER_FAILED -501
48 /* ! Error code for dlt_user_log_file_end */
49 #define DLT_FILETRANSFER_ERROR_FILE_END -600
50 /* ! Error code for dlt_user_log_file_infoAbout */
51 #define DLT_FILETRANSFER_ERROR_INFO_ABOUT -700
52 /* ! Error code for dlt_user_log_file_packagesCount */
53 #define DLT_FILETRANSFER_ERROR_PACKAGE_COUNT -800
54 
55 
56 /* !Transfer the complete file as several dlt logs. */
68 extern int dlt_user_log_file_complete(DltContext *fileContext, const char *filename, int deleteFlag, int timeout);
69 
70 
71 /* !This method gives information about the number of packages the file have */
80 extern int dlt_user_log_file_packagesCount(DltContext *fileContext, const char *filename);
81 
82 
83 /* !Logs specific file inforamtions to dlt */
89 extern int dlt_user_log_file_infoAbout(DltContext *fileContext, const char *filename);
90 
91 
92 /* !Transfer the head of the file as a dlt logs. */
102 extern int dlt_user_log_file_header_alias(DltContext *fileContext, const char *filename, const char *alias);
103 
104 /* !Transfer the head of the file as a dlt logs. */
113 extern int dlt_user_log_file_header(DltContext *fileContext, const char *filename);
114 
115 
116 /* !Transfer the content data of a file. */
124 extern int dlt_user_log_file_data(DltContext *fileContext, const char *filename, int packageToTransfer, int timeout);
125 
126 
127 
128 /* !Transfer the end of the file as a dlt logs. */
137 extern int dlt_user_log_file_end(DltContext *fileContext, const char *filename,int deleteFlag);
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.
int dlt_user_log_file_packagesCount(DltContext *fileContext, const char *filename)
This method gives information about the number of packages the file have.
int dlt_user_log_file_infoAbout(DltContext *fileContext, const char *filename)
Logs specific file inforamtions to dlt.
int dlt_user_log_file_data(DltContext *fileContext, const char *filename, int packageToTransfer, int timeout)
Transfer the content data of a file.
int dlt_user_log_file_end(DltContext *fileContext, const char *filename, int deleteFlag)
Transfer the end of the file as a dlt logs.
int dlt_user_log_file_complete(DltContext *fileContext, const char *filename, int deleteFlag, int timeout)
Transfer the complete file as several dlt logs.
int dlt_user_log_file_header(DltContext *fileContext, const char *filename)
Transfer the head of the file as a dlt logs.