PebbleOS
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs
Binary logging

Wire format of binary log messages. More...

Data Structures

struct  BinLogMessage_Version
 Message version, a set of flags describing the header and body. More...
 
struct  Time_Full
 Time of day in UTC. More...
 
struct  Time_Tick
 48-bit tick count. More...
 
struct  Date
 Date. More...
 
struct  MessageID
 Message ID of a hashed message. More...
 
struct  BinLogMessage_Header
 Common start of every header. More...
 
struct  BinLogMessage_Header_v0
 Header without time information. More...
 
struct  BinLogMessage_Header_v1
 Header with date and time. More...
 
struct  BinLogMessage_Header_v2
 Header with a tick count. More...
 
struct  BinLogMessage_Header_v3
 Header with date, time and a tick count. More...
 
struct  BinLogMessage_ParamBody
 Body of a hashed message. More...
 
struct  BinLogMessage_StringParam
 String parameter, padded to a multiple of 4 bytes. More...
 
struct  BinLogMessage_UnhashedBody
 Body of an unhashed message. More...
 
struct  BinLogMessage_Param_v0
 Hashed message with a v0 header. More...
 
struct  BinLogMessage_Param_v1
 Hashed message with a v1 header. More...
 
struct  BinLogMessage_Param_v2
 Hashed message with a v2 header. More...
 
struct  BinLogMessage_Param_v3
 Hashed message with a v3 header. More...
 
struct  BinLogMessage_Unhashed_v0
 Unhashed message with a v0 header. More...
 
struct  BinLogMessage_Unhashed_v1
 Unhashed message with a v1 header. More...
 
struct  BinLogMessage_Unhashed_v2
 Unhashed message with a v2 header. More...
 
struct  BinLogMessage_Unhashed_v3
 Unhashed message with a v3 header. More...
 
struct  BinLogMessage_String_v1
 Plain string message with a v1 header. More...
 
union  BinLogMessage_Version.__unnamed33__
 
struct  BinLogMessage_Version.__unnamed33__.__unnamed35__
 
union  MessageID.__unnamed37__
 
struct  MessageID.__unnamed37__.__unnamed39__
 

Macros

#define END   0xC0
 SLIP frame delimiter.
 
#define ESC   0xDB
 SLIP escape.
 
#define ESC_END   0xDC
 SLIP escaped frame delimiter.
 
#define ESC_ESC   0xDD
 SLIP escaped escape.
 
#define BINLOGMSG_VERSION_UNHASHED_MSG   (1 << 3)
 Version flag: the body is an unhashed message.
 
#define BINLOGMSG_VERSION_PARAMETERIZED   (1 << 2)
 Version flag: the body is a hashed message with parameters.
 
#define BINLOGMSG_VERSION_TICK_COUNT   (1 << 1)
 Version flag: the header has a tick count.
 
#define BINLOGMSG_VERSION_TIME_DATE   (1 << 0)
 Version flag: the header has a date and time.
 
#define BINLOGMSG_VERSION_HEADER_V0   (0)
 Version flags of BinLogMessage_Header_v0.
 
#define BINLOGMSG_VERSION_HEADER_V1   (BINLOGMSG_VERSION_TIME_DATE)
 Version flags of BinLogMessage_Header_v1.
 
#define BINLOGMSG_VERSION_HEADER_V2   (BINLOGMSG_VERSION_TICK_COUNT)
 Version flags of BinLogMessage_Header_v2.
 
#define BINLOGMSG_VERSION_HEADER_V3   (BINLOGMSG_VERSION_TIME_DATE | BINLOGMSG_VERSION_TICK_COUNT)
 Version flags of BinLogMessage_Header_v3.
 
#define BINLOGMSG_VERSION_PARAM_V0   (BINLOGMSG_VERSION_HEADER_V0 | BINLOGMSG_VERSION_PARAMETERIZED)
 Version flags of BinLogMessage_Param_v0.
 
#define BINLOGMSG_VERSION_PARAM_V1   (BINLOGMSG_VERSION_HEADER_V1 | BINLOGMSG_VERSION_PARAMETERIZED)
 Version flags of BinLogMessage_Param_v1.
 
#define BINLOGMSG_VERSION_PARAM_V2   (BINLOGMSG_VERSION_HEADER_V2 | BINLOGMSG_VERSION_PARAMETERIZED)
 Version flags of BinLogMessage_Param_v2.
 
#define BINLOGMSG_VERSION_PARAM_V3   (BINLOGMSG_VERSION_HEADER_V3 | BINLOGMSG_VERSION_PARAMETERIZED)
 Version flags of BinLogMessage_Param_v3.
 
