Macros | Functions
acc_integration_log.h File Reference
`#include "acc_definitions_common.h"`
`#include "acc_integration.h"`

Go to the source code of this file.

## Macros
#define | ACC_LOG(level, ...) acc_integration_log(level, MODULE, __VA_ARGS__)
#define | ACC_LOG_ERROR(...) ACC_LOG(ACC_LOG_LEVEL_ERROR, __VA_ARGS__)
#define | ACC_LOG_WARNING(...) ACC_LOG(ACC_LOG_LEVEL_WARNING, __VA_ARGS__)
#define | ACC_LOG_INFO(...) ACC_LOG(ACC_LOG_LEVEL_INFO, __VA_ARGS__)
#define | ACC_LOG_VERBOSE(...) ACC_LOG(ACC_LOG_LEVEL_VERBOSE, __VA_ARGS__)
#define | ACC_LOG_DEBUG(...) ACC_LOG(ACC_LOG_LEVEL_DEBUG, __VA_ARGS__)
#define | ACC_LOG_SIGN(a) (((a) < 0.0f) ? (-1.0f) : (1.0f))
#define | ACC_LOG_FLOAT_INT(a) ((unsigned long int)((a) + 0.0000005f))
#define | ACC_LOG_FLOAT_DEC(a) (unsigned long int)((1000000.0f * (((a) + 0.0000005f) - ((unsigned int)((a) + 0.0000005f)))))
#define | ACC_LOG_FLOAT_TO_INTEGER(a) (((a) < 0.0f) ? "-" : ""), ACC_LOG_FLOAT_INT((a) * ACC_LOG_SIGN(a)), ACC_LOG_FLOAT_DEC((a) * ACC_LOG_SIGN(a))
#define | PRIfloat "s%lu.%06lu"
| Specifier for printing float type using integers. More...
#define | PRINTF_ATTRIBUTE_CHECK(a, b)

## Functions
void | acc_integration_log (acc_log_level_t level, const char *module, const char *format,...)
| Log function. More...

## Macro Definition Documentation

## ◆ ACC_LOG

#define ACC_LOG | ( |  | level,
|  |  | ...
| ) |  | acc_integration_log(level, MODULE, __VA_ARGS__)

Definition at line 14 of file acc_integration_log.h.

## ◆ ACC_LOG_DEBUG

#define ACC_LOG_DEBUG | ( |  | ... | ) | ACC_LOG(ACC_LOG_LEVEL_DEBUG, __VA_ARGS__)

Definition at line 20 of file acc_integration_log.h.

## ◆ ACC_LOG_ERROR

#define ACC_LOG_ERROR | ( |  | ... | ) | ACC_LOG(ACC_LOG_LEVEL_ERROR, __VA_ARGS__)

Definition at line 16 of file acc_integration_log.h.

## ◆ ACC_LOG_FLOAT_DEC

#define ACC_LOG_FLOAT_DEC | ( |  | a | ) | (unsigned long int)((1000000.0f * (((a) + 0.0000005f) - ((unsigned int)((a) + 0.0000005f)))))

Definition at line 24 of file acc_integration_log.h.

## ◆ ACC_LOG_FLOAT_INT

#define ACC_LOG_FLOAT_INT | ( |  | a | ) | ((unsigned long int)((a) + 0.0000005f))

Definition at line 23 of file acc_integration_log.h.

## ◆ ACC_LOG_FLOAT_TO_INTEGER

#define ACC_LOG_FLOAT_TO_INTEGER | ( |  | a | ) | (((a) < 0.0f) ? "-" : ""), ACC_LOG_FLOAT_INT((a) * ACC_LOG_SIGN(a)), ACC_LOG_FLOAT_DEC((a) * ACC_LOG_SIGN(a))

Examples
  acc_processing_helpers.c, example_detector_distance.c, example_detector_distance_low_power_hibernate.c, example_detector_distance_low_power_off.c, example_detector_distance_with_iq_data_print.c, example_processing_amplitude.c, example_processing_coherent_mean.c, example_processing_noncoherent_mean.c, and ref_app_tank_level.c.

Definition at line 26 of file acc_integration_log.h.

## ◆ ACC_LOG_INFO

#define ACC_LOG_INFO | ( |  | ... | ) | ACC_LOG(ACC_LOG_LEVEL_INFO, __VA_ARGS__)

Definition at line 18 of file acc_integration_log.h.

## ◆ ACC_LOG_SIGN

#define ACC_LOG_SIGN | ( |  | a | ) | (((a) < 0.0f) ? (-1.0f) : (1.0f))

Definition at line 22 of file acc_integration_log.h.

## ◆ ACC_LOG_VERBOSE

#define ACC_LOG_VERBOSE | ( |  | ... | ) | ACC_LOG(ACC_LOG_LEVEL_VERBOSE, __VA_ARGS__)

Definition at line 19 of file acc_integration_log.h.

## ◆ ACC_LOG_WARNING

#define ACC_LOG_WARNING | ( |  | ... | ) | ACC_LOG(ACC_LOG_LEVEL_WARNING, __VA_ARGS__)

Definition at line 17 of file acc_integration_log.h.

## ◆ PRIfloat

#define PRIfloat "s%lu.%06lu"

Specifier for printing float type using integers.

Examples
  acc_processing_helpers.c, example_detector_distance.c, example_detector_distance_low_power_hibernate.c, example_detector_distance_low_power_off.c, example_detector_distance_with_iq_data_print.c, example_processing_amplitude.c, example_processing_coherent_mean.c, example_processing_noncoherent_mean.c, and ref_app_tank_level.c.

Definition at line 31 of file acc_integration_log.h.

## ◆ PRINTF_ATTRIBUTE_CHECK

#define PRINTF_ATTRIBUTE_CHECK | ( |  | a,
|  |  | b
| ) |  |

Definition at line 37 of file acc_integration_log.h.

## Function Documentation

## ◆ acc_integration_log()

void acc_integration_log | ( | acc_log_level_t | level,
|  | const char * | module,
|  | const char * | format,
|  |  | ...
| ) |  |

Log function.

This log function can be used as a complement to for example printf. It adds useful information to the log such as time and log level

Parameters

  [in] | level | The severity level for the log
  [in] | module | The name of the SW module from where the log is called
  [in] | format | The information to be logged, same format as for printf

Definition at line 220 of file acc_exploration_server_stm32.c.