updated CodeGeneration

This commit is contained in:
2024-01-09 20:47:28 +01:00
parent ac28ab21d4
commit 157d59963c
16 changed files with 357 additions and 171 deletions

View File

@@ -1,54 +0,0 @@
/**
* @file dtc_defs.h
*
* @brief Header file for Diagnostic Trouble Code (DTC) definitions in the ChainLube application.
*
* This file contains definitions for Diagnostic Trouble Codes (DTC) in the ChainLube project.
* It includes enums for DTC active status, severity levels, and specific DTC codes.
* The file also defines an array of DTC definitions and a timestamp indicating the generation time.
*
* @note This file is auto-generated by a script on {{ timestamp }}.
*
* @author Marcel Peterkau
* @date 09.01.2024
*/
#ifndef DTC_DEFS_H
#define DTC_DEFS_H
#include <stdint.h>
typedef uint32_t DTCNum_t;
typedef enum
{
DTC_INACTIVE,
DTC_ACTIVE,
DTC_PREVIOUS
} DTCActive_t;
typedef enum
{
DTC_NONE,
DTC_INFO,
DTC_WARN,
DTC_CRITICAL
} DTCSeverity_t;
typedef struct {
DTCNum_t code;
DTCSeverity_t severity;
} DTC_t;
{% for dtc in dtc_macros -%}
{{ dtc }}
{% endfor %}
const DTC_t dtc_definitions[] = {
{% for struct in dtc_structs -%}
{{ struct }}
{% endfor -%}
};
const uint32_t dtc_generation_timestamp = {{ timestamp_unix }};
#endif // DTC_DEFS_H

View File

@@ -0,0 +1,24 @@
/**
* @file struct2json.h
*
* @brief Header file for converting structs to JSON objects.
*
* @note This file is auto-generated by a script on 2024-01-09 20:41:57.
*
* @author Marcel Peterkau
* @date 09.01.2024
*/
#ifndef _STRUCT2JSON_H_
#define _STRUCT2JSON_H_
#include <Arduino.h>
#include <ArduinoJson.h>
#include "config.h"
void generateJsonObject_LubeConfig(JsonObject& data);
void generateJsonObject_PersistenceData(JsonObject& data);
#endif /* _STRUCT2JSON_H_ */

View File

@@ -29,6 +29,7 @@
#include "dtc.h"
#include "common.h"
#include "debugger.h"
#include "struct2json.h"
void initWebUI();
void Webserver_Process();