#define BINLOGMSG_VERSION_UNHASHED_V0   (BINLOGMSG_VERSION_HEADER_V0 | BINLOGMSG_VERSION_UNHASHED_MSG)
 Version flags of BinLogMessage_Unhashed_v0.
 
#define BINLOGMSG_VERSION_UNHASHED_V1   (BINLOGMSG_VERSION_HEADER_V1 | BINLOGMSG_VERSION_UNHASHED_MSG)
 Version flags of BinLogMessage_Unhashed_v1.
 
#define BINLOGMSG_VERSION_UNHASHED_V2   (BINLOGMSG_VERSION_HEADER_V2 | BINLOGMSG_VERSION_UNHASHED_MSG)
 Version flags of BinLogMessage_Unhashed_v2.
 
#define BINLOGMSG_VERSION_UNHASHED_V3   (BINLOGMSG_VERSION_HEADER_V3 | BINLOGMSG_VERSION_UNHASHED_MSG)
 Version flags of BinLogMessage_Unhashed_v3.
 
#define BINLOGMSG_VERSION_STRING_V1   (BINLOGMSG_VERSION_HEADER_V1)
 Version flags of BinLogMessage_String_v1.
 

Typedefs

typedef uint32_t BinLogMessage_IntParam
 Integer parameter.
 

Detailed Description

Wire format of binary log messages.

A message is a header, whose version byte says which optional fields follow, and a body: hashed (a message ID and its parameters), unhashed (file, line and text) or a plain string. Without PULSE, messages are SLIP framed as END, message, CRC-32, END.


Data Structure Documentation

◆ BinLogMessage_Version

struct BinLogMessage_Version

Message version, a set of flags describing the header and body.

Data Fields
union BinLogMessage_Version.__unnamed33__ __unnamed__

◆ Time_Full

struct Time_Full

Time of day in UTC.

All fields are 0-based.

Data Fields
uint32_t hour: 5 Hour, 0 to 23.
uint32_t millisecond: 10 Millisecond, 0 to 999.
uint32_t minute: 6 Minute, 0 to 59.
uint32_t reserved: 5 Reserved.
uint32_t second: 6 Second, 0 to 59.

◆ Time_Tick

struct Time_Tick

48-bit tick count.

Total ticks = (count_high << 32) | count.

Data Fields
uint32_t count Low 32 bits.
uint16_t count_high High 16 bits.
uint16_t reserved Reserved.

◆ Date

struct Date

Date.

(0, 0, 0) is an invalid or unknown date, so a zero Date is not the start of the epoch, which would be (0, 1, 1).

Data Fields
uint16_t day: 5 Day of the month, 1 to 31.
uint16_t month: 4 Month, 1 to 12.
uint16_t year: 7 Year offset from 2000, e.g.

16 for 2016.

◆ MessageID

struct MessageID

Message ID of a hashed message.

Data Fields
union MessageID.__unnamed37__ __unnamed__

◆ BinLogMessage_Header

struct BinLogMessage_Header

Common start of every header.

Data Fields
uint8_t length Message length in bytes.
uint8_t version Version flags, see BinLogMessage_Version.

◆ BinLogMessage_Header_v0

struct BinLogMessage_Header_v0

Header without time information.

Data Fields
uint8_t length Message length in bytes.
uint8_t reserved[2] Reserved.
uint8_t version Version flags.

◆ BinLogMessage_Header_v1

struct BinLogMessage_Header_v1

Header with date and time.

Data Fields
Date date Date.
uint8_t length Message length in bytes.
Time_Full time Time of day.
uint8_t version Version flags.

◆ BinLogMessage_Header_v2

struct BinLogMessage_Header_v2

Header with a tick count.

Data Fields
uint8_t length Message length in bytes.
uint8_t reserved[2] Reserved.
Time_Tick tick_count Tick count.
uint8_t version Version flags.

◆ BinLogMessage_Header_v3

struct BinLogMessage_Header_v3

Header with date, time and a tick count.

Data Fields
Date date Date.
uint8_t length Message length in bytes.
Time_Tick tick_count Tick count.
Time_Full time Time of day.
uint8_t version Version flags.

◆ BinLogMessage_ParamBody

struct BinLogMessage_ParamBody

Body of a hashed message.

Data Fields
MessageID msgid Message ID.
uint32_t payload[0] Parameters: BinLogMessage_IntParam or BinLogMessage_StringParam entries.

