#ifndef _DEBUGGER_H_
#define _DEBUGGER_H_

#include <Arduino.h>
#include "webui.h"

const char helpCmd[] = "sysinfo     - System Info\r\n"
                       "netinfo     - WiFi Info\r\n"
                       "formatPDS   - Format Persistence EEPROM Data\r\n"
                       "formatCFG   - Format Configuration EEPROM Data\r\n"
                       "checkEE     - Check EEPROM with checksum\r\n"
                       "dumpEE1k    - dump the first 1kb of EEPROM to Serial\r\n"
                       "dumpEE      - dump the whole EPPROM to Serial\r\n"
                       "resetPageEE - Reset the PersistenceData Page\r\n"
                       "dumpCFG     - print Config struct\r\n"
                       "dumpPDS     - print PersistanceStruct\r\n"
                       "saveEE      - save EE-Data\r\n"
                       "showdtc     - Show all DTCs\r\n"
                       "dumpGlobals - print globals\r\n";

typedef enum DebugStatus_e
{
    disabled,
    enabled
} DebugStatus_t;

typedef enum DebugPorts_e
{
    dbg_Serial,
    dbg_Webui,
    dbg_cntElements
} DebugPorts_t;

const char sDebugPorts[dbg_cntElements][7] = {
    "Serial",
    "WebUI"};

extern DebugStatus_t DebuggerStatus[dbg_cntElements];

void initDebugger();
void pushCANDebug(uint32_t id, uint8_t dlc, uint8_t *data);
void Debug_pushMessage(const char *format, ...);
void SetDebugportStatus(DebugPorts_t port, DebugStatus_t status);

#endif