generated translation file

This commit is contained in:
Robin Müller 2021-05-17 19:03:37 +02:00
parent 6837ee641b
commit 99acbccf84
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
5 changed files with 205 additions and 248 deletions

View File

@ -1,72 +1,38 @@
/* Auto-generated event translation file. Contains 77 translations. */ /**
#include <fsfwconfig/objects/translateObjects.h> * @brief Auto-generated object translation file.
* @details
* Contains 60 translations.
* Generated on: 2021-05-17 19:02:48
*/
#include "translateObjects.h"
const char *AT91_UART2_TEST_TASK_STRING = "AT91_UART2_TEST_TASK"; const char *P60DOCK_TEST_TASK_STRING = "P60DOCK_TEST_TASK";
const char *ARDUINO_0_STRING = "ARDUINO_0";
const char *ARDUINO_1_STRING = "ARDUINO_1";
const char *ARDUINO_2_STRING = "ARDUINO_2";
const char *ARDUINO_3_STRING = "ARDUINO_3";
const char *ARDUINO_4_STRING = "ARDUINO_4";
const char *AT91_I2C_TEST_TASK_STRING = "AT91_I2C_TEST_TASK";
const char *TEST_TASK_STRING = "TEST_TASK";
const char *PCDU_HANDLER_STRING = "PCDU_HANDLER"; const char *PCDU_HANDLER_STRING = "PCDU_HANDLER";
const char *DUMMY_HANDLER_STRING = "DUMMY_HANDLER"; const char *SOLAR_ARRAY_DEPL_HANDLER_STRING = "SOLAR_ARRAY_DEPL_HANDLER";
const char *S_ADC1_DEC2_STRING = "S_ADC1_DEC2"; const char *SYRLINKS_HK_HANDLER_STRING = "SYRLINKS_HK_HANDLER";
const char *GPS0_HANDLER_STRING = "GPS0_HANDLER"; const char *GPIO_IF_STRING = "GPIO_IF";
const char *DLR_PVCH_STRING = "DLR_PVCH"; const char *ARDUINO_COM_IF_STRING = "ARDUINO_COM_IF";
const char *GYRO1_STRING = "GYRO1"; const char *CSP_COM_IF_STRING = "CSP_COM_IF";
const char *DLR_IRAS_STRING = "DLR_IRAS"; const char *I2C_COM_IF_STRING = "I2C_COM_IF";
const char *_DEC1_O1_STRING = "_DEC1_O1"; const char *UART_COM_IF_STRING = "UART_COM_IF";
const char *_DEC1_O2_STRING = "_DEC1_O2"; const char *SPI_COM_IF_STRING = "SPI_COM_IF";
const char *S1_DEC1_O3_STRING = "S1_DEC1_O3";
const char *S2_DEC1_O4_STRING = "S2_DEC1_O4";
const char *S3_DEC1_O5_STRING = "S3_DEC1_O5";
const char *PT1000_PVHC_DEC1_O6_STRING = "PT1000_PVHC_DEC1_O6";
const char *PT1000_CCSDS1_DEC2_STRING = "PT1000_CCSDS1_DEC2";
const char *PT1000_MGT1_DEC2_STRING = "PT1000_MGT1_DEC2";
const char *S4_DEC2_STRING = "S4_DEC2";
const char *S5_DEC2_STRING = "S5_DEC2";
const char *S6_DEC2_STRING = "S6_DEC2";
const char *PT1000_PVCH_DEC2_STRING = "PT1000_PVCH_DEC2";
const char *_DEC3_STRING = "_DEC3";
const char *PT1000_CCSDS2_DEC3_STRING = "PT1000_CCSDS2_DEC3";
const char *S7_DEC3_STRING = "S7_DEC3";
const char *S8_DEC3_STRING = "S8_DEC3";
const char *PT1000_PVCH_DEC3_STRING = "PT1000_PVCH_DEC3";
const char *GYRO2_STRING = "GYRO2";
const char *PT1000_PLOC_DEC4_STRING = "PT1000_PLOC_DEC4";
const char *S9_DEC4_STRING = "S9_DEC4";
const char *S10_DEC4_STRING = "S10_DEC4";
const char *PT1000_PVHC_DEC4_STRING = "PT1000_PVHC_DEC4";
const char *S_ADC_DEC4_STRING = "S_ADC_DEC4";
const char *GPS1_HANDLER_STRING = "GPS1_HANDLER";
const char *DUMMY_GPS_COM_IF_STRING = "DUMMY_GPS_COM_IF";
const char *RS232_DEVICE_COM_IF_STRING = "RS232_DEVICE_COM_IF";
const char *I2C_DEVICE_COM_IF_STRING = "I2C_DEVICE_COM_IF";
const char *GPIO_DEVICE_COM_IF_STRING = "GPIO_DEVICE_COM_IF";
const char *SPI_POLLING_TASK_STRING = "SPI_POLLING_TASK";
const char *SPI_DEVICE_COM_IF_STRING = "SPI_DEVICE_COM_IF";
const char *DUMMY_ECHO_COM_IF_STRING = "DUMMY_ECHO_COM_IF";
const char *SD_CARD_HANDLER_STRING = "SD_CARD_HANDLER";
const char *CCSDS_PACKET_DISTRIBUTOR_STRING = "CCSDS_PACKET_DISTRIBUTOR";
const char *PUS_PACKET_DISTRIBUTOR_STRING = "PUS_PACKET_DISTRIBUTOR";
const char *UDP_TMTC_BRIDGE_STRING = "UDP_TMTC_BRIDGE";
const char *EMAC_POLLING_TASK_STRING = "EMAC_POLLING_TASK";
const char *SERIAL_POLLING_TASK_STRING = "SERIAL_POLLING_TASK";
const char *UART_TMTC_BRIDGE_STRING = "UART_TMTC_BRIDGE";
const char *PUS_SERVICE_1_STRING = "PUS_SERVICE_1";
const char *PUS_SERVICE_2_STRING = "PUS_SERVICE_2";
const char *PUS_SERVICE_3_STRING = "PUS_SERVICE_3"; const char *PUS_SERVICE_3_STRING = "PUS_SERVICE_3";
const char *PUS_SERVICE_5_STRING = "PUS_SERVICE_5"; const char *PUS_SERVICE_5_STRING = "PUS_SERVICE_5";
const char *PUS_SERVICE_6_STRING = "PUS_SERVICE_6"; const char *PUS_SERVICE_6_STRING = "PUS_SERVICE_6";
const char *PUS_SERVICE_8_STRING = "PUS_SERVICE_8"; const char *PUS_SERVICE_8_STRING = "PUS_SERVICE_8";
const char *PUS_SERVICE_9_STRING = "PUS_SERVICE_9";
const char *PUS_SERVICE_17_STRING = "PUS_SERVICE_17";
const char *PUS_SERVICE_23_STRING = "PUS_SERVICE_23"; const char *PUS_SERVICE_23_STRING = "PUS_SERVICE_23";
const char *PUS_SERVICE_200_STRING = "PUS_SERVICE_200";
const char *PUS_SERVICE_201_STRING = "PUS_SERVICE_201"; const char *PUS_SERVICE_201_STRING = "PUS_SERVICE_201";
const char *PUS_TIME_STRING = "PUS_TIME"; const char *TM_FUNNEL_STRING = "TM_FUNNEL";
const char *PUS_FUNNEL_STRING = "PUS_FUNNEL"; const char *FSFW_OBJECTS_START_STRING = "FSFW_OBJECTS_START";
const char *PUS_SERVICE_1_VERIFICATION_STRING = "PUS_SERVICE_1_VERIFICATION";
const char *PUS_SERVICE_2_DEVICE_ACCESS_STRING = "PUS_SERVICE_2_DEVICE_ACCESS";
const char *PUS_SERVICE_3_HOUSEKEEPING_STRING = "PUS_SERVICE_3_HOUSEKEEPING";
const char *PUS_SERVICE_5_EVENT_REPORTING_STRING = "PUS_SERVICE_5_EVENT_REPORTING";
const char *PUS_SERVICE_8_FUNCTION_MGMT_STRING = "PUS_SERVICE_8_FUNCTION_MGMT";
const char *PUS_SERVICE_9_TIME_MGMT_STRING = "PUS_SERVICE_9_TIME_MGMT";
const char *PUS_SERVICE_17_TEST_STRING = "PUS_SERVICE_17_TEST";
const char *PUS_SERVICE_20_PARAMETERS_STRING = "PUS_SERVICE_20_PARAMETERS";
const char *PUS_SERVICE_200_MODE_MGMT_STRING = "PUS_SERVICE_200_MODE_MGMT";
const char *HEALTH_TABLE_STRING = "HEALTH_TABLE"; const char *HEALTH_TABLE_STRING = "HEALTH_TABLE";
const char *MODE_STORE_STRING = "MODE_STORE"; const char *MODE_STORE_STRING = "MODE_STORE";
const char *EVENT_MANAGER_STRING = "EVENT_MANAGER"; const char *EVENT_MANAGER_STRING = "EVENT_MANAGER";
@ -74,169 +40,157 @@ const char *INTERNAL_ERROR_REPORTER_STRING = "INTERNAL_ERROR_REPORTER";
const char *TC_STORE_STRING = "TC_STORE"; const char *TC_STORE_STRING = "TC_STORE";
const char *TM_STORE_STRING = "TM_STORE"; const char *TM_STORE_STRING = "TM_STORE";
const char *IPC_STORE_STRING = "IPC_STORE"; const char *IPC_STORE_STRING = "IPC_STORE";
const char *AT91_SPI_TEST_TASK_STRING = "AT91_SPI_TEST_TASK"; const char *TIME_STAMPER_STRING = "TIME_STAMPER";
const char *STM32_TEST_TASK_STRING = "STM32_TEST_TASK"; const char *FSFW_OBJECTS_END_STRING = "FSFW_OBJECTS_END";
const char *AT91_UART0_TEST_TASK_STRING = "AT91_UART0_TEST_TASK"; const char *HEATER_HANDLER_STRING = "HEATER_HANDLER";
const char *RTD_IC3_STRING = "RTD_IC3";
const char *RTD_IC4_STRING = "RTD_IC4";
const char *RTD_IC5_STRING = "RTD_IC5";
const char *RTD_IC6_STRING = "RTD_IC6";
const char *RTD_IC7_STRING = "RTD_IC7";
const char *RTD_IC8_STRING = "RTD_IC8";
const char *RTD_IC9_STRING = "RTD_IC9";
const char *RTD_IC10_STRING = "RTD_IC10";
const char *RTD_IC11_STRING = "RTD_IC11";
const char *RTD_IC12_STRING = "RTD_IC12";
const char *RTD_IC13_STRING = "RTD_IC13";
const char *RTD_IC14_STRING = "RTD_IC14";
const char *SPI_TEST_STRING = "SPI_TEST";
const char *RTD_IC15_STRING = "RTD_IC15";
const char *RTD_IC16_STRING = "RTD_IC16";
const char *RTD_IC17_STRING = "RTD_IC17";
const char *RTD_IC18_STRING = "RTD_IC18";
const char *RAD_SENSOR_STRING = "RAD_SENSOR";
const char *DUMMY_HANDLER_STRING = "DUMMY_HANDLER";
const char *DUMMY_INTERFACE_STRING = "DUMMY_INTERFACE";
const char *LIBGPIOD_TEST_STRING = "LIBGPIOD_TEST";
const char *TEST_TASK_STRING = "TEST_TASK";
const char *NO_OBJECT_STRING = "NO_OBJECT"; const char *NO_OBJECT_STRING = "NO_OBJECT";
const char* translateObject(object_id_t object){ const char* translateObject(object_id_t object) {
switch((object&0xFFFFFFFF)){ switch( (object & 0xFFFFFFFF) ) {
case 0x000123336: case 0x00005060:
return AT91_UART2_TEST_TASK_STRING; return P60DOCK_TEST_TASK_STRING;
case 0x01010100: case 0x44001000:
return ARDUINO_0_STRING; return PCDU_HANDLER_STRING;
case 0x01010101: case 0x44001001:
return ARDUINO_1_STRING; return SOLAR_ARRAY_DEPL_HANDLER_STRING;
case 0x01010102: case 0x44001002:
return ARDUINO_2_STRING; return SYRLINKS_HK_HANDLER_STRING;
case 0x01010103: case 0x47000001:
return ARDUINO_3_STRING; return GPIO_IF_STRING;
case 0x01010104: case 0x49000001:
return ARDUINO_4_STRING; return ARDUINO_COM_IF_STRING;
case 0x12345678: case 0x49000002:
return AT91_I2C_TEST_TASK_STRING; return CSP_COM_IF_STRING;
case 0x42694269: case 0x49000003:
return TEST_TASK_STRING; return I2C_COM_IF_STRING;
case 0x44003200: case 0x49000004:
return PCDU_HANDLER_STRING; return UART_COM_IF_STRING;
case 0x4400AFFE: case 0x49000005:
return DUMMY_HANDLER_STRING; return SPI_COM_IF_STRING;
case 0x44020108: case 0x51000300:
return S_ADC1_DEC2_STRING; return PUS_SERVICE_3_STRING;
case 0x44101F00: case 0x51000400:
return GPS0_HANDLER_STRING; return PUS_SERVICE_5_STRING;
case 0x44104000: case 0x51000500:
return DLR_PVCH_STRING; return PUS_SERVICE_6_STRING;
case 0x44105000: case 0x51000800:
return GYRO1_STRING; return PUS_SERVICE_8_STRING;
case 0x44106000: case 0x51002300:
return DLR_IRAS_STRING; return PUS_SERVICE_23_STRING;
case 0x44115401: case 0x51020100:
return _DEC1_O1_STRING; return PUS_SERVICE_201_STRING;
case 0x44115402: case 0x52000002:
return _DEC1_O2_STRING; return TM_FUNNEL_STRING;
case 0x44115404: case 0x53000000:
return S1_DEC1_O3_STRING; return FSFW_OBJECTS_START_STRING;
case 0x44115405: case 0x53000001:
return S2_DEC1_O4_STRING; return PUS_SERVICE_1_VERIFICATION_STRING;
case 0x44115406: case 0x53000002:
return S3_DEC1_O5_STRING; return PUS_SERVICE_2_DEVICE_ACCESS_STRING;
case 0x44115407: case 0x53000003:
return PT1000_PVHC_DEC1_O6_STRING; return PUS_SERVICE_3_HOUSEKEEPING_STRING;
case 0x44125401: case 0x53000005:
return PT1000_CCSDS1_DEC2_STRING; return PUS_SERVICE_5_EVENT_REPORTING_STRING;
case 0x44125403: case 0x53000008:
return PT1000_MGT1_DEC2_STRING; return PUS_SERVICE_8_FUNCTION_MGMT_STRING;
case 0x44125404: case 0x53000009:
return S4_DEC2_STRING; return PUS_SERVICE_9_TIME_MGMT_STRING;
case 0x44125405: case 0x53000017:
return S5_DEC2_STRING; return PUS_SERVICE_17_TEST_STRING;
case 0x44125406: case 0x53000020:
return S6_DEC2_STRING; return PUS_SERVICE_20_PARAMETERS_STRING;
case 0x44125407: case 0x53000200:
return PT1000_PVCH_DEC2_STRING; return PUS_SERVICE_200_MODE_MGMT_STRING;
case 0x44130301: case 0x53010000:
return _DEC3_STRING; return HEALTH_TABLE_STRING;
case 0x44130302: case 0x53010100:
return PT1000_CCSDS2_DEC3_STRING; return MODE_STORE_STRING;
case 0x44130305: case 0x53030000:
return S7_DEC3_STRING; return EVENT_MANAGER_STRING;
case 0x44130306: case 0x53040000:
return S8_DEC3_STRING; return INTERNAL_ERROR_REPORTER_STRING;
case 0x44130307: case 0x534f0100:
return PT1000_PVCH_DEC3_STRING; return TC_STORE_STRING;
case 0x44130308: case 0x534f0200:
return GYRO2_STRING; return TM_STORE_STRING;
case 0x44145401: case 0x534f0300:
return PT1000_PLOC_DEC4_STRING; return IPC_STORE_STRING;
case 0x44145404: case 0x53500010:
return S9_DEC4_STRING; return TIME_STAMPER_STRING;
case 0x44145405: case 0x53ffffff:
return S10_DEC4_STRING; return FSFW_OBJECTS_END_STRING;
case 0x44145406: case 0x54000003:
return PT1000_PVHC_DEC4_STRING; return HEATER_HANDLER_STRING;
case 0x44145407: case 0x54000004:
return S_ADC_DEC4_STRING; return RTD_IC3_STRING;
case 0x44202000: case 0x54000005:
return GPS1_HANDLER_STRING; return RTD_IC4_STRING;
case 0x49001F00: case 0x54000006:
return DUMMY_GPS_COM_IF_STRING; return RTD_IC5_STRING;
case 0x49005200: case 0x54000007:
return RS232_DEVICE_COM_IF_STRING; return RTD_IC6_STRING;
case 0x49005300: case 0x54000008:
return I2C_DEVICE_COM_IF_STRING; return RTD_IC7_STRING;
case 0x49005400: case 0x54000009:
return GPIO_DEVICE_COM_IF_STRING; return RTD_IC8_STRING;
case 0x49005410: case 0x5400000A:
return SPI_POLLING_TASK_STRING; return RTD_IC9_STRING;
case 0x49005600: case 0x5400000B:
return SPI_DEVICE_COM_IF_STRING; return RTD_IC10_STRING;
case 0x4900AFFE: case 0x5400000C:
return DUMMY_ECHO_COM_IF_STRING; return RTD_IC11_STRING;
case 0x4D0073AD: case 0x5400000D:
return SD_CARD_HANDLER_STRING; return RTD_IC12_STRING;
case 0x50000100: case 0x5400000E:
return CCSDS_PACKET_DISTRIBUTOR_STRING; return RTD_IC13_STRING;
case 0x50000200: case 0x5400000F:
return PUS_PACKET_DISTRIBUTOR_STRING; return RTD_IC14_STRING;
case 0x50000300: case 0x54000010:
return UDP_TMTC_BRIDGE_STRING; return SPI_TEST_STRING;
case 0x50000400: case 0x5400001F:
return EMAC_POLLING_TASK_STRING; return RTD_IC15_STRING;
case 0x50000600: case 0x5400002F:
return SERIAL_POLLING_TASK_STRING; return RTD_IC16_STRING;
case 0x5000500: case 0x5400003F:
return UART_TMTC_BRIDGE_STRING; return RTD_IC17_STRING;
case 0x51000100: case 0x5400004F:
return PUS_SERVICE_1_STRING; return RTD_IC18_STRING;
case 0x51000200: case 0x54000050:
return PUS_SERVICE_2_STRING; return RAD_SENSOR_STRING;
case 0x51000300: case 0x5400AFFE:
return PUS_SERVICE_3_STRING; return DUMMY_HANDLER_STRING;
case 0x51000400: case 0x5400CAFE:
return PUS_SERVICE_5_STRING; return DUMMY_INTERFACE_STRING;
case 0x51000500: case 0x54123456:
return PUS_SERVICE_6_STRING; return LIBGPIOD_TEST_STRING;
case 0x51000800: case 0x54694269:
return PUS_SERVICE_8_STRING; return TEST_TASK_STRING;
case 0x51000900: case 0xFFFFFFFF:
return PUS_SERVICE_9_STRING; return NO_OBJECT_STRING;
case 0x51001700: default:
return PUS_SERVICE_17_STRING; return "UNKNOWN_OBJECT";
case 0x51002300:
return PUS_SERVICE_23_STRING;
case 0x51020000:
return PUS_SERVICE_200_STRING;
case 0x51020100:
return PUS_SERVICE_201_STRING;
case 0x52000001:
return PUS_TIME_STRING;
case 0x52000002:
return PUS_FUNNEL_STRING;
case 0x53010000:
return HEALTH_TABLE_STRING;
case 0x53010100:
return MODE_STORE_STRING;
case 0x53030000:
return EVENT_MANAGER_STRING;
case 0x53040000:
return INTERNAL_ERROR_REPORTER_STRING;
case 0x534f0100:
return TC_STORE_STRING;
case 0x534f0200:
return TM_STORE_STRING;
case 0x534f0300:
return IPC_STORE_STRING;
case 0x66666666:
return AT91_SPI_TEST_TASK_STRING;
case 0x77777777:
return STM32_TEST_TASK_STRING;
case 0x87654321:
return AT91_UART0_TEST_TASK_STRING;
case 0xFFFFFFFF:
return NO_OBJECT_STRING;
default:
return "UNKNOWN_OBJECT";
} }
return 0; return 0;
} }