◆ BinLogMessage_StringParam

struct BinLogMessage_StringParam

String parameter, padded to a multiple of 4 bytes.

Data Fields
uint8_t length Length of string.
uint8_t string[0] Characters, followed by padding.

◆ BinLogMessage_UnhashedBody

struct BinLogMessage_UnhashedBody

Body of an unhashed message.

Data Fields
uint8_t core_number: 2 Core that logged the message.
uint8_t filename[16] Source file name.
uint8_t length Length of string.
uint8_t level Log level.
uint16_t line_number Source line number.
uint8_t reserved: 2 Reserved.
uint8_t string[0] Message, followed by padding.
uint8_t task_id: 4 Task that logged the message.

◆ BinLogMessage_Param_v0

struct BinLogMessage_Param_v0

Hashed message with a v0 header.

Data Fields
BinLogMessage_ParamBody body Body.
BinLogMessage_Header_v0 header Header.

◆ BinLogMessage_Param_v1

struct BinLogMessage_Param_v1

Hashed message with a v1 header.

Data Fields
BinLogMessage_ParamBody body Body.
BinLogMessage_Header_v1 header Header.

◆ BinLogMessage_Param_v2

struct BinLogMessage_Param_v2

Hashed message with a v2 header.

Data Fields
BinLogMessage_ParamBody body Body.
BinLogMessage_Header_v2 header Header.

◆ BinLogMessage_Param_v3

struct BinLogMessage_Param_v3

Hashed message with a v3 header.

Data Fields
BinLogMessage_ParamBody body Body.
BinLogMessage_Header_v3 header Header.

◆ BinLogMessage_Unhashed_v0

struct BinLogMessage_Unhashed_v0

Unhashed message with a v0 header.

Data Fields
BinLogMessage_UnhashedBody body Body.
BinLogMessage_Header_v0 header Header.

◆ BinLogMessage_Unhashed_v1

struct BinLogMessage_Unhashed_v1

Unhashed message with a v1 header.

Data Fields
BinLogMessage_UnhashedBody body Body.
BinLogMessage_Header_v1 header Header.

◆ BinLogMessage_Unhashed_v2

struct BinLogMessage_Unhashed_v2

Unhashed message with a v2 header.

Data Fields
BinLogMessage_UnhashedBody body Body.
BinLogMessage_Header_v2 header Header.

◆ BinLogMessage_Unhashed_v3

struct BinLogMessage_Unhashed_v3

Unhashed message with a v3 header.

Data Fields
BinLogMessage_UnhashedBody body Body.
BinLogMessage_Header_v3 header Header.

◆ BinLogMessage_String_v1

struct BinLogMessage_String_v1

Plain string message with a v1 header.

Data Fields
BinLogMessage_Header_v1 header Header.
uint8_t string[0] Message.

◆ BinLogMessage_Version.__unnamed33__

union BinLogMessage_Version.__unnamed33__
Data Fields
struct BinLogMessage_Version.__unnamed33__.__unnamed35__ __unnamed__
uint8_t version All flags.

◆ BinLogMessage_Version.__unnamed33__.__unnamed35__

struct BinLogMessage_Version.__unnamed33__.__unnamed35__
Data Fields
uint8_t parameterized: 1 The body is a hashed message with parameters.
uint8_t reserved: 4 Reserved.
uint8_t tick_count: 1 The header has a tick count.
uint8_t time_date: 1 The header has a date and time.
uint8_t unhashed_msg: 1 The body is an unhashed message.

◆ MessageID.__unnamed37__

union MessageID.__unnamed37__
Data Fields
struct MessageID.__unnamed37__.__unnamed39__ __unnamed__
uint32_t msg_id All fields.

◆ MessageID.__unnamed37__.__unnamed39__

struct MessageID.__unnamed37__.__unnamed39__
Data Fields
uint32_t core_number: 2 Core that logged the message.
uint32_t msg_number: 19 Offset of the string in the log string table.
uint32_t reserved: 1 Reserved.
uint32_t str_index_1: 3 1-based index of the first string parameter, 0 for none.
uint32_t str_index_2: 3 1-based index of the second string parameter, 0 for none.
uint32_t task_id: 4 Task that logged the message.

Macro Definition Documentation

◆ BINLOGMSG_VERSION_HEADER_V0

#define BINLOGMSG_VERSION_HEADER_V0   (0)

Version flags of BinLogMessage_Header_v0.

◆ BINLOGMSG_VERSION_HEADER_V1

#define BINLOGMSG_VERSION_HEADER_V1   (BINLOGMSG_VERSION_TIME_DATE)

