apply clang format

This commit is contained in:
Robin Müller 2022-02-22 13:49:01 +01:00
parent d35ba2c894
commit 121b4ed974
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
4 changed files with 249 additions and 248 deletions

View File

@ -1,8 +1,4 @@
#include "InitMission.h"
#include "OBSWConfig.h"
#include "ObjectFactory.h"
#include "objects/systemObjectList.h"
#include "pollingsequence/pollingSequenceFactory.h"
#include <fsfw/objectmanager/ObjectManager.h>
#include <fsfw/objectmanager/ObjectManagerIF.h>
@ -15,6 +11,11 @@
#include <iostream>
#include "OBSWConfig.h"
#include "ObjectFactory.h"
#include "objects/systemObjectList.h"
#include "pollingsequence/pollingSequenceFactory.h"
ServiceInterfaceStream sif::debug("DEBUG");
ServiceInterfaceStream sif::info("INFO");
ServiceInterfaceStream sif::warning("WARNING");

View File

@ -1,17 +1,9 @@
#include "ObjectFactory.h"
#include "OBSWConfig.h"
#include "devConf.h"
#include "devices/addresses.h"
#include "devices/gpioIds.h"
#include "devConf.h"
#include "objects/systemObjectList.h"
#include "tmtc/apid.h"
#include "tmtc/pusIds.h"
#include "mission/devices/GPSHyperionHandler.h"
#include "mission/core/GenericFactory.h"
#include "mission/devices/GyroADIS1650XHandler.h"
#include "mission/utility/TmFunnel.h"
#include "fsfw/datapoollocal/LocalDataPoolManager.h"
#include "fsfw/tasks/TaskFactory.h"
#include "fsfw/tmtcpacket/pus/tm.h"
@ -20,6 +12,13 @@
#include "linux/boardtest/LibgpiodTest.h"
#include "linux/boardtest/SpiTestClass.h"
#include "linux/boardtest/UartTestClass.h"
#include "mission/core/GenericFactory.h"
#include "mission/devices/GPSHyperionHandler.h"
#include "mission/devices/GyroADIS1650XHandler.h"
#include "mission/utility/TmFunnel.h"
#include "objects/systemObjectList.h"
#include "tmtc/apid.h"
#include "tmtc/pusIds.h"
/* UDP server includes */
#if OBSW_USE_TMTC_TCP_BRIDGE == 1

View File

