summaryrefslogtreecommitdiff
path: root/src/daemon/dlt-daemon.c
diff options
context:
space:
mode:
authorAlexander Wenzel <Alexander.AW.Wenzel@bmw.de>2011-09-27 15:26:38 +0200
committerAlexander Wenzel <Alexander.AW.Wenzel@bmw.de>2011-09-27 15:26:38 +0200
commit9e988e62b4a4c88621f34e053c3ab8567d8c299a (patch)
tree085d554eacb682633ff8d6c121da1a4faa5f6333 /src/daemon/dlt-daemon.c
parent2f6a373dc9d71ce47cf13d086726e91e6bd7d021 (diff)
downloadDLT-daemon-9e988e62b4a4c88621f34e053c3ab8567d8c299a.tar.gz
[GSW-13] Support for keep-alive messages as configuration parameter
Diffstat (limited to 'src/daemon/dlt-daemon.c')
-rwxr-xr-xsrc/daemon/dlt-daemon.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/daemon/dlt-daemon.c b/src/daemon/dlt-daemon.c
index 19115b2..3a71138 100755
--- a/src/daemon/dlt-daemon.c
+++ b/src/daemon/dlt-daemon.c
@@ -226,6 +226,7 @@ int option_file_parser(DltDaemonLocal *daemon_local)
/* set default values for configuration */
daemon_local->flags.sharedMemorySize = DLT_SHM_SIZE;
+ daemon_local->flags.sendMessageTime = 0;
/* open configuration file */
if(daemon_local->flags.cvalue[0])
@@ -303,6 +304,11 @@ int option_file_parser(DltDaemonLocal *daemon_local)
daemon_local->flags.rflag = atoi(value);
printf("Option: %s=%s\n",token,value);
}
+ else if(strcmp(token,"SendMessageTime")==0)
+ {
+ daemon_local->flags.sendMessageTime = atoi(value);
+ printf("Option: %s=%s\n",token,value);
+ }
else if(strcmp(token,"RS232SyncSerialHeader")==0)
{
daemon_local->flags.mflag = atoi(value);
@@ -619,7 +625,13 @@ int dlt_daemon_local_init_p2(DltDaemon *daemon, DltDaemonLocal *daemon_local, in
dlt_log(LOG_WARNING, "Setting of default thread stack size failed!\n");
}
}
-
+
+ /* configure sending timing packets */
+ if (daemon_local->flags.sendMessageTime)
+ {
+ daemon->timingpackets = 1;
+ }
+
/* Binary semaphore for thread */
if (sem_init(&dlt_daemon_mutex, 0, 1)==-1)
{