Version flags of BinLogMessage_Header_v1.

◆ BINLOGMSG_VERSION_HEADER_V2

#define BINLOGMSG_VERSION_HEADER_V2   (BINLOGMSG_VERSION_TICK_COUNT)

Version flags of BinLogMessage_Header_v2.

◆ BINLOGMSG_VERSION_HEADER_V3

#define BINLOGMSG_VERSION_HEADER_V3   (BINLOGMSG_VERSION_TIME_DATE | BINLOGMSG_VERSION_TICK_COUNT)

Version flags of BinLogMessage_Header_v3.

◆ BINLOGMSG_VERSION_PARAM_V0

#define BINLOGMSG_VERSION_PARAM_V0   (BINLOGMSG_VERSION_HEADER_V0 | BINLOGMSG_VERSION_PARAMETERIZED)

Version flags of BinLogMessage_Param_v0.

◆ BINLOGMSG_VERSION_PARAM_V1

#define BINLOGMSG_VERSION_PARAM_V1   (BINLOGMSG_VERSION_HEADER_V1 | BINLOGMSG_VERSION_PARAMETERIZED)

Version flags of BinLogMessage_Param_v1.

◆ BINLOGMSG_VERSION_PARAM_V2

#define BINLOGMSG_VERSION_PARAM_V2   (BINLOGMSG_VERSION_HEADER_V2 | BINLOGMSG_VERSION_PARAMETERIZED)

Version flags of BinLogMessage_Param_v2.

◆ BINLOGMSG_VERSION_PARAM_V3

#define BINLOGMSG_VERSION_PARAM_V3   (BINLOGMSG_VERSION_HEADER_V3 | BINLOGMSG_VERSION_PARAMETERIZED)

Version flags of BinLogMessage_Param_v3.

◆ BINLOGMSG_VERSION_PARAMETERIZED

#define BINLOGMSG_VERSION_PARAMETERIZED   (1 << 2)

Version flag: the body is a hashed message with parameters.

◆ BINLOGMSG_VERSION_STRING_V1

#define BINLOGMSG_VERSION_STRING_V1   (BINLOGMSG_VERSION_HEADER_V1)

Version flags of BinLogMessage_String_v1.

◆ BINLOGMSG_VERSION_TICK_COUNT

#define BINLOGMSG_VERSION_TICK_COUNT   (1 << 1)

Version flag: the header has a tick count.

◆ BINLOGMSG_VERSION_TIME_DATE

#define BINLOGMSG_VERSION_TIME_DATE   (1 << 0)

Version flag: the header has a date and time.

◆ BINLOGMSG_VERSION_UNHASHED_MSG

#define BINLOGMSG_VERSION_UNHASHED_MSG   (1 << 3)

Version flag: the body is an unhashed message.

◆ BINLOGMSG_VERSION_UNHASHED_V0

#define BINLOGMSG_VERSION_UNHASHED_V0   (BINLOGMSG_VERSION_HEADER_V0 | BINLOGMSG_VERSION_UNHASHED_MSG)

Version flags of BinLogMessage_Unhashed_v0.

◆ BINLOGMSG_VERSION_UNHASHED_V1

#define BINLOGMSG_VERSION_UNHASHED_V1   (BINLOGMSG_VERSION_HEADER_V1 | BINLOGMSG_VERSION_UNHASHED_MSG)

Version flags of BinLogMessage_Unhashed_v1.

◆ BINLOGMSG_VERSION_UNHASHED_V2

#define BINLOGMSG_VERSION_UNHASHED_V2   (BINLOGMSG_VERSION_HEADER_V2 | BINLOGMSG_VERSION_UNHASHED_MSG)

Version flags of BinLogMessage_Unhashed_v2.

◆ BINLOGMSG_VERSION_UNHASHED_V3

#define BINLOGMSG_VERSION_UNHASHED_V3   (BINLOGMSG_VERSION_HEADER_V3 | BINLOGMSG_VERSION_UNHASHED_MSG)

Version flags of BinLogMessage_Unhashed_v3.

◆ END

#define END   0xC0

SLIP frame delimiter.

◆ ESC

#define ESC   0xDB

SLIP escape.

◆ ESC_END

#define ESC_END   0xDC

SLIP escaped frame delimiter.

◆ ESC_ESC

#define ESC_ESC   0xDD

SLIP escaped escape.

Typedef Documentation

◆ BinLogMessage_IntParam

typedef uint32_t BinLogMessage_IntParam

Integer parameter.