summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMohammed AL Dardoun <mohammed.aldardoun@partner.bmw.de>2011-08-09 17:04:17 +0200
committerMohammed AL Dardoun <mohammed.aldardoun@partner.bmw.de>2011-08-09 17:04:17 +0200
commit7554585a80ca2a8ebdcd5d1f1693ffe8e39b571d (patch)
tree5e479e49045e847c4ffe08d09a553763173bd836 /include
parent11702b620d2ec8896af210168db81ee58923d9da (diff)
downloadDLT-daemon-7554585a80ca2a8ebdcd5d1f1693ffe8e39b571d.tar.gz
[GSW-43] Flow Control for sending huge amount of data over DLT. partialy fixed
Diffstat (limited to 'include')
-rwxr-xr-xinclude/dlt/dlt_common.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/include/dlt/dlt_common.h b/include/dlt/dlt_common.h
index a13787b..44c1f33 100755
--- a/include/dlt/dlt_common.h
+++ b/include/dlt/dlt_common.h
@@ -555,6 +555,10 @@ typedef struct
uint32_t pos_write; /**< current writing position in bytes*/
uint32_t pos_read; /**< current reading position in bytes*/
uint32_t count; /**< nr. of entries */
+ uint32_t minimum_size; /**< minimum value for the buffer */
+ uint32_t increasing_size; /**< increasing value for the buffer */
+ uint32_t maximum_size; /**< maximum value for the buffer*/
+
} DltRingBuffer;
#ifdef __cplusplus
@@ -938,7 +942,7 @@ extern "C"
* @param size Maximum size of buffer in bytes
* @return negative value if there was an error
*/
- int dlt_ringbuffer_init(DltRingBuffer *dltbuf, uint32_t size);
+ int dlt_ringbuffer_init(DltRingBuffer *dltbuf, uint32_t size, uint32_t increase_size, uint32_t max_size);
/**
* Release and free memory used by ringbuffer
@@ -969,6 +973,21 @@ extern "C"
*/
int dlt_ringbuffer_put3(DltRingBuffer *dltbuf, void *data1, uint32_t size1, void *data2, uint32_t size2, void *data3, uint32_t size3);
+ /**
+ * This method writes the size of message
+ * @param dltbuf Pointer to ringbuffer structure
+ * @param data_size Pointer to size of data to be written
+ * @param unit_size Size of uint32_t
+ */
+ void dlt_ringbuffer_putMessageSize(DltRingBuffer *dltbuf,uint32_t * data_size, uint32_t unit_size);
+
+ /**
+ * This method reads the size of a message
+ * @param dltbuf Pointer to ringbuffer structure
+ * @param unit_size Size of uint32_t
+ * @return size of the message
+ */
+ int dlt_ringbuffer_getMessageSize(DltRingBuffer *dltbuf, uint32_t unit_size);
/**
* Read one entry from ringbuffer
* @param dltbuf Pointer to ringbuffer structure