From 94c7cdfba0aab20254d37f765c7faea7f6c447f4 Mon Sep 17 00:00:00 2001 From: Lassi Marttala Date: Wed, 26 Sep 2012 09:35:52 +0200 Subject: [GDLT-120]: Segmented Network Trace: Prepare for rewrite. This is a combination of 2 commits. Original descriptions below. [GDLT-120]: Remove dlt_queue. Only usage replace with POSIX queue. [GDLT-120]: Improve documentation. Add a note about context having to be pesistent thorough application lifetime. [GDLT-120]: Add macro interface. Signed-off-by: Alexander Wenzel --- include/dlt/dlt_user_macros.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'include/dlt/dlt_user_macros.h') diff --git a/include/dlt/dlt_user_macros.h b/include/dlt/dlt_user_macros.h index d3d6f42..20f605d 100644 --- a/include/dlt/dlt_user_macros.h +++ b/include/dlt/dlt_user_macros.h @@ -288,6 +288,34 @@ extern DltContext CONTEXT; dlt_user_trace_network(&(CONTEXT),TYPE,HEADERLEN,HEADER,PAYLOADLEN,PAYLOAD); \ }while(0) +/** + * Trace network message, allow truncation + * @param CONTEXT object containing information about one special logging context + * @param TYPE type of network trace message + * @param HEADERLEN length of network message header + * @param HEADER pointer to network message header + * @param PAYLOADLEN length of network message payload + * @param PAYLOAD pointer to network message payload + */ +#define DLT_TRACE_NETWORK_TRUNCATED(CONTEXT,TYPE,HEADERLEN,HEADER,PAYLOADLEN,PAYLOAD) \ + do { \ + dlt_user_trace_network_truncated(&(CONTEXT),TYPE,HEADERLEN,HEADER,PAYLOADLEN,PAYLOAD, 1); \ + }while(0) + +/** + * Trace network message, segment large messages + * @param CONTEXT object containing information about one special logging context + * @param TYPE type of network trace message + * @param HEADERLEN length of network message header + * @param HEADER pointer to network message header + * @param PAYLOADLEN length of network message payload + * @param PAYLOAD pointer to network message payload + */ +#define DLT_TRACE_NETWORK_SEGMENTED(CONTEXT,TYPE,HEADERLEN,HEADER,PAYLOADLEN,PAYLOAD) \ + do { \ + dlt_user_trace_network_segmented(&(CONTEXT),TYPE,HEADERLEN,HEADER,PAYLOADLEN,PAYLOAD); \ + }while(0) + /** * Send log message with string parameter. * @param CONTEXT object containing information about one special logging context -- cgit v1.2.1