framework/c/inc/le_print.h File Reference

Go to the source code of this file.

Defines

#define LE_PRINT_VALUE(formatSpec, value)   LE_DEBUG( STRINGIZE(value) "=" formatSpec, value)
#define LE_PRINT_VALUE_IF(condition, formatSpec, value)
#define LE_PRINT_ARRAY(formatSpec, size, array)

Detailed Description

* Legato Print APIs include file.

Copyright (C) Sierra Wireless, Inc. 2014. All rights reserved. Use of this work is subject to license.


Define Documentation

#define LE_PRINT_ARRAY (   formatSpec,
  size,
  array 
)
Value:
{                                                                                               \
        int i;                                                                                      \
        LE_DEBUG( STRINGIZE(array) );                                                               \
        for (i=0; i<(size_t)size; i++)                                                              \
            LE_DEBUG( "\t" STRINGIZE(array) "[%i]=" formatSpec, i, array[i]);                       \
    }

Print an array of values using specified format for each value.

Parameters:
formatSpecLE_DEBUG format; must be a string literal
sizeArray size
arrayArray name
#define LE_PRINT_VALUE (   formatSpec,
  value 
)    LE_DEBUG( STRINGIZE(value) "=" formatSpec, value)

Print a single value using specified format.

Parameters:
formatSpecLE_DEBUG format; must be a string literal
valueVariable name; must not be a literal
#define LE_PRINT_VALUE_IF (   condition,
  formatSpec,
  value 
)
Value:
if (condition)                                                                                  \
        { LE_PRINT_VALUE(formatSpec, value); }

Print a single value using specified format, if condition is met.

Parameters:
conditionBoolean
formatSpecLE_DEBUG format; must be a string literal
valueVariable name; must not be a literal
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines