-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathc-main-generator.h
More file actions
44 lines (37 loc) · 1.27 KB
/
Copy pathc-main-generator.h
File metadata and controls
44 lines (37 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#pragma once
#include <stdint.h>
#include <memory>
#include "c-sigprinter.h"
#include "filewriter.h"
#include "../types/message.h"
#include "../types/outfile.h"
#include "fs-creator.h"
class CiMainGenerator {
public:
void Generate(DbcMessageList_t& dlist, const AppSettings_t& fsd, bool mux_enabled);
private:
void Gen_MainHeader();
void Gen_MainSource();
void Gen_ConfigHeader();
void Gen_FMonHeader();
void Gen_FMonSource();
void Gen_CanMonUtil();
void Gen_DbcCodeConf();
void WriteSigStructField(const SignalDescriptor_t& sig, bool bitfield, size_t pad);
void WriteUnpackBody(const CiExpr_t* sgs);
void WritePackStructBody(const CiExpr_t* sgs);
void WritePackArrayBody(const CiExpr_t* sgs);
void PrintPackCommonText(const std::string& arrtxt, const CiExpr_t* sgs);
private:
CSigPrinter sigprt;
FileWriter fwriter;
// Actual max DLC value from dbc list instance
size_t val_maxDlcValueFromDbcList;
// Macro for default initial frame's data bytes value
std::string prt_initialDataByteValueName;
// Macro for frame DLC validation
std::string prt_dlcValidateMacroName;
const AppSettings_t* fdesc;
// Bool to turn on or off code generation based on multiplexor master signal values is enabled for multiplexed signals.
bool is_multiplex_enabled;
};