SAE Teensy ECU
IIT SAE Microcontroller programming
Loading...
Searching...
No Matches
Log.h File Reference

Special logging functionality. More...

#include <stdint.h>
#include <stdlib.h>
#include "LogConfig.def"

Go to the source code of this file.

Classes

struct  Logging::Log_t
 Base class used to log things over serial. More...
 

Namespaces

namespace  Logging
 Namespace to isolate Log_t struct.
 

Macros

#define _LogPrebuildString(x)   x
 Refer to Pre_Build.py.
 

Typedefs

typedef const char * LOG_TAG
 Type definition of logging tags This typedef is necessary to allow for easier manipulation of code by Pre_Build.py.
 
typedef const char * LOG_MSG
 Type definition for logging messages, only used internally.
 

Functions

uint32_t TAG2NUM (LOG_TAG tagValue)
 Return the final numbervalue of a LOG_TAG.
 
void Logging::enableCanbusRelay ()
 If a set address is received through canbus, the data will be pushed to a buffer to be printed.
 
void Logging::printLookup ()
 Print the ZLib compressed string of the current lookup table to serial.
 

Variables

Logging::Log_t Log
 The global logging object.
 

Detailed Description

Special logging functionality.

Author
IR
Version
0.1
Date
2020-11-12
See also
Logging::Log_t for info on how logging works
LogConfig.def for configuration of logging

Definition in file Log.h.

Macro Definition Documentation

◆ _LogPrebuildString

#define _LogPrebuildString (   x)    x

Refer to Pre_Build.py.

Definition at line 20 of file Log.h.

Typedef Documentation

◆ LOG_MSG

typedef const char* LOG_MSG

Type definition for logging messages, only used internally.

Definition at line 52 of file Log.h.

◆ LOG_TAG

typedef const char* LOG_TAG

Type definition of logging tags This typedef is necessary to allow for easier manipulation of code by Pre_Build.py.

Note
If Pre_Build.py is run, All declerations of LOG_TAG must be an inline string
Example usage ( Note that LOG_TAG_t should actually be LOG_TAG ) : LOG_TAG_t TAG = "Logging Tag"; ✔️
LOG_TAG_t TAG = someTagReference; ❌

Definition at line 48 of file Log.h.

Function Documentation

◆ TAG2NUM()

uint32_t TAG2NUM ( LOG_TAG  tagValue)

Return the final numbervalue of a LOG_TAG.

Warning
If mapped mode is not on, this will just return 0
Parameters
tagValueThe LOG_TAG to convert
Returns
uint16_t the number representation of the tag

Variable Documentation

◆ Log

Log
extern

The global logging object.

See also
Logging::Log_t for more info on logging