summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlexander Wenzel <Alexander.AW.Wenzel@bmw.de>2011-11-15 00:14:39 +0100
committerAlexander Wenzel <Alexander.AW.Wenzel@bmw.de>2011-11-15 00:14:39 +0100
commitc870bcb94957fcbab7f56b6cd3ff5a0fc659f24c (patch)
tree93b273d227bb3921cb255217bf5b0325b44d3a34 /include
parentc74050b028d91c9bb8995dafba440babc7b621ff (diff)
downloadDLT-daemon-c870bcb94957fcbab7f56b6cd3ff5a0fc659f24c.tar.gz
Added dynamic increasable ringbuffers to user lib and daemon.
Diffstat (limited to 'include')
-rwxr-xr-xinclude/dlt/dlt_common.h17
-rwxr-xr-xinclude/dlt/dlt_user.h3
2 files changed, 11 insertions, 9 deletions
diff --git a/include/dlt/dlt_common.h b/include/dlt/dlt_common.h
index cb317c6..ba553c4 100755
--- a/include/dlt/dlt_common.h
+++ b/include/dlt/dlt_common.h
@@ -560,15 +560,22 @@ typedef struct
typedef struct
{
- char* shm; /* pointer to beginning of shared memory */
+ unsigned char* shm; /* pointer to beginning of shared memory */
int size; /* size of data area in shared memory */
- char* mem; /* pointer to data area in shared memory */
+ unsigned char* mem; /* pointer to data area in shared memory */
uint32_t min_size; /**< Minimum size of buffer */
uint32_t max_size; /**< Maximum size of buffer */
uint32_t step_size; /**< Step size of buffer */
} DltBuffer;
+typedef struct
+{
+ int write;
+ int read;
+ int count;
+} DltBufferHead;
+
#define DLT_BUFFER_HEAD "SHM"
typedef struct
@@ -980,12 +987,6 @@ extern "C"
int dlt_buffer_get_used_size(DltBuffer *buf);
int dlt_buffer_get_message_count(DltBuffer *buf);
- int dlt_buffer_get(DltBuffer *buf,unsigned char *data, int max_size,int delete);
- int dlt_buffer_reset(DltBuffer *buf);
- void dlt_buffer_write_block(DltBuffer *buf,int *write, const unsigned char *data,unsigned int size);
- void dlt_buffer_read_block(DltBuffer *buf,int *read,unsigned char *data,unsigned int size);
-
-
/**
* Initialize ringbuffer of with a maximum size of size
* @param dltbuf Pointer to ringbuffer structure
diff --git a/include/dlt/dlt_user.h b/include/dlt/dlt_user.h
index db5b954..dbc40a2 100755
--- a/include/dlt/dlt_user.h
+++ b/include/dlt/dlt_user.h
@@ -240,7 +240,8 @@ typedef struct
int8_t log_state; /**< Log state of external connection: 1 client connected, 0 not connected, -1 unknown */
- DltRingBuffer rbuf; /**< Ring-buffer for buffering messages during startup and missing connection */
+ //DltRingBuffer rbuf;
+ DltBuffer startup_buffer; /**< Ring-buffer for buffering messages during startup and missing connection */
DltShm dlt_shm;
} DltUser;