generated header file as well

This commit is contained in:
Robin Müller 2021-05-17 19:12:25 +02:00
parent 99acbccf84
commit 17d187d4b0
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
7 changed files with 19 additions and 14 deletions

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file.
* @details
* Contains 60 translations.
* Generated on: 2021-05-17 19:02:48
* Generated on: 2021-05-17 19:11:51
*/
#include "translateObjects.h"

View File

@ -1,16 +1,8 @@
/*
* translateObjects.h
*
* Created on: 28 May 2019
* Author: Robin
*/
#ifndef FSFWCONFIG_OBJECTS_TRANSLATEOBJECTS_H_
#define FSFWCONFIG_OBJECTS_TRANSLATEOBJECTS_H_
#include <fsfw/objectmanager/ObjectManagerIF.h>
#include <fsfw/objectmanager/SystemObjectIF.h>
const char* translateObject(object_id_t object);
#endif /* FSFWCONFIG_OBJECTS_TRANSLATEOBJECTS_H_ */

@ -1 +1 @@
Subproject commit af383e7f14454c5e745073a8790c296508c94b35
Subproject commit 236aaf71ea43d1e6e21e8bdbc4b72e24978ccf04

View File

@ -11,8 +11,7 @@ On Windows, Build Tools installation might be necessary
import datetime
from modgen.objects.objects import sql_object_exporter, ObjectDefinitionParser, write_translation_file, \
export_object_file
from modgen.utility.csv_writer import CsvWriter
export_object_file, write_translation_header_file
from modgen.utility.printer import PrettyPrinter
from modgen.utility.file_management import copy_file, move_file
from modgen.utility.sql_writer import SQL_DATABASE_NAME
@ -28,6 +27,8 @@ MOVE_CSV = True
GENERATE_CPP = True
COPY_CPP = True
GENERATE_HEADER = True
BSP_SELECT = BspType.BSP_Q7S
BSP_DIR_NAME = BSP_SELECT.value
@ -41,6 +42,7 @@ else:
CSV_MOVE_DESTINATION = "../"
CPP_FILENAME = "translateObjects.cpp"
CPP_H_FILENAME = "translateObjects.h"
CSV_OBJECT_FILENAME = "mib_objects.csv"
FILE_SEPARATOR = ";"
@ -100,6 +102,9 @@ def handle_file_export(list_items):
if COPY_CPP:
print("ObjectParser: Copying object file to " + CPP_COPY_DESTINATION)
copy_file(CPP_FILENAME, CPP_COPY_DESTINATION)
if GENERATE_HEADER:
write_translation_header_file(filename=CPP_H_FILENAME)
copy_file(filename=CPP_H_FILENAME, destination=CPP_COPY_DESTINATION)
if GENERATE_CSV:
print("ObjectParser: Generating text export.")
export_object_file(filename=CSV_OBJECT_FILENAME, object_list=list_items, file_separator=FILE_SEPARATOR)

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file.
* @details
* Contains 60 translations.
* Generated on: 2021-05-17 19:02:48
* Generated on: 2021-05-17 19:11:51
*/
#include "translateObjects.h"

View File

@ -0,0 +1,8 @@
#ifndef FSFWCONFIG_OBJECTS_TRANSLATEOBJECTS_H_
#define FSFWCONFIG_OBJECTS_TRANSLATEOBJECTS_H_
#include <fsfw/objectmanager/SystemObjectIF.h>
const char* translateObject(object_id_t object);
#endif /* FSFWCONFIG_OBJECTS_TRANSLATEOBJECTS_H_ */

Binary file not shown.