API
Collaboration diagram for Type definitions for flatlogs.:

Typedefs

typedef int8_t flatlogs::logPrioT
 The type of the log priority code. More...
 
typedef uint32_t flatlogs::secT
 The type used for seconds.
More...
 
typedef uint16_t flatlogs::eventCodeT
 The type of an event code (16-bit unsigned int). More...
 
typedef uint8_t flatlogs::msgLen0T
 The type used for the short message length. More...
 
typedef uint16_t flatlogs::msgLen1T
 The type used for intermediate message length. More...
 
typedef uint64_t flatlogs::msgLen2T
 The type used for long message length. More...
 
typedef msgLen2T flatlogs::msgLenT
 The type used to refer to the message length, regardless of length. More...
 

Detailed Description

Typedef Documentation

◆ eventCodeT

typedef uint16_t flatlogs::eventCodeT

The type of an event code (16-bit unsigned int).

Rationale: gives us 65,536 individual events.

Definition at line 40 of file logDefs.hpp.

◆ logPrioT

typedef int8_t flatlogs::logPrioT

The type of the log priority code.

Definition at line 21 of file logDefs.hpp.

◆ msgLen0T

typedef uint8_t flatlogs::msgLen0T

The type used for the short message length.

Rationale: most flatlog entries are short, so we use minimum space for this.

Definition at line 47 of file logDefs.hpp.

◆ msgLen1T

typedef uint16_t flatlogs::msgLen1T

The type used for intermediate message length.

Rationale: using 1+2 =3 bytes for a 256 byte message is 1.2%. 1+4 = 2.0%, and 1+8 = 3.5%.

Definition at line 54 of file logDefs.hpp.

◆ msgLen2T

typedef uint64_t flatlogs::msgLen2T

The type used for long message length.

Rationale: once messages are 65536 or longer, the length field is negligible. This admits messages of huge sizes.

Definition at line 62 of file logDefs.hpp.

◆ msgLenT

The type used to refer to the message length, regardless of length.

This is not necessarily what is written to the buffer. Should always be msgLen2T so it is big enough to handle any possible length.

Definition at line 69 of file logDefs.hpp.

◆ secT

typedef uint32_t flatlogs::secT

The type used for seconds.

Rationale: unsigned 32 bits gives us enough to last 168 yrs from the UNIX epoch, which is more than enough. 24 bits is just 1/2 year, so we would have to use a partial byte to be more optimum.

Definition at line 29 of file logDefs.hpp.