@ -1 +1 @@
Subproject commit bf38f952f18f18db858ce5a7a719da7742cfc611 Subproject commit af383e7f14454c5e745073a8790c296508c94b35

View File

@ -14,7 +14,7 @@ from modgen.objects.objects import sql_object_exporter, ObjectDefinitionParser,
export_object_file export_object_file
from modgen.utility.csv_writer import CsvWriter from modgen.utility.csv_writer import CsvWriter
from modgen.utility.printer import PrettyPrinter from modgen.utility.printer import PrettyPrinter
from modgen.utility.file_management import copy_file from modgen.utility.file_management import copy_file, move_file
from modgen.utility.sql_writer import SQL_DATABASE_NAME from modgen.utility.sql_writer import SQL_DATABASE_NAME
from definitions import BspType from definitions import BspType
@ -34,7 +34,11 @@ BSP_DIR_NAME = BSP_SELECT.value
EXPORT_TO_SQL = True EXPORT_TO_SQL = True
CPP_COPY_DESTINATION = f"../../{BSP_DIR_NAME}/fsfwconfig/objects/" if BSP_SELECT == BspType.BSP_Q7S or BSP_SELECT == BspType.BSP_LINUX_BOARD:
CPP_COPY_DESTINATION = f"../../fsfwconfig/objects/"
else:
CPP_COPY_DESTINATION = f"../../{BSP_DIR_NAME}/fsfwconfig/objects/"
CSV_MOVE_DESTINATION = "../" CSV_MOVE_DESTINATION = "../"
CPP_FILENAME = "translateObjects.cpp" CPP_FILENAME = "translateObjects.cpp"
CSV_OBJECT_FILENAME = "mib_objects.csv" CSV_OBJECT_FILENAME = "mib_objects.csv"
@ -90,7 +94,6 @@ def parse_objects():
def handle_file_export(list_items): def handle_file_export(list_items):
csv_writer = CsvWriter(CSV_OBJECT_FILENAME)
if GENERATE_CPP: if GENERATE_CPP:
print("ObjectParser: Generating translation C++ file.") print("ObjectParser: Generating translation C++ file.")
write_translation_file(filename=CPP_FILENAME, list_of_entries=list_items, date_string_full=DATE_STRING_FULL) write_translation_file(filename=CPP_FILENAME, list_of_entries=list_items, date_string_full=DATE_STRING_FULL)
@ -101,7 +104,7 @@ def handle_file_export(list_items):
print("ObjectParser: Generating text export.") print("ObjectParser: Generating text export.")
export_object_file(filename=CSV_OBJECT_FILENAME, object_list=list_items, file_separator=FILE_SEPARATOR) export_object_file(filename=CSV_OBJECT_FILENAME, object_list=list_items, file_separator=FILE_SEPARATOR)
if MOVE_CSV: if MOVE_CSV:
csv_writer.move_csv(CSV_MOVE_DESTINATION) move_file(file_name=CSV_OBJECT_FILENAME, destination=CSV_MOVE_DESTINATION)
if __name__ == "__main__": if __name__ == "__main__":

View File

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

Binary file not shown.