SET( ${PROJECT_NAME}_MAJOR_VERSION 2 )\r
SET( ${PROJECT_NAME}_MINOR_VERSION 2 )\r
SET( ${PROJECT_NAME}_PATCH_LEVEL 0 )\r
-set(GENIVI_PROJECT_VERSION ${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION}.${${PROJECT_NAME}_PATCH_LEVEL})\r
SET( ${PROJECT_NAME}_VERSION_STATE )\r
-SET( ${PROJECT_NAME}_REVISION 1666 )\r
+SET( GENIVI_PROJECT_VERSION ${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION}.${${PROJECT_NAME}_PATCH_LEVEL})\r
\r
-# Write version information into include file\r
SET( PRINT_MAJOR_VERSION ${${PROJECT_NAME}_MAJOR_VERSION})\r
SET( PRINT_MINOR_VERSION ${${PROJECT_NAME}_MINOR_VERSION})\r
SET( PRINT_PATCH_LEVEL ${${PROJECT_NAME}_PATCH_LEVEL})\r
SET( PRINT_VERSION ${GENIVI_PROJECT_VERSION})\r
SET( PRINT_VERSION_STATE ${${PROJECT_NAME}_VERSION_STATE})\r
-SET( PRINT_VERSION_REVISION ${${PROJECT_NAME}_REVISION})\r
\r
-# Print version information\r
-MESSAGE("VERSION ${PRINT_VERSION}")\r
-MESSAGE("VERSION_STATE ${PRINT_VERSION_STATE}")\r
-MESSAGE("REVISION ${PRINT_VERSION_REVISION}")\r
+IF(NOT DEFINED PRINT_REVISION)\r
+ execute_process(COMMAND git describe --tags WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} \r
+ OUTPUT_VARIABLE PRINT_REVISION \r
+ OUTPUT_STRIP_TRAILING_WHITESPACE)\r
+ENDIF(NOT DEFINED PRINT_REVISION)\r
\r
##################### RPM CONFIG ########################\r
-\r
-SET( GENIVI_RPM_RELEASE "1${SVN_REVISION}")\r
+SET( GENIVI_RPM_RELEASE "1${IDLT_VERSION}")\r
SET( LICENSE "LGPL v2.1 with special exception" )\r
SET( SPEC_DIR "package")\r
\r
#########################################################\r
SET(GENIVI_BUILDSYSTEM_AVAILABLE $ENV{GENIVI_BUILDSYSTEM})\r
IF(GENIVI_BUILDSYSTEM_AVAILABLE)\r
-INCLUDE($ENV{GENIVI_BUILDSYSTEM}/cmake_extensions/GeniviCMakeExtensions.cmake)\r
+ INCLUDE($ENV{GENIVI_BUILDSYSTEM}/cmake_extensions/GeniviCMakeExtensions.cmake)\r
ENDIF(GENIVI_BUILDSYSTEM_AVAILABLE)\r
\r
\r
CHECK_FUNCTION_EXISTS( strtol HAVE_FUNC_STRTOL)\r
\r
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_SOURCE_DIR}/config.h @ONLY)\r
-CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/svnversion.h.cmake ${CMAKE_SOURCE_DIR}/svnversion.h @ONLY)\r
-CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/version.h.cmake ${CMAKE_SOURCE_DIR}/version.h @ONLY)\r
+CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/dlt/dlt_version.h.cmake ${CMAKE_SOURCE_DIR}/include/dlt/dlt_version.h @ONLY)\r
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/doxygen.cfg.cmake ${CMAKE_SOURCE_DIR}/doxygen.cfg @ONLY)\r
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/automotive-dlt.pc.cmake ${CMAKE_SOURCE_DIR}/automotive-dlt.pc @ONLY)\r
#CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/package/automotive-dlt.spec.cmake ${CMAKE_SOURCE_DIR}/package/automotive-dlt.spec ESCAPE_QUOTES)\r
\r
MESSAGE( STATUS )\r
MESSAGE( STATUS "-------------------------------------------------------------------------------" )\r
+MESSAGE( STATUS "Build for Version ${PRINT_VERSION} build ${PRINT_REVISION}")\r
+MESSAGE( STATUS "VERSION_STATE ${PRINT_VERSION_STATE}")\r
MESSAGE( STATUS "BUILD_SHARED_LIBS = ${BUILD_SHARED_LIBS}" )\r
MESSAGE( STATUS "CMAKE_INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX}" )\r
MESSAGE( STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}" )\r
+++ /dev/null
-KNOWN LIMITATIONS:
-(26.07.2010)
-
-Client:
-- Only one daemon connection is supported
-
-Daemon:
-- Missing features, see TODO
-
-User:
-- Only one application, but multiple contexts, are possible in each user application
+++ /dev/null
-License
--------
-See file: LICENSE.txt
-The full LGPL license: LGPL.txt
\r
Changes in this release\r
-----------------------\r
+2.3.0\r
+\r
+Improvements\r
+ \r
+ * [GSW-62] DLT Library version check\r
+ * [GSW-28] Directory where persistent data is stored is not configurable \r
+ * [GSW-46] DLT client library sets a huge stack size for internal thread \r
+ * [GSW-59] Statically allocated large array \r
\r
2.2.0:\r
\r
# @licence end@
########
-install(FILES dlt.h dlt_user.h dlt_user_macros.h dlt_client.h dlt_protocol.h dlt_common.h dlt_types.h
+install(FILES dlt.h dlt_user.h dlt_user_macros.h dlt_client.h dlt_protocol.h dlt_common.h dlt_types.h dlt_version.h
DESTINATION include/dlt
COMPONENT devel)
*/
void dlt_get_version(char *buf);
+ /**
+ * Print dlt major version to buffer
+ * @param buf Pointer to buffer
+ */
+ void dlt_get_major_version(char *buf);
+
+ /**
+ * Print dlt minor version to buffer
+ * @param buf Pointer to buffer
+ */
+ void dlt_get_minor_version(char *buf);
+
#endif
/* Function prototypes which should be used only internally */
* @param description long name of the application
* @return negative value if there was an error
*/
-int dlt_register_app(const char *appid, const char * description);
+int dlt_register_app(const char *appid, const char * description, const char * user_major_version, const char * user_minor_version);
/**
* Unregister an application in the daemon.
int dlt_verbose_mode(void);
/**
+ * Check the version of dlt library with library version used of the application.
+ * @param Major version number of application - see dlt_version.h
+ * @param Minor version number of application - see dlt_version.h
+ * @return negative value if there is a mismatch
+ */
+int dlt_user_check_library_version(const char *user_major_version,const char *user_minor_version);
+
+/**
* Switch to non-verbose mode
*
*/
* @licence end@
*/
-
/*******************************************************************************
-** **
-** SRC-MODULE: dlt_user_macros.h **
-** **
-** TARGET : linux **
-** **
-** PROJECT : DLT **
-** **
-** AUTHOR : Alexander Wenzel Alexander.AW.Wenzel@bmw.de **
-** Markus Klein **
-** **
-** PURPOSE : **
-** **
-** REMARKS : **
-** **
-** PLATFORM DEPENDANT [yes/no]: yes **
-** **
-** TO BE CHANGED BY USER [yes/no]: no **
-** **
-*******************************************************************************/
+ ** **
+ ** SRC-MODULE: dlt_user_macros.h **
+ ** **
+ ** TARGET : linux **
+ ** **
+ ** PROJECT : DLT **
+ ** **
+ ** AUTHOR : Alexander Wenzel Alexander.AW.Wenzel@bmw.de **
+ ** Markus Klein **
+ ** **
+ ** PURPOSE : **
+ ** **
+ ** REMARKS : **
+ ** **
+ ** PLATFORM DEPENDANT [yes/no]: yes **
+ ** **
+ ** TO BE CHANGED BY USER [yes/no]: no **
+ ** **
+ *******************************************************************************/
/*******************************************************************************
-** Author Identity **
-********************************************************************************
-** **
-** Initials Name Company **
-** -------- ------------------------- ---------------------------------- **
-** aw Alexander Wenzel BMW **
-** mk Markus Klein Fraunhofer ESK **
-*******************************************************************************/
+ ** Author Identity **
+ ********************************************************************************
+ ** **
+ ** Initials Name Company **
+ ** -------- ------------------------- ---------------------------------- **
+ ** aw Alexander Wenzel BMW **
+ ** mk Markus Klein Fraunhofer ESK **
+ *******************************************************************************/
/*******************************************************************************
-** Revision Control History **
-*******************************************************************************/
+ ** Revision Control History **
+ *******************************************************************************/
/*
* $LastChangedRevision: 1515 $
#ifndef DLT_USER_MACROS_H
#define DLT_USER_MACORS_H
+#include "dlt_version.h"
+
/**
- \defgroup userapi DLT User API
- \addtogroup userapi
- \{
-*/
+ \defgroup userapi DLT User API
+ \addtogroup userapi
+ \{
+ */
/**************************************************************************************************
-* The folowing macros define a macro interface for DLT
-**************************************************************************************************/
+ * The folowing macros define a macro interface for DLT
+ **************************************************************************************************/
/**
* Create an object for a new context.
* @param DESCRIPTION ASCII string containing description
*/
#define DLT_REGISTER_APP(APPID,DESCRIPTION) \
- dlt_register_app( APPID, DESCRIPTION);
+ dlt_register_app( APPID, DESCRIPTION, PACKAGE_MAJOR_VERSION, PACKAGE_MINOR_VERSION );
+
/**
* Unregister application.
* @param CONTEXTID context id with maximal four characters
* @param DESCRIPTION ASCII string containing description
* @param LOGLEVEL log level to be pre-set for this context
- (DLT_LOG_DEFAULT is not allowed here)
+ (DLT_LOG_DEFAULT is not allowed here)
* @param TRACESTATUS trace status to be pre-set for this context
- (DLT_TRACE_STATUS_DEFAULT is not allowed here)
+ (DLT_TRACE_STATUS_DEFAULT is not allowed here)
*/
#define DLT_REGISTER_CONTEXT_LL_TS(CONTEXT,CONTEXTID,DESCRIPTION,LOGLEVEL,TRACESTATUS) \
dlt_register_context_ll_ts(&(CONTEXT), CONTEXTID, DESCRIPTION, LOGLEVEL, TRACESTATUS);
* @param ARGS variable list of arguments
*/
#ifdef _MSC_VER
- /* DLT_LOG is not supported by MS Visual C++ */
- /* use function interface instead */
+/* DLT_LOG is not supported by MS Visual C++ */
+/* use function interface instead */
#else
#define DLT_LOG(CONTEXT,LOGLEVEL,ARGS...) \
{ \
* @param LOGLEVEL the log level of the log message
* @param MSGID the message id of log message
* @param ARGS variable list of arguments:
- calls to DLT_STRING(), DLT_BOOL(), DLT_FLOAT32(), DLT_FLOAT64(),
- DLT_INT(), DLT_UINT(), DLT_RAW()
+ calls to DLT_STRING(), DLT_BOOL(), DLT_FLOAT32(), DLT_FLOAT64(),
+ DLT_INT(), DLT_UINT(), DLT_RAW()
*/
#ifdef _MSC_VER
- /* DLT_LOG_ID is not supported by MS Visual C++ */
- /* use function interface instead */
+/* DLT_LOG_ID is not supported by MS Visual C++ */
+/* use function interface instead */
#else
#define DLT_LOG_ID(CONTEXT,LOGLEVEL,MSGID,ARGS...) \
{ \
dlt_log_string(&(CONTEXT), LOGLEVEL, TEXT); \
}
-
/**
* Send log message with string parameter and integer parameter.
* @param CONTEXT object containing information about one special logging context
dlt_disable_local_print();
/**
- \}
-*/
+ \}
+ */
#endif /* DLT_USER_MACROS_H */
--- /dev/null
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
+#ifndef __VERSION_H_
+#define __VERSION_H_
+
+#define PACKAGE_VERSION_STATE ""
+#define PACKAGE_VERSION "2.2.0"
+#define PACKAGE_MAJOR_VERSION "2"
+#define PACKAGE_MINOR_VERSION "2"
+#define PACKAGE_PATCH_LEVEL "0"
+#define PACKAGE_REVISION "v2.2.0-9-g48928c6"
+
+#endif
--- /dev/null
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
+#ifndef __VERSION_H_
+#define __VERSION_H_
+
+#define PACKAGE_VERSION_STATE "@PRINT_VERSION_STATE@"
+#define PACKAGE_VERSION "@PRINT_VERSION@"
+#define PACKAGE_MAJOR_VERSION "@PRINT_MAJOR_VERSION@"
+#define PACKAGE_MINOR_VERSION "@PRINT_MINOR_VERSION@"
+#define PACKAGE_PATCH_LEVEL "@PRINT_PATCH_LEVEL@"
+#define PACKAGE_REVISION "@PRINT_REVISION@"
+
+#endif
#include <sys/time.h>
#include <linux/stat.h>
-#include "version.h"
-#include "svnversion.h"
-
#include "dlt_types.h"
#include "dlt-daemon.h"
#include "dlt-daemon_cfg.h"
}
}
- dlt_register_app("LOG","Test Application for Logging");
+ dlt_register_app("LOG","Test Application for Logging", PACKAGE_MAJOR_VERSION,PACKAGE_MINOR_VERSION);
dlt_register_context(&mycontext,"TEST","Test Context for Logging");
target_link_libraries(dlt rt ${CMAKE_THREAD_LIBS_INIT})
-set_target_properties(dlt PROPERTIES VERSION 2.2.0 SOVERSION 2)
+set_target_properties(dlt PROPERTIES VERSION ${PRINT_VERSION} SOVERSION ${PRINT_MAJOR_VERSION})
install(TARGETS dlt
LIBRARY DESTINATION lib
static void dlt_user_log_reattach_to_daemon(void);
static int dlt_user_log_send_overflow(void);
+int dlt_user_check_library_version(const char *user_major_version,const char *user_minor_version){
+
+ char str[200];
+ char lib_major_version[DLT_USER_MAX_LIB_VERSION_LENGTH];
+ char lib_minor_version[DLT_USER_MAX_LIB_VERSION_LENGTH];
+
+ dlt_get_major_version( lib_major_version);
+ dlt_get_minor_version( lib_minor_version);
+
+ if( (strcmp(lib_major_version,user_major_version)!=0) || (strcmp(lib_minor_version,user_minor_version)!=0))
+ {
+ sprintf(str,"DLT Library version check failed! Installed DLT library version is %s.%s - Application using DLT library version %s.%s\n",lib_major_version,lib_minor_version,user_major_version,user_minor_version);
+ dlt_log(LOG_WARNING, str);
+ return -1;
+ }
+ return 0;
+}
+
int dlt_init(void)
{
char filename[DLT_USER_MAX_FILENAME_LENGTH];
-int dlt_register_app(const char *appid, const char * description)
+int dlt_register_app(const char *appid, const char * description, const char * user_major_version,const char * user_minor_version)
{
int ret;
{
return -1;
}
+
+ dlt_user_check_library_version(user_major_version, user_minor_version);
}
if ((appid==0) || (appid[0]=='\0'))
/* Maximu length of a filename string */\r
#define DLT_USER_MAX_FILENAME_LENGTH 255\r
\r
+/* Maximum length of a single version number */\r
+#define DLT_USER_MAX_LIB_VERSION_LENGTH 3\r
+\r
/* Length of buffer for constructing text output */\r
#define DLT_USER_TEXT_LENGTH 10024\r
\r
#include "dlt_common.h"
#include "dlt_common_cfg.h"
-#include "version.h"
-#include "svnversion.h"
+#include "dlt_version.h"
#if defined (__WIN32__) || defined (_MSC_VER)
#include <winsock2.h> /* for socket(), connect(), send(), and recv() */
void dlt_get_version(char *buf)
{
sprintf(buf,"DLT Package Version: %s %s, Package Revision: %s, build on %s %s\n",
- PACKAGE_VERSION, PACKAGE_VERSION_STATE, SVN_VERSION, __DATE__ , __TIME__ );
+ PACKAGE_VERSION, PACKAGE_VERSION_STATE, PACKAGE_REVISION, __DATE__ , __TIME__ );
}
+void dlt_get_major_version(char *buf)
+{
+ sprintf(buf,"%s",PACKAGE_MAJOR_VERSION);
+}
+
+void dlt_get_minor_version(char *buf)
+{
+ sprintf(buf,"%s",PACKAGE_MINOR_VERSION);
+}
+
+
uint32_t dlt_uptime(void)
{
+++ /dev/null
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
-#define SVN_VERSION "@PRINT_VERSION_REVISION@"
+++ /dev/null
-#ifndef __VERSION_H_
-#define __VERSION_H_
-
-#define PACKAGE_VERSION_STATE ""
-#define PACKAGE_VERSION "2.2.0"
-
-#endif
+++ /dev/null
-#ifndef __VERSION_H_
-#define __VERSION_H_
-
-#define PACKAGE_VERSION_STATE "@PRINT_VERSION_STATE@"
-#define PACKAGE_VERSION "@PRINT_VERSION@"
-
-#endif