summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/dlt/dlt_common.h57
-rw-r--r--src/console/dlt-control.c2
-rw-r--r--src/offlinelogstorage/dlt_offline_logstorage.h5
-rw-r--r--src/shared/dlt_user_shared.h22
4 files changed, 39 insertions, 47 deletions
diff --git a/include/dlt/dlt_common.h b/include/dlt/dlt_common.h
index 82ef7e1..82b2352 100644
--- a/include/dlt/dlt_common.h
+++ b/include/dlt/dlt_common.h
@@ -93,14 +93,14 @@
# include "dlt_types.h"
# include "dlt_protocol.h"
-# if !defined (PACKED)
-# define PACKED __attribute__((aligned(1), packed))
+# if !defined (DLT_PACKED)
+# define DLT_PACKED __attribute__((aligned(1), packed))
# endif
# if defined (__MSDOS__) || defined (_MSC_VER)
/* set instead /Zp8 flag in Visual C++ configuration */
-# undef PACKED
-# define PACKED
+# undef DLT_PACKED
+# define DLT_PACKED
# endif
/*
@@ -439,7 +439,7 @@ typedef struct
uint32_t seconds; /**< seconds since 1.1.1970 */
int32_t microseconds; /**< Microseconds */
char ecu[DLT_ID_SIZE]; /**< The ECU id is added, if it is not already in the DLT message itself */
-} PACKED DltStorageHeader;
+} DLT_PACKED DltStorageHeader;
/**
* The structure of the DLT standard header. This header is used in each DLT message.
@@ -449,7 +449,7 @@ typedef struct
uint8_t htyp; /**< This parameter contains several informations, see definitions below */
uint8_t mcnt; /**< The message counter is increased with each sent DLT message */
uint16_t len; /**< Length of the complete message, without storage header */
-} PACKED DltStandardHeader;
+} DLT_PACKED DltStandardHeader;
/**
* The structure of the DLT extra header parameters. Each parameter is sent only if enabled in htyp.
@@ -459,7 +459,7 @@ typedef struct
char ecu[DLT_ID_SIZE]; /**< ECU id */
uint32_t seid; /**< Session number */
uint32_t tmsp; /**< Timestamp since system start in 0.1 milliseconds */
-} PACKED DltStandardHeaderExtra;
+} DLT_PACKED DltStandardHeaderExtra;
/**
* The structure of the DLT extended header. This header is only sent if enabled in htyp parameter.
@@ -470,7 +470,7 @@ typedef struct
uint8_t noar; /**< number of arguments */
char apid[DLT_ID_SIZE]; /**< application id */
char ctid[DLT_ID_SIZE]; /**< context id */
-} PACKED DltExtendedHeader;
+} DLT_PACKED DltExtendedHeader;
/**
* The structure to organise the DLT messages.
@@ -511,12 +511,12 @@ typedef struct
char apid[DLT_ID_SIZE]; /**< application id */
char ctid[DLT_ID_SIZE]; /**< context id */
char com[DLT_ID_SIZE]; /**< communication interface */
-} PACKED DltServiceGetLogInfoRequest;
+} DLT_PACKED DltServiceGetLogInfoRequest;
typedef struct
{
uint32_t service_id; /**< service ID */
-} PACKED DltServiceGetDefaultLogLevelRequest;
+} DLT_PACKED DltServiceGetDefaultLogLevelRequest;
/**
* The structure of the DLT Service Get Log Info response.
@@ -564,7 +564,7 @@ typedef struct
char ctid[DLT_ID_SIZE]; /**< context id */
uint8_t log_level; /**< log level to be set */
char com[DLT_ID_SIZE]; /**< communication interface */
-} PACKED DltServiceSetLogLevel;
+} DLT_PACKED DltServiceSetLogLevel;
/**
* The structure of the DLT Service Set Default Log Level.
@@ -574,7 +574,7 @@ typedef struct
uint32_t service_id; /**< service ID */
uint8_t log_level; /**< default log level to be set */
char com[DLT_ID_SIZE]; /**< communication interface */
-} PACKED DltServiceSetDefaultLogLevel;
+} DLT_PACKED DltServiceSetDefaultLogLevel;
/**
* The structure of the DLT Service Set Verbose Mode
@@ -583,7 +583,7 @@ typedef struct
{
uint32_t service_id; /**< service ID */
uint8_t new_status; /**< new status to be set */
-} PACKED DltServiceSetVerboseMode;
+} DLT_PACKED DltServiceSetVerboseMode;
/**
* The structure of the DLT Service Set Communication Interface Status
@@ -593,7 +593,7 @@ typedef struct
uint32_t service_id; /**< service ID */
char com[DLT_ID_SIZE]; /**< communication interface */
uint8_t new_status; /**< new status to be set */
-} PACKED DltServiceSetCommunicationInterfaceStatus;
+} DLT_PACKED DltServiceSetCommunicationInterfaceStatus;
/**
* The structure of the DLT Service Set Communication Maximum Bandwidth
@@ -603,20 +603,20 @@ typedef struct
uint32_t service_id; /**< service ID */
char com[DLT_ID_SIZE]; /**< communication interface */
uint32_t max_bandwidth; /**< maximum bandwith */
-} PACKED DltServiceSetCommunicationMaximumBandwidth;
+} DLT_PACKED DltServiceSetCommunicationMaximumBandwidth;
typedef struct
{
uint32_t service_id; /**< service ID */
uint8_t status; /**< reponse status */
-} PACKED DltServiceResponse;
+} DLT_PACKED DltServiceResponse;
typedef struct
{
uint32_t service_id; /**< service ID */
uint8_t status; /**< reponse status */
uint8_t log_level; /**< log level */
-} PACKED DltServiceGetDefaultLogLevelResponse;
+} DLT_PACKED DltServiceGetDefaultLogLevelResponse;
typedef struct
{
@@ -624,12 +624,12 @@ typedef struct
uint8_t status; /**< reponse status */
uint8_t overflow; /**< overflow status */
uint32_t overflow_counter; /**< overflow counter */
-} PACKED DltServiceMessageBufferOverflowResponse;
+} DLT_PACKED DltServiceMessageBufferOverflowResponse;
typedef struct
{
uint32_t service_id; /**< service ID */
-} PACKED DltServiceGetSoftwareVersion;
+} DLT_PACKED DltServiceGetSoftwareVersion;
typedef struct
{
@@ -637,7 +637,7 @@ typedef struct
uint8_t status; /**< reponse status */
uint32_t length; /**< length of following payload */
char *payload; /**< payload */
-} PACKED DltServiceGetSoftwareVersionResponse;
+} DLT_PACKED DltServiceGetSoftwareVersionResponse;
/**
* The structure of the DLT Service Unregister Context.
@@ -649,7 +649,7 @@ typedef struct
char apid[DLT_ID_SIZE]; /**< application id */
char ctid[DLT_ID_SIZE]; /**< context id */
char comid[DLT_ID_SIZE]; /**< communication interface */
-} PACKED DltServiceUnregisterContext;
+} DLT_PACKED DltServiceUnregisterContext;
/**
* The structure of the DLT Service Connection Info
@@ -660,7 +660,7 @@ typedef struct
uint8_t status; /**< reponse status */
uint8_t state; /**< new state */
char comid[DLT_ID_SIZE]; /**< communication interface */
-} PACKED DltServiceConnectionInfo;
+} DLT_PACKED DltServiceConnectionInfo;
/**
* The structure of the DLT Service Timezone
@@ -671,7 +671,7 @@ typedef struct
uint8_t status; /**< reponse status */
int32_t timezone; /**< Timezone in seconds */
uint8_t isdst; /**< Is daylight saving time */
-} PACKED DltServiceTimezone;
+} DLT_PACKED DltServiceTimezone;
/**
* The structure of the DLT Service Marker
@@ -680,7 +680,7 @@ typedef struct
{
uint32_t service_id; /**< service ID */
uint8_t status; /**< reponse status */
-} PACKED DltServiceMarker;
+} DLT_PACKED DltServiceMarker;
/***
* The structure of the DLT Service Offline Logstorage
@@ -691,17 +691,14 @@ typedef struct
char mount_point[DLT_MOUNT_PATH_MAX]; /**< storage device mount point */
uint8_t connection_type; /**< connection status of the connected device connected/disconnected */
char comid[DLT_ID_SIZE]; /**< communication interface */
-} PACKED DltServiceOfflineLogstorage;
+} DLT_PACKED DltServiceOfflineLogstorage;
-/**
- * The structure of DLT Service Passive Node Connect
- */
typedef struct
{
uint32_t service_id; /**< service ID */
uint32_t connection_status; /**< connect/disconnect */
char node_id[DLT_ID_SIZE]; /**< passive node ID */
-} PACKED DltServicePassiveNodeConnect;
+} DLT_PACKED DltServicePassiveNodeConnect;
/**
* The structure of DLT Service Passive Node Connection Status
@@ -713,7 +710,7 @@ typedef struct
uint32_t num_connections; /**< number of connections */
uint8_t connection_status[DLT_ENTRY_MAX]; /**< list of connection status */
char node_id[DLT_ENTRY_MAX]; /**< list of passive node IDs */
-} PACKED DltServicePassiveNodeConnectionInfo;
+} DLT_PACKED DltServicePassiveNodeConnectionInfo;
/**
* Structure to store filter parameters.
diff --git a/src/console/dlt-control.c b/src/console/dlt-control.c
index b0ecbf1..d1edba9 100644
--- a/src/console/dlt-control.c
+++ b/src/console/dlt-control.c
@@ -78,7 +78,7 @@ typedef struct
{
uint32_t service_id; /**< service ID */
uint8_t status; /**< response status */
-} PACKED DltServiceHeader;
+} DLT_PACKED DltServiceHeader;
DltClient g_dltclient;
diff --git a/src/offlinelogstorage/dlt_offline_logstorage.h b/src/offlinelogstorage/dlt_offline_logstorage.h
index d9465d2..1f7396d 100644
--- a/src/offlinelogstorage/dlt_offline_logstorage.h
+++ b/src/offlinelogstorage/dlt_offline_logstorage.h
@@ -210,11 +210,6 @@ typedef struct {
int is_opt; /* If configuration is optional or not */
} DltLogstorageGeneralConf;
-typedef enum {
- DLT_LOGSTORAGE_GENERAL_CONF_BLOCKMODE = 0,
- DLT_LOGSTORAGE_GENERAL_CONF_COUNT
-} DltLogstorageGeneralConfType;
-
typedef struct {
char *key; /* Configuration key */
int (*func)(DltLogStorageFilterConfig *config, char *value); /* conf handler */
diff --git a/src/shared/dlt_user_shared.h b/src/shared/dlt_user_shared.h
index 38c5dbf..5a82cee 100644
--- a/src/shared/dlt_user_shared.h
+++ b/src/shared/dlt_user_shared.h
@@ -80,7 +80,7 @@ typedef struct
{
char pattern[DLT_ID_SIZE]; /**< This pattern should be DUH0x01 */
uint32_t message; /**< messsage info */
-} PACKED DltUserHeader;
+} DLT_PACKED DltUserHeader;
/**
* This is the internal message content to exchange control msg register app information between application and daemon.
@@ -90,7 +90,7 @@ typedef struct
char apid[DLT_ID_SIZE]; /**< application id */
pid_t pid; /**< process id of user application */
uint32_t description_length; /**< length of description */
-} PACKED DltUserControlMsgRegisterApplication;
+} DLT_PACKED DltUserControlMsgRegisterApplication;
/**
* This is the internal message content to exchange control msg unregister app information between application and daemon.
@@ -99,7 +99,7 @@ typedef struct
{
char apid[DLT_ID_SIZE]; /**< application id */
pid_t pid; /**< process id of user application */
-} PACKED DltUserControlMsgUnregisterApplication;
+} DLT_PACKED DltUserControlMsgUnregisterApplication;
/**
* This is the internal message content to exchange control msg register information between application and daemon.
@@ -113,7 +113,7 @@ typedef struct
int8_t trace_status; /**< trace status */
pid_t pid; /**< process id of user application */
uint32_t description_length; /**< length of description */
-} PACKED DltUserControlMsgRegisterContext;
+} DLT_PACKED DltUserControlMsgRegisterContext;
/**
* This is the internal message content to exchange control msg unregister information between application and daemon.
@@ -123,7 +123,7 @@ typedef struct
char apid[DLT_ID_SIZE]; /**< application id */
char ctid[DLT_ID_SIZE]; /**< context id */
pid_t pid; /**< process id of user application */
-} PACKED DltUserControlMsgUnregisterContext;
+} DLT_PACKED DltUserControlMsgUnregisterContext;
/**
* This is the internal message content to exchange control msg log level information between application and daemon.
@@ -133,7 +133,7 @@ typedef struct
uint8_t log_level; /**< log level */
uint8_t trace_status; /**< trace status */
int32_t log_level_pos; /**< offset in management structure on user-application side */
-} PACKED DltUserControlMsgLogLevel;
+} DLT_PACKED DltUserControlMsgLogLevel;
/**
* This is the internal message content to exchange control msg injection information between application and daemon.
@@ -143,7 +143,7 @@ typedef struct
int32_t log_level_pos; /**< offset in management structure on user-application side */
uint32_t service_id; /**< service id of injection */
uint32_t data_length_inject; /**< length of injection message data field */
-} PACKED DltUserControlMsgInjection;
+} DLT_PACKED DltUserControlMsgInjection;
/**
* This is the internal message content to exchange information about application log level and trace stats between
@@ -154,7 +154,7 @@ typedef struct
char apid[DLT_ID_SIZE]; /**< application id */
uint8_t log_level; /**< log level */
uint8_t trace_status; /**< trace status */
-} PACKED DltUserControlMsgAppLogLevelTraceStatus;
+} DLT_PACKED DltUserControlMsgAppLogLevelTraceStatus;
/**
* This is the internal message content to set the logging mode: off, external, internal, both.
@@ -162,7 +162,7 @@ typedef struct
typedef struct
{
int8_t log_mode; /**< the mode to be used for logging: off, external, internal, both */
-} PACKED DltUserControlMsgLogMode;
+} DLT_PACKED DltUserControlMsgLogMode;
/**
* This is the internal message content to get the logging state: 0 = off, 1 = external client connected.
@@ -170,7 +170,7 @@ typedef struct
typedef struct
{
int8_t log_state; /**< the state to be used for logging state: 0 = off, 1 = external client connected */
-} PACKED DltUserControlMsgLogState;
+} DLT_PACKED DltUserControlMsgLogState;
/**
* This is the internal message content to get the number of lost messages reported to the daemon.
@@ -179,7 +179,7 @@ typedef struct
{
uint32_t overflow_counter; /**< counts the number of lost messages */
char apid[4]; /**< application which lost messages */
-} PACKED DltUserControlMsgBufferOverflow;
+} DLT_PACKED DltUserControlMsgBufferOverflow;
/**************************************************************************************************
* The folowing functions are used shared between the user lib and the daemon implementation