Bug 44 - Don't print "Buffer full" message from DLT daemon for each trace.
[profile/ivi/dlt-daemon.git] / src / daemon / dlt_daemon_common.h
index 8f5a36f..b93f0c2 100644 (file)
@@ -133,16 +133,18 @@ typedef struct
        int8_t default_log_level;          /**< Default log level (of daemon) */\r
        int8_t default_trace_status;       /**< Default trace status (of daemon) */\r
        int message_buffer_overflow;   /**< Set to one, if buffer overflow has occured, zero otherwise */\r
+       unsigned int overflow_counter;   /**< counts the number of lost messages. */\r
        int runtime_context_cfg_loaded;         /**< Set to one, if runtime context configuration has been loaded, zero otherwise */\r
        char ecuid[DLT_ID_SIZE];       /**< ECU ID of daemon */\r
        int sendserialheader;          /**< 1: send serial header; 0 don't send serial header */\r
        int timingpackets;              /**< 1: send continous timing packets; 0 don't send continous timing packets */\r
        DltBuffer client_ringbuffer; /**< Ring-buffer for storing received logs while no client connection is available */\r
-        char runtime_application_cfg[PATH_MAX + 1]; /**< Path and filename of persistent application configuration. Set to path max, as it specifies a full path*/\r
-        char runtime_context_cfg[PATH_MAX + 1]; /**< Path and filename of persistent context configuration */\r
-        char runtime_configuration[PATH_MAX + 1]; /**< Path and filename of persistent configuration */\r
+    char runtime_application_cfg[PATH_MAX + 1]; /**< Path and filename of persistent application configuration. Set to path max, as it specifies a full path*/\r
+    char runtime_context_cfg[PATH_MAX + 1]; /**< Path and filename of persistent context configuration */\r
+    char runtime_configuration[PATH_MAX + 1]; /**< Path and filename of persistent configuration */\r
     DltUserLogMode mode;       /**< Mode used for tracing: off, external, internal, both */\r
     char state;                                /**< state for tracing: 0 = no client connected, 1 = client connected */\r
+    char *ECUVersionString; /**< Version string to send to client. Loaded from a file at startup. May be null. */\r
 } DltDaemon;\r
 \r
 /**\r
@@ -359,8 +361,9 @@ void dlt_daemon_control_service_response(int sock, DltDaemon *daemon, uint32_t s
  * @param appid pointer to application id to be used in response message\r
  * @param contid pointer to context id to be used in response message\r
  * @param verbose if set to true verbose information is printed out.\r
+ * @return -1 if there is an error or buffer is full\r
  */\r
-void dlt_daemon_control_send_control_message(int sock, DltDaemon *daemon, DltMessage *msg, char* appid, char* contid, int verbose);\r
+int dlt_daemon_control_send_control_message(int sock, DltDaemon *daemon, DltMessage *msg, char* appid, char* contid, int verbose);\r
 \r
 /**\r
  * Process and generate response to received sw injection control message\r
@@ -437,8 +440,9 @@ void dlt_daemon_control_get_log_info(int sock, DltDaemon *daemon, DltMessage *ms
  * @param sock connection handle used for sending response\r
  * @param daemon pointer to dlt daemon structure\r
  * @param verbose if set to true verbose information is printed out.\r
+ * @return -1 if there is an error or buffer overflow, else 0\r
  */\r
-void dlt_daemon_control_message_buffer_overflow(int sock, DltDaemon *daemon, int verbose);\r
+int dlt_daemon_control_message_buffer_overflow(int sock, DltDaemon *daemon, unsigned int overflow_counter,char* apid, int verbose);\r
 /**\r
  * Process reset to factory default control message\r
  * @param daemon pointer to dlt daemon structure\r
@@ -454,15 +458,6 @@ void dlt_daemon_control_reset_to_factory_default(DltDaemon *daemon,const char *f
  * @param verbose if set to true verbose information is printed out.\r
  */\r
 void dlt_daemon_control_message_time(int sock, DltDaemon *daemon, int verbose);\r
-\r
-/**\r
- * Send ECU version information\r
- * @param sock connection handle used for sending response\r
- * @param daemon pointer to dlt daemon structure\r
- * @param version string containing the version information\r
- * @param verbose if set to true verbose information is printed out.\r
- */\r
-void dlt_daemon_control_send_ecu_version(int sock, DltDaemon *daemon, const char *version, int verbose);\r
 #ifdef __cplusplus\r
 }\r
 #endif\r