MIP_SDK
v4.0.0
MicroStrain Communications Library for embedded systems
src
c
mip
mip_logging.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
microstrain/logging.h
>
4
5
#include <
mip/mip_packet.h
>
6
#include <
mip/mip_field.h
>
7
8
9
#ifdef __cplusplus
10
namespace
mip
{
11
namespace
C {
12
extern
"C"
{
13
#endif
14
28
35
36
37
#ifdef MICROSTRAIN_LOGGING_ENABLED
38
39
// Format functions
40
41
bool
mip_format_packet_bytes(
char
* buffer,
size_t
buffer_size,
size_t
* index,
const
mip_packet_view
* packet);
42
43
bool
mip_format_packet(
char
* buffer,
size_t
buffer_size,
size_t
* index,
const
mip_packet_view
* packet);
44
45
bool
mip_format_field(
char
* buffer,
size_t
buffer_size,
size_t
* index,
const
mip_field_view
* field);
46
47
// Logging functions
48
49
void
mip_log_packet(
const
mip_packet_view
* packet,
microstrain_log_level
level);
50
51
void
mip_log_field(
const
mip_field_view
* field,
microstrain_log_level
level);
52
53
void
mip_log_packet_verbose(
const
mip_packet_view
* packet,
microstrain_log_level
level);
54
55
#define MIP_LOG_PACKET(packet, level) mip_log_packet(packet, level)
56
#define MIP_LOG_FIELD(field, level) mip_log_packet(field, level)
57
58
#define MIP_LOG_PACKET_VERBOSE(packet, level) mip_log_packet_verbose(packet, level)
59
60
61
#else // !MICROSTRAIN_LOGGING_ENABLED
62
63
64
#define MIP_LOG_PACKET(packet, grouping, level)
65
#define MIP_LOG_FIELD(field, grouping, level)
66
67
#define MIP_LOG_PACKET_VERBOSE(packet, grouping, level)
68
#define MIP_LOG_FIELD_VERBOSE(field, grouping, level)
69
70
71
#endif // MICROSTRAIN_LOGGING_ENABLED
72
73
77
78
#ifdef __cplusplus
79
}
// extern "C"
80
}
// namespace C
81
}
// namespace mip
82
#endif
mip_packet.h
mip
A collection of C++ classes and functions covering the full mip api.
Definition:
commands_3dm.c:11
mip::C::mip_field_view
struct mip::C::mip_field_view mip_field_view
A structure representing a MIP field.
microstrain_log_level
microstrain_log_level
Logging level enum.
Definition:
logging.h:87
mip_field.h
logging.h
mip::C::mip_packet_view
struct mip::C::mip_packet_view mip_packet_view
Structure representing a MIP Packet.
Generated by
1.8.17