summaryrefslogtreecommitdiff
path: root/src/lib/dlt_filetransfer.c
diff options
context:
space:
mode:
authorLassi Marttala <lassi.lm.marttala@partner.bmw.de>2012-05-16 10:10:12 +0200
committerChristian Muck <christian.muck@bmw.de>2012-06-13 23:50:08 +0200
commitf8f80a07afd45d60c2975bfd7e4b859fb8c10a96 (patch)
tree832f4103d0c8c1662c58ec9645fe20f510ace49c /src/lib/dlt_filetransfer.c
parent9141005cf22f379059c27aa4a82111a13e760883 (diff)
downloadDLT-daemon-f8f80a07afd45d60c2975bfd7e4b859fb8c10a96.tar.gz
[GDLT-67] dlt-system v2.0, check full commit message for rebase details
[GDLT-67] Prepare build system. [GDLT-67] Config parsing, structure for thread handling [GDLT-67] Finalize configuration reading. [GDLT-67] Reimplementation of syslog, logfile, logprocess, shell. [GDLT-67] First complete version of the new dlt-system. [GDLT-67] Fixed header comments. authors, file names. [GDLT-67] Final touches. [GDLT-67] Fixed a problem with thread creation in optimized release binary. [GDLT-67] New configuration file. [GDLT-67] Added dlt debug output Signed-off-by: Christian Muck <christian.muck@bmw.de>
Diffstat (limited to 'src/lib/dlt_filetransfer.c')
-rw-r--r--src/lib/dlt_filetransfer.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/lib/dlt_filetransfer.c b/src/lib/dlt_filetransfer.c
index 561d540..d690696 100644
--- a/src/lib/dlt_filetransfer.c
+++ b/src/lib/dlt_filetransfer.c
@@ -301,6 +301,40 @@ int dlt_user_log_file_packagesCount(DltContext *fileContext, const char *filenam
* See the Mainpages.c for more informations.
* @param fileContext Specific context to log the file to dlt
* @param filename Absolute file path
+ * @param alias Alias for the file. An alternative name to show in the receiving end
+ * @return Returns 0 if everything was okey. If there was a failure a value < 0 will be returned.
+ */
+int dlt_user_log_file_header_alias(DltContext *fileContext,const char *filename, const char *alias){
+
+ if(isFile(filename))
+ {
+ DLT_LOG(*fileContext,DLT_LOG_INFO,
+ DLT_STRING("FLST"),
+ DLT_UINT(getFileSerialNumber(filename)),
+ DLT_STRING(alias),
+ DLT_UINT(getFilesize(filename)),
+ DLT_STRING(getFileCreationDate2(filename));
+ DLT_UINT(dlt_user_log_file_packagesCount(fileContext,filename)),
+ DLT_UINT(BUFFER_SIZE),
+ DLT_STRING("FLST")
+ );
+
+ return 0;
+ }
+ else
+ {
+ dlt_user_log_file_errorMessage(fileContext,filename, DLT_FILETRANSFER_ERROR_FILE_HEAD);
+ return DLT_FILETRANSFER_ERROR_FILE_HEAD;
+ }
+}
+
+//!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.
+ * @param fileContext Specific context to log the file to dlt
+ * @param filename Absolute file path
* @return Returns 0 if everything was okey. If there was a failure a value < 0 will be returned.
*/
int dlt_user_log_file_header(DltContext *fileContext,const char *filename){