@ -1,11 +1,11 @@
#include "UartTestClass.h"
#include "OBSWConfig.h"
#include <fsfw/tasks/TaskFactory.h>
#include <errno.h> // Error integer and strerror() function
#include <fcntl.h> // Contains file controls like O_RDWR
#include <errno.h> // Error integer and strerror() function
#include <fcntl.h> // Contains file controls like O_RDWR
#include <fsfw/tasks/TaskFactory.h>
#include <unistd.h> // write(), read(), close()
#include "OBSWConfig.h"
#include "fsfw/globalfunctions/CRC.h"
#include "fsfw/globalfunctions/DleEncoder.h"
#include "fsfw/globalfunctions/arrayprinter.h"
@ -169,7 +169,7 @@ void UartTestClass::scexInit() {
void UartTestClass::scexPeriodic() {
sif::info << "UartTestClass::scexInit: Sending ping command to SCEX" << std::endl;
int result = prepareScexPing();
if(result != 0) {
if (result != 0) {
return;
};
size_t bytesWritten = write(serialPort, cmdBuf.data(), encodedLen);
@ -190,7 +190,8 @@ void UartTestClass::scexPeriodic() {
sif::debug << "UartTestClass::performPeriodicAction: recv buffer might not be large enough"
<< std::endl;
} else if (bytesRead > 0) {
sif::info << "Received " << bytesRead << " bytes from the Solar Cell Experiment:" << std::endl;
sif::info << "Received " << bytesRead
<< " bytes from the Solar Cell Experiment:" << std::endl;
arrayprinter::print(recBuf.data(), bytesRead, OutputType::HEX, false);
}
} while (bytesRead > 0);

View File

@ -118,232 +118,232 @@ const char *TM_FUNNEL_STRING = "TM_FUNNEL";
const char *CCSDS_IP_CORE_BRIDGE_STRING = "CCSDS_IP_CORE_BRIDGE";
const char *NO_OBJECT_STRING = "NO_OBJECT";
const char* translateObject(object_id_t object) {
switch( (object & 0xFFFFFFFF) ) {
case 0x00005060:
return P60DOCK_TEST_TASK_STRING;
case 0x43000003:
return CORE_CONTROLLER_STRING;
case 0x43100002:
return ACS_CONTROLLER_STRING;
case 0x43400001:
return THERMAL_CONTROLLER_STRING;
case 0x44120006:
return MGM_0_LIS3_HANDLER_STRING;
case 0x44120010:
return GYRO_0_ADIS_HANDLER_STRING;
case 0x44120032:
return SUS_0_STRING;
case 0x44120033:
return SUS_1_STRING;
case 0x44120034:
return SUS_2_STRING;
case 0x44120035:
return SUS_3_STRING;
case 0x44120036:
return SUS_4_STRING;
case 0x44120037:
return SUS_5_STRING;
case 0x44120038:
return SUS_6_STRING;
case 0x44120039:
return SUS_7_STRING;
case 0x44120040:
return SUS_8_STRING;
case 0x44120041:
return SUS_9_STRING;
case 0x44120042:
return SUS_10_STRING;
case 0x44120043:
return SUS_11_STRING;
case 0x44120047:
return RW1_STRING;
case 0x44120107:
return MGM_1_RM3100_HANDLER_STRING;
case 0x44120111:
return GYRO_1_L3G_HANDLER_STRING;
case 0x44120148:
return RW2_STRING;
case 0x44120208:
return MGM_2_LIS3_HANDLER_STRING;
case 0x44120212:
return GYRO_2_ADIS_HANDLER_STRING;
case 0x44120249:
return RW3_STRING;
case 0x44120309:
return MGM_3_RM3100_HANDLER_STRING;
case 0x44120313:
return GYRO_3_L3G_HANDLER_STRING;
case 0x44120350:
return RW4_STRING;
case 0x44130001:
return STAR_TRACKER_STRING;
case 0x44130045:
return GPS_CONTROLLER_STRING;
case 0x44140014:
return IMTQ_HANDLER_STRING;
case 0x442000A1:
return PCDU_HANDLER_STRING;
case 0x44250000:
return P60DOCK_HANDLER_STRING;
case 0x44250001:
return PDU1_HANDLER_STRING;
case 0x44250002:
return PDU2_HANDLER_STRING;
case 0x44250003:
return ACU_HANDLER_STRING;
case 0x44260000:
return BPX_BATT_HANDLER_STRING;
case 0x44300000:
return PLPCDU_HANDLER_STRING;
case 0x443200A5:
return RAD_SENSOR_STRING;
case 0x44330000:
return PLOC_UPDATER_STRING;
case 0x44330001:
return PLOC_MEMORY_DUMPER_STRING;
case 0x44330002:
return STR_HELPER_STRING;
case 0x44330015:
return PLOC_MPSOC_HANDLER_STRING;
case 0x44330016:
return PLOC_SUPERVISOR_HANDLER_STRING;
case 0x444100A2:
return SOLAR_ARRAY_DEPL_HANDLER_STRING;
case 0x444100A4:
return HEATER_HANDLER_STRING;
case 0x44420004:
return TMP1075_HANDLER_1_STRING;
case 0x44420005:
return TMP1075_HANDLER_2_STRING;
case 0x44420016:
return RTD_IC_3_STRING;
case 0x44420017:
return RTD_IC_4_STRING;
case 0x44420018:
return RTD_IC_5_STRING;
case 0x44420019:
return RTD_IC_6_STRING;
case 0x44420020:
return RTD_IC_7_STRING;
case 0x44420021:
return RTD_IC_8_STRING;
case 0x44420022:
return RTD_IC_9_STRING;
case 0x44420023:
return RTD_IC_10_STRING;
case 0x44420024:
return RTD_IC_11_STRING;
case 0x44420025:
return RTD_IC_12_STRING;
case 0x44420026:
return RTD_IC_13_STRING;
case 0x44420027:
return RTD_IC_14_STRING;
case 0x44420028:
return RTD_IC_15_STRING;
case 0x44420029:
return RTD_IC_16_STRING;
case 0x44420030:
return RTD_IC_17_STRING;
case 0x44420031:
return RTD_IC_18_STRING;
case 0x445300A3:
return SYRLINKS_HK_HANDLER_STRING;
case 0x49000000:
return ARDUINO_COM_IF_STRING;
case 0x49010005:
return GPIO_IF_STRING;
case 0x49020004:
return SPI_COM_IF_STRING;
case 0x49030003:
return UART_COM_IF_STRING;
case 0x49040002:
return I2C_COM_IF_STRING;
case 0x49050001:
return CSP_COM_IF_STRING;
case 0x50000100:
return CCSDS_PACKET_DISTRIBUTOR_STRING;
case 0x50000200:
return PUS_PACKET_DISTRIBUTOR_STRING;
case 0x50000300:
return TMTC_BRIDGE_STRING;
case 0x50000400:
return TMTC_POLLING_TASK_STRING;
case 0x50000500:
return FILE_SYSTEM_HANDLER_STRING;
case 0x50000600:
return PTME_STRING;
case 0x50000700:
return PDEC_HANDLER_STRING;
case 0x50000800:
return CCSDS_HANDLER_STRING;
case 0x51000500:
return PUS_SERVICE_6_STRING;
case 0x53000000:
return FSFW_OBJECTS_START_STRING;
case 0x53000001:
return PUS_SERVICE_1_VERIFICATION_STRING;
case 0x53000002:
return PUS_SERVICE_2_DEVICE_ACCESS_STRING;
case 0x53000003:
return PUS_SERVICE_3_HOUSEKEEPING_STRING;
case 0x53000005:
return PUS_SERVICE_5_EVENT_REPORTING_STRING;
case 0x53000008:
return PUS_SERVICE_8_FUNCTION_MGMT_STRING;
case 0x53000009:
return PUS_SERVICE_9_TIME_MGMT_STRING;
case 0x53000017:
return PUS_SERVICE_17_TEST_STRING;
case 0x53000020:
return PUS_SERVICE_20_PARAMETERS_STRING;
case 0x53000200:
return PUS_SERVICE_200_MODE_MGMT_STRING;
case 0x53000201:
return PUS_SERVICE_201_HEALTH_STRING;
case 0x53001000:
return CFDP_PACKET_DISTRIBUTOR_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 0x53500010:
return TIME_STAMPER_STRING;
case 0x53ffffff:
return FSFW_OBJECTS_END_STRING;
case 0x54000010:
return SPI_TEST_STRING;
case 0x54000020:
return UART_TEST_STRING;
case 0x54000030:
return I2C_TEST_STRING;
case 0x5400AFFE:
return DUMMY_HANDLER_STRING;
case 0x5400CAFE:
return DUMMY_INTERFACE_STRING;
case 0x54123456:
return LIBGPIOD_TEST_STRING;
case 0x54694269:
return TEST_TASK_STRING;
case 0x73000100:
return TM_FUNNEL_STRING;
case 0x73500000:
return CCSDS_IP_CORE_BRIDGE_STRING;
case 0xFFFFFFFF:
return NO_OBJECT_STRING;
default:
return "UNKNOWN_OBJECT";
}
return 0;
const char *translateObject(object_id_t object) {
switch ((object & 0xFFFFFFFF)) {
case 0x00005060:
return P60DOCK_TEST_TASK_STRING;
case 0x43000003:
return CORE_CONTROLLER_STRING;
case 0x43100002:
return ACS_CONTROLLER_STRING;
case 0x43400001:
return THERMAL_CONTROLLER_STRING;
case 0x44120006:
return MGM_0_LIS3_HANDLER_STRING;
case 0x44120010:
return GYRO_0_ADIS_HANDLER_STRING;
case 0x44120032:
return SUS_0_STRING;
case 0x44120033:
return SUS_1_STRING;
case 0x44120034:
return SUS_2_STRING;
case 0x44120035:
return SUS_3_STRING;
case 0x44120036:
return SUS_4_STRING;
case 0x44120037:
return SUS_5_STRING;
case 0x44120038:
return SUS_6_STRING;
case 0x44120039:
return SUS_7_STRING;
case 0x44120040:
return SUS_8_STRING;
case 0x44120041:
return SUS_9_STRING;
case 0x44120042:
return SUS_10_STRING;
case 0x44120043:
return SUS_11_STRING;
case 0x44120047:
return RW1_STRING;
case 0x44120107:
return MGM_1_RM3100_HANDLER_STRING;
case 0x44120111:
return GYRO_1_L3G_HANDLER_STRING;
case 0x44120148:
return RW2_STRING;
case 0x44120208:
return MGM_2_LIS3_HANDLER_STRING;
case 0x44120212:
return GYRO_2_ADIS_HANDLER_STRING;
case 0x44120249:
return RW3_STRING;
case 0x44120309:
return MGM_3_RM3100_HANDLER_STRING;
case 0x44120313:
return GYRO_3_L3G_HANDLER_STRING;
case 0x44120350:
return RW4_STRING;
case 0x44130001:
return STAR_TRACKER_STRING;
case 0x44130045:
return GPS_CONTROLLER_STRING;
case 0x44140014:
return IMTQ_HANDLER_STRING;
case 0x442000A1:
return PCDU_HANDLER_STRING;
case 0x44250000:
return P60DOCK_HANDLER_STRING;
case 0x44250001:
return PDU1_HANDLER_STRING;
case 0x44250002:
return PDU2_HANDLER_STRING;
case 0x44250003:
return ACU_HANDLER_STRING;
case 0x44260000:
return BPX_BATT_HANDLER_STRING;
case 0x44300000:
return PLPCDU_HANDLER_STRING;
case 0x443200A5:
return RAD_SENSOR_STRING;
case 0x44330000:
return PLOC_UPDATER_STRING;
case 0x44330001:
return PLOC_MEMORY_DUMPER_STRING;
case 0x44330002:
return STR_HELPER_STRING;
case 0x44330015:
return PLOC_MPSOC_HANDLER_STRING;
case 0x44330016:
return PLOC_SUPERVISOR_HANDLER_STRING;
case 0x444100A2:
return SOLAR_ARRAY_DEPL_HANDLER_STRING;
case 0x444100A4:
return HEATER_HANDLER_STRING;
case 0x44420004:
return TMP1075_HANDLER_1_STRING;
case 0x44420005:
return TMP1075_HANDLER_2_STRING;
case 0x44420016:
return RTD_IC_3_STRING;
case 0x44420017:
return RTD_IC_4_STRING;
case 0x44420018:
return RTD_IC_5_STRING;
case 0x44420019:
return RTD_IC_6_STRING;
case 0x44420020:
return RTD_IC_7_STRING;
case 0x44420021:
return RTD_IC_8_STRING;
case 0x44420022:
return RTD_IC_9_STRING;
case 0x44420023:
return RTD_IC_10_STRING;
case 0x44420024:
return RTD_IC_11_STRING;
case 0x44420025:
return RTD_IC_12_STRING;
case 0x44420026:
return RTD_IC_13_STRING;
case 0x44420027:
return RTD_IC_14_STRING;
case 0x44420028:
return RTD_IC_15_STRING;
case 0x44420029:
return RTD_IC_16_STRING;
case 0x44420030:
return RTD_IC_17_STRING;
case 0x44420031:
return RTD_IC_18_STRING;
case 0x445300A3:
return SYRLINKS_HK_HANDLER_STRING;
case 0x49000000:
return ARDUINO_COM_IF_STRING;
case 0x49010005:
return GPIO_IF_STRING;
case 0x49020004:
return SPI_COM_IF_STRING;
case 0x49030003:
return UART_COM_IF_STRING;
case 0x49040002:
return I2C_COM_IF_STRING;
case 0x49050001:
return CSP_COM_IF_STRING;
case 0x50000100:
return CCSDS_PACKET_DISTRIBUTOR_STRING;
case 0x50000200:
return PUS_PACKET_DISTRIBUTOR_STRING;
case 0x50000300:
return TMTC_BRIDGE_STRING;
case 0x50000400:
return TMTC_POLLING_TASK_STRING;
case 0x50000500:
return FILE_SYSTEM_HANDLER_STRING;
case 0x50000600:
return PTME_STRING;
case 0x50000700:
return PDEC_HANDLER_STRING;
case 0x50000800:
return CCSDS_HANDLER_STRING;
case 0x51000500:
return PUS_SERVICE_6_STRING;
case 0x53000000:
return FSFW_OBJECTS_START_STRING;
case 0x53000001:
return PUS_SERVICE_1_VERIFICATION_STRING;
case 0x53000002:
return PUS_SERVICE_2_DEVICE_ACCESS_STRING;
case 0x53000003:
return PUS_SERVICE_3_HOUSEKEEPING_STRING;
case 0x53000005:
return PUS_SERVICE_5_EVENT_REPORTING_STRING;
case 0x53000008:
return PUS_SERVICE_8_FUNCTION_MGMT_STRING;
case 0x53000009:
return PUS_SERVICE_9_TIME_MGMT_STRING;
case 0x53000017:
return PUS_SERVICE_17_TEST_STRING;
case 0x53000020:
return PUS_SERVICE_20_PARAMETERS_STRING;
case 0x53000200:
return PUS_SERVICE_200_MODE_MGMT_STRING;
case 0x53000201:
return PUS_SERVICE_201_HEALTH_STRING;
case 0x53001000:
return CFDP_PACKET_DISTRIBUTOR_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 0x53500010:
return TIME_STAMPER_STRING;
case 0x53ffffff:
return FSFW_OBJECTS_END_STRING;
case 0x54000010:
return SPI_TEST_STRING;
case 0x54000020:
return UART_TEST_STRING;
case 0x54000030:
return I2C_TEST_STRING;
case 0x5400AFFE:
return DUMMY_HANDLER_STRING;
case 0x5400CAFE:
return DUMMY_INTERFACE_STRING;
case 0x54123456:
return LIBGPIOD_TEST_STRING;
case 0x54694269:
return TEST_TASK_STRING;
case 0x73000100:
return TM_FUNNEL_STRING;
case 0x73500000:
return CCSDS_IP_CORE_BRIDGE_STRING;
case 0xFFFFFFFF:
return NO_OBJECT_STRING;
default:
return "UNKNOWN_OBJECT";
}
return 0;
}