summaryrefslogtreecommitdiff
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
parent2f6a373dc9d71ce47cf13d086726e91e6bd7d021 (diff)
downloadDLT-daemon-9e988e62b4a4c88621f34e053c3ab8567d8c299a.tar.gz
[GSW-13] Support for keep-alive messages as configuration parameter
-rwxr-xr-xReleaseNotes.txt3
-rwxr-xr-xsrc/daemon/dlt-daemon.c14
-rwxr-xr-xsrc/daemon/dlt-daemon.h3
-rw-r--r--testscripts/dlt.conf3
4 files changed, 20 insertions, 3 deletions
diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt
index 1881dfd..a5541dd 100755
--- a/ReleaseNotes.txt
+++ b/ReleaseNotes.txt
@@ -27,7 +27,8 @@ Changes in this release
Improvements
* [GSW-61] Replace command line parameter by configuration file
-
+ * [GSW-13] Support for keep-alive messages as configuration parameter
+
Bugfixes
*
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)
{
diff --git a/src/daemon/dlt-daemon.h b/src/daemon/dlt-daemon.h
index 7ddccdd..6a84008 100755
--- a/src/daemon/dlt-daemon.h
+++ b/src/daemon/dlt-daemon.h
@@ -104,7 +104,8 @@ typedef struct
char yvalue[256]; /**< (String: Devicename) Additional support for serial device */
char ivalue[256]; /**< (String: Directory) Directory where to store the persistant configuration (Default: /tmp) */
char cvalue[256]; /**< (String: Directory) Filename of DLT configuration file (Default: /etc/dlt.conf) */
- int sharedMemorySize; /**< (String: Directory) FSize of shared memory (Default: 100000 */
+ int sharedMemorySize; /**< (String: Directory) FSize of shared memory (Default: 100000) */
+ int sendMessageTime; /**< (Boolean) Send periodic Message Time if client is connected (Default: 0) */
} DltDaemonFlags;
/**
diff --git a/testscripts/dlt.conf b/testscripts/dlt.conf
index 56f9dd1..b5bf7be 100644
--- a/testscripts/dlt.conf
+++ b/testscripts/dlt.conf
@@ -18,6 +18,9 @@
# Send automatic get log info response during context registration
# SendContextRegistration = 1
+# Send automatic time packets every second if client is connected (Default: 0)
+SendMessageTime = 1
+
# Set ECU ID (Default: ECU1)
ECUId = ENAT