diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/daemon/dlt-daemon.c | 14 | ||||
-rwxr-xr-x | src/daemon/dlt-daemon.h | 3 |
2 files changed, 15 insertions, 2 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) { 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;
/**
|