config folder renamed
This commit is contained in:
38
unittest/testcfg/FSFWConfig.h
Normal file
38
unittest/testcfg/FSFWConfig.h
Normal file
@ -0,0 +1,38 @@
|
||||
#ifndef CONFIG_FSFWCONFIG_H_
|
||||
#define CONFIG_FSFWCONFIG_H_
|
||||
|
||||
#include <fsfw/unittest/config/version.h>
|
||||
|
||||
//! Used to determine whether C++ ostreams are used
|
||||
//! Those can lead to code bloat.
|
||||
#define FSFW_CPP_OSTREAM_ENABLED 1
|
||||
|
||||
//! Reduced printout to further decrese code size
|
||||
//! Be careful, this also turns off most diagnostic prinouts!
|
||||
#define FSFW_REDUCED_PRINTOUT 0
|
||||
|
||||
//! Defines the FIFO depth of each commanding service base which
|
||||
//! also determines how many commands a CSB service can handle in one cycle
|
||||
//! simulataneously. This will increase the required RAM for
|
||||
//! each CSB service !
|
||||
#define FSFW_CSB_FIFO_DEPTH 6
|
||||
|
||||
//! If -DDEBUG is supplied in the build defines, there will be
|
||||
//! additional output which requires the translation files translateObjects
|
||||
//! and translateEvents (and their compiles source files)
|
||||
#ifdef DEBUG
|
||||
#define FSFW_DEBUG_OUTPUT 1
|
||||
//! Specify whether info events are printed too.
|
||||
#define FSFW_DEBUG_INFO 1
|
||||
#include <translateObjects.h>
|
||||
#include <translateEvents.h>
|
||||
#else
|
||||
#define FSFW_DEBUG_OUTPUT 0
|
||||
#endif
|
||||
|
||||
//! When using the newlib nano library, C99 support for stdio facilities
|
||||
//! will not be provided. This define should be set to 1 if this is the case.
|
||||
#define FSFW_NEWLIB_NANO_NO_C99_IO 1
|
||||
|
||||
|
||||
#endif /* CONFIG_FSFWCONFIG_H_ */
|
8
unittest/testcfg/TestsConfig.h
Normal file
8
unittest/testcfg/TestsConfig.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef FSFW_UNITTEST_CONFIG_TESTSCONFIG_H_
|
||||
#define FSFW_UNITTEST_CONFIG_TESTSCONFIG_H_
|
||||
|
||||
|
||||
#define CUSTOM_UNITTEST_RUNNER 0
|
||||
|
||||
|
||||
#endif /* FSFW_UNITTEST_CONFIG_TESTSCONFIG_H_ */
|
5
unittest/testcfg/cdatapool/dataPoolInit.cpp
Normal file
5
unittest/testcfg/cdatapool/dataPoolInit.cpp
Normal file
@ -0,0 +1,5 @@
|
||||
#include "dataPoolInit.h"
|
||||
|
||||
void datapool::dataPoolInit(std::map<uint32_t, PoolEntryIF*> * poolMap) {
|
||||
|
||||
}
|
17
unittest/testcfg/cdatapool/dataPoolInit.h
Normal file
17
unittest/testcfg/cdatapool/dataPoolInit.h
Normal file
@ -0,0 +1,17 @@
|
||||
#ifndef HOSTED_CONFIG_CDATAPOOL_DATAPOOLINIT_H_
|
||||
#define HOSTED_CONFIG_CDATAPOOL_DATAPOOLINIT_H_
|
||||
|
||||
#include <fsfw/datapoolglob/GlobalDataPool.h>
|
||||
#include <fsfw/datapool/PoolEntryIF.h>
|
||||
#include <map>
|
||||
#include <cstdint>
|
||||
|
||||
|
||||
namespace datapool {
|
||||
void dataPoolInit(std::map<uint32_t, PoolEntryIF*> * poolMap);
|
||||
|
||||
enum datapoolvariables {
|
||||
NO_PARAMETER = 0,
|
||||
};
|
||||
}
|
||||
#endif /* CONFIG_CDATAPOOL_DATAPOOLINIT_H_ */
|
11
unittest/testcfg/devices/logicalAddresses.cpp
Normal file
11
unittest/testcfg/devices/logicalAddresses.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
/**
|
||||
* \file logicalAddresses.cpp
|
||||
*
|
||||
* \date 06.11.2019
|
||||
*/
|
||||
|
||||
#include <fsfw/unittest/config/devices/logicalAddresses.h>
|
||||
|
||||
|
||||
|
||||
|
15
unittest/testcfg/devices/logicalAddresses.h
Normal file
15
unittest/testcfg/devices/logicalAddresses.h
Normal file
@ -0,0 +1,15 @@
|
||||
#ifndef CONFIG_DEVICES_LOGICALADDRESSES_H_
|
||||
#define CONFIG_DEVICES_LOGICALADDRESSES_H_
|
||||
|
||||
#include <fsfw/devicehandlers/CookieIF.h>
|
||||
#include <fsfw/unittest/config/objects/systemObjectList.h>
|
||||
#include <cstdint>
|
||||
|
||||
namespace addresses {
|
||||
/* Logical addresses have uint32_t datatype */
|
||||
enum logicalAddresses: address_t {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif /* CONFIG_DEVICES_LOGICALADDRESSES_H_ */
|
10
unittest/testcfg/devices/powerSwitcherList.cpp
Normal file
10
unittest/testcfg/devices/powerSwitcherList.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
/**
|
||||
* @file switcherList.cpp
|
||||
*
|
||||
* @date 28.11.2019
|
||||
*/
|
||||
|
||||
#include <fsfw/unittest/config/devices/powerSwitcherList.h>
|
||||
|
||||
|
||||
|
22
unittest/testcfg/devices/powerSwitcherList.h
Normal file
22
unittest/testcfg/devices/powerSwitcherList.h
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @file switcherList.h
|
||||
*
|
||||
* @date 28.11.2019
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DEVICES_POWERSWITCHERLIST_H_
|
||||
#define CONFIG_DEVICES_POWERSWITCHERLIST_H_
|
||||
|
||||
namespace switches {
|
||||
/* Switches are uint8_t datatype and go from 0 to 255 */
|
||||
enum switcherList {
|
||||
PCDU,
|
||||
GPS0,
|
||||
GPS1,
|
||||
DUMMY = 129
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif /* CONFIG_DEVICES_POWERSWITCHERLIST_H_ */
|
18
unittest/testcfg/events/subsystemIdRanges.h
Normal file
18
unittest/testcfg/events/subsystemIdRanges.h
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef CONFIG_EVENTS_SUBSYSTEMIDRANGES_H_
|
||||
#define CONFIG_EVENTS_SUBSYSTEMIDRANGES_H_
|
||||
|
||||
#include <cstdint>
|
||||
#include <fsfw/events/fwSubsystemIdRanges.h>
|
||||
|
||||
/**
|
||||
* @brief Custom subsystem IDs can be added here
|
||||
* @details
|
||||
* Subsystem IDs are used to create unique events.
|
||||
*/
|
||||
namespace SUBSYSTEM_ID {
|
||||
enum: uint8_t {
|
||||
SUBSYSTEM_ID_START = FW_SUBSYSTEM_ID_RANGE,
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* CONFIG_EVENTS_SUBSYSTEMIDRANGES_H_ */
|
11
unittest/testcfg/ipc/MissionMessageTypes.cpp
Normal file
11
unittest/testcfg/ipc/MissionMessageTypes.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
#include <fsfw/ipc/CommandMessage.h>
|
||||
#include <fsfw/unittest/config/ipc/MissionMessageTypes.h>
|
||||
|
||||
void messagetypes::clearMissionMessage(CommandMessage* message) {
|
||||
switch(message->getMessageType()) {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
22
unittest/testcfg/ipc/MissionMessageTypes.h
Normal file
22
unittest/testcfg/ipc/MissionMessageTypes.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef CONFIG_IPC_MISSIONMESSAGETYPES_H_
|
||||
#define CONFIG_IPC_MISSIONMESSAGETYPES_H_
|
||||
|
||||
#include <fsfw/ipc/FwMessageTypes.h>
|
||||
|
||||
class CommandMessage;
|
||||
|
||||
/**
|
||||
* Custom command messages are specified here.
|
||||
* Most messages needed to use FSFW are already located in
|
||||
* <fsfw/ipc/FwMessageTypes.h>
|
||||
* @param message Generic Command Message
|
||||
*/
|
||||
namespace messagetypes{
|
||||
enum MESSAGE_TYPE {
|
||||
MISSION_MESSAGE_TYPE_START = FW_MESSAGES_COUNT,
|
||||
};
|
||||
|
||||
void clearMissionMessage(CommandMessage* message);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_IPC_MISSIONMESSAGETYPES_H_ */
|
34
unittest/testcfg/objects/Factory.cpp
Normal file
34
unittest/testcfg/objects/Factory.cpp
Normal file
@ -0,0 +1,34 @@
|
||||
#include <fsfw/events/EventManager.h>
|
||||
#include <fsfw/health/HealthTable.h>
|
||||
|
||||
#include <fsfw/internalError/InternalErrorReporter.h>
|
||||
#include <fsfw/objectmanager/frameworkObjects.h>
|
||||
#include <fsfw/unittest/config/cdatapool/dataPoolInit.h>
|
||||
#include <fsfw/unittest/config/objects/Factory.h>
|
||||
|
||||
/**
|
||||
* @brief Produces system objects.
|
||||
* @details
|
||||
* Build tasks by using SystemObject Interface (Interface).
|
||||
* Header files of all tasks must be included
|
||||
* Please note that an object has to implement the system object interface
|
||||
* if the interface validity is checked or retrieved later by using the
|
||||
* get<TargetInterface>(object_id) function from the ObjectManagerIF.
|
||||
*
|
||||
* Framework objects are created first.
|
||||
*
|
||||
* @ingroup init
|
||||
*/
|
||||
void Factory::produce(void) {
|
||||
setStaticFrameworkObjectIds();
|
||||
new EventManager(objects::EVENT_MANAGER);
|
||||
new HealthTable(objects::HEALTH_TABLE);
|
||||
new InternalErrorReporter(objects::INTERNAL_ERROR_REPORTER);
|
||||
|
||||
}
|
||||
|
||||
void Factory::setStaticFrameworkObjectIds() {
|
||||
|
||||
}
|
||||
|
||||
|
16
unittest/testcfg/objects/Factory.h
Normal file
16
unittest/testcfg/objects/Factory.h
Normal file
@ -0,0 +1,16 @@
|
||||
#ifndef FACTORY_H_
|
||||
#define FACTORY_H_
|
||||
|
||||
#include <fsfw/objectmanager/SystemObjectIF.h>
|
||||
|
||||
namespace Factory {
|
||||
/**
|
||||
* @brief Creates all SystemObject elements which are persistent
|
||||
* during execution.
|
||||
*/
|
||||
void produce();
|
||||
void setStaticFrameworkObjectIds();
|
||||
|
||||
}
|
||||
|
||||
#endif /* FACTORY_H_ */
|
16
unittest/testcfg/objects/systemObjectList.h
Normal file
16
unittest/testcfg/objects/systemObjectList.h
Normal file
@ -0,0 +1,16 @@
|
||||
#ifndef HOSTED_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_
|
||||
#define HOSTED_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_
|
||||
|
||||
#include <cstdint>
|
||||
#include <fsfw/objectmanager/frameworkObjects.h>
|
||||
|
||||
// The objects will be instantiated in the ID order
|
||||
namespace objects {
|
||||
enum sourceObjects: uint32_t {
|
||||
/* All addresses between start and end are reserved for the FSFW */
|
||||
FSFW_CONFIG_RESERVED_START = PUS_SERVICE_1_VERIFICATION,
|
||||
FSFW_CONFIG_RESERVED_END = TM_STORE
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* BSP_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_ */
|
242
unittest/testcfg/objects/translateObjects.cpp
Normal file
242
unittest/testcfg/objects/translateObjects.cpp
Normal file
@ -0,0 +1,242 @@
|
||||
/* Auto-generated event translation file. Contains 77 translations. */
|
||||
#include <fsfw/unittest/config/objects/translateObjects.h>
|
||||
|
||||
const char *AT91_UART2_TEST_TASK_STRING = "AT91_UART2_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 *DUMMY_HANDLER_STRING = "DUMMY_HANDLER";
|
||||
const char *S_ADC1_DEC2_STRING = "S_ADC1_DEC2";
|
||||
const char *GPS0_HANDLER_STRING = "GPS0_HANDLER";
|
||||
const char *DLR_PVCH_STRING = "DLR_PVCH";
|
||||
const char *GYRO1_STRING = "GYRO1";
|
||||
const char *DLR_IRAS_STRING = "DLR_IRAS";
|
||||
const char *_DEC1_O1_STRING = "_DEC1_O1";
|
||||
const char *_DEC1_O2_STRING = "_DEC1_O2";
|
||||
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_5_STRING = "PUS_SERVICE_5";
|
||||
const char *PUS_SERVICE_6_STRING = "PUS_SERVICE_6";
|
||||
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_200_STRING = "PUS_SERVICE_200";
|
||||
const char *PUS_SERVICE_201_STRING = "PUS_SERVICE_201";
|
||||
const char *PUS_TIME_STRING = "PUS_TIME";
|
||||
const char *PUS_FUNNEL_STRING = "PUS_FUNNEL";
|
||||
const char *HEALTH_TABLE_STRING = "HEALTH_TABLE";
|
||||
const char *MODE_STORE_STRING = "MODE_STORE";
|
||||
const char *EVENT_MANAGER_STRING = "EVENT_MANAGER";
|
||||
const char *INTERNAL_ERROR_REPORTER_STRING = "INTERNAL_ERROR_REPORTER";
|
||||
const char *TC_STORE_STRING = "TC_STORE";
|
||||
const char *TM_STORE_STRING = "TM_STORE";
|
||||
const char *IPC_STORE_STRING = "IPC_STORE";
|
||||
const char *AT91_SPI_TEST_TASK_STRING = "AT91_SPI_TEST_TASK";
|
||||
const char *STM32_TEST_TASK_STRING = "STM32_TEST_TASK";
|
||||
const char *AT91_UART0_TEST_TASK_STRING = "AT91_UART0_TEST_TASK";
|
||||
const char *NO_OBJECT_STRING = "NO_OBJECT";
|
||||
|
||||
const char* translateObject(object_id_t object){
|
||||
switch((object&0xFFFFFFFF)){
|
||||
case 0x000123336:
|
||||
return AT91_UART2_TEST_TASK_STRING;
|
||||
case 0x01010100:
|
||||
return ARDUINO_0_STRING;
|
||||
case 0x01010101:
|
||||
return ARDUINO_1_STRING;
|
||||
case 0x01010102:
|
||||
return ARDUINO_2_STRING;
|
||||
case 0x01010103:
|
||||
return ARDUINO_3_STRING;
|
||||
case 0x01010104:
|
||||
return ARDUINO_4_STRING;
|
||||
case 0x12345678:
|
||||
return AT91_I2C_TEST_TASK_STRING;
|
||||
case 0x42694269:
|
||||
return TEST_TASK_STRING;
|
||||
case 0x44003200:
|
||||
return PCDU_HANDLER_STRING;
|
||||
case 0x4400AFFE:
|
||||
return DUMMY_HANDLER_STRING;
|
||||
case 0x44020108:
|
||||
return S_ADC1_DEC2_STRING;
|
||||
case 0x44101F00:
|
||||
return GPS0_HANDLER_STRING;
|
||||
case 0x44104000:
|
||||
return DLR_PVCH_STRING;
|
||||
case 0x44105000:
|
||||
return GYRO1_STRING;
|
||||
case 0x44106000:
|
||||
return DLR_IRAS_STRING;
|
||||
case 0x44115401:
|
||||
return _DEC1_O1_STRING;
|
||||
case 0x44115402:
|
||||
return _DEC1_O2_STRING;
|
||||
case 0x44115404:
|
||||
return S1_DEC1_O3_STRING;
|
||||
case 0x44115405:
|
||||
return S2_DEC1_O4_STRING;
|
||||
case 0x44115406:
|
||||
return S3_DEC1_O5_STRING;
|
||||
case 0x44115407:
|
||||
return PT1000_PVHC_DEC1_O6_STRING;
|
||||
case 0x44125401:
|
||||
return PT1000_CCSDS1_DEC2_STRING;
|
||||
case 0x44125403:
|
||||
return PT1000_MGT1_DEC2_STRING;
|
||||
case 0x44125404:
|
||||
return S4_DEC2_STRING;
|
||||
case 0x44125405:
|
||||
return S5_DEC2_STRING;
|
||||
case 0x44125406:
|
||||
return S6_DEC2_STRING;
|
||||
case 0x44125407:
|
||||
return PT1000_PVCH_DEC2_STRING;
|
||||
case 0x44130301:
|
||||
return _DEC3_STRING;
|
||||
case 0x44130302:
|
||||
return PT1000_CCSDS2_DEC3_STRING;
|
||||
case 0x44130305:
|
||||
return S7_DEC3_STRING;
|
||||
case 0x44130306:
|
||||
return S8_DEC3_STRING;
|
||||
case 0x44130307:
|
||||
return PT1000_PVCH_DEC3_STRING;
|
||||
case 0x44130308:
|
||||
return GYRO2_STRING;
|
||||
case 0x44145401:
|
||||
return PT1000_PLOC_DEC4_STRING;
|
||||
case 0x44145404:
|
||||
return S9_DEC4_STRING;
|
||||
case 0x44145405:
|
||||
return S10_DEC4_STRING;
|
||||
case 0x44145406:
|
||||
return PT1000_PVHC_DEC4_STRING;
|
||||
case 0x44145407:
|
||||
return S_ADC_DEC4_STRING;
|
||||
case 0x44202000:
|
||||
return GPS1_HANDLER_STRING;
|
||||
case 0x49001F00:
|
||||
return DUMMY_GPS_COM_IF_STRING;
|
||||
case 0x49005200:
|
||||
return RS232_DEVICE_COM_IF_STRING;
|
||||
case 0x49005300:
|
||||
return I2C_DEVICE_COM_IF_STRING;
|
||||
case 0x49005400:
|
||||
return GPIO_DEVICE_COM_IF_STRING;
|
||||
case 0x49005410:
|
||||
return SPI_POLLING_TASK_STRING;
|
||||
case 0x49005600:
|
||||
return SPI_DEVICE_COM_IF_STRING;
|
||||
case 0x4900AFFE:
|
||||
return DUMMY_ECHO_COM_IF_STRING;
|
||||
case 0x4D0073AD:
|
||||
return SD_CARD_HANDLER_STRING;
|
||||
case 0x50000100:
|
||||
return CCSDS_PACKET_DISTRIBUTOR_STRING;
|
||||
case 0x50000200:
|
||||
return PUS_PACKET_DISTRIBUTOR_STRING;
|
||||
case 0x50000300:
|
||||
return UDP_TMTC_BRIDGE_STRING;
|
||||
case 0x50000400:
|
||||
return EMAC_POLLING_TASK_STRING;
|
||||
case 0x50000600:
|
||||
return SERIAL_POLLING_TASK_STRING;
|
||||
case 0x5000500:
|
||||
return UART_TMTC_BRIDGE_STRING;
|
||||
case 0x51000100:
|
||||
return PUS_SERVICE_1_STRING;
|
||||
case 0x51000200:
|
||||
return PUS_SERVICE_2_STRING;
|
||||
case 0x51000300:
|
||||
return PUS_SERVICE_3_STRING;
|
||||
case 0x51000400:
|
||||
return PUS_SERVICE_5_STRING;
|
||||
case 0x51000500:
|
||||
return PUS_SERVICE_6_STRING;
|
||||
case 0x51000800:
|
||||
return PUS_SERVICE_8_STRING;
|
||||
case 0x51000900:
|
||||
return PUS_SERVICE_9_STRING;
|
||||
case 0x51001700:
|
||||
return PUS_SERVICE_17_STRING;
|
||||
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;
|
||||
}
|
16
unittest/testcfg/objects/translateObjects.h
Normal file
16
unittest/testcfg/objects/translateObjects.h
Normal file
@ -0,0 +1,16 @@
|
||||
/*
|
||||
* translateObjects.h
|
||||
*
|
||||
* Created on: 28 May 2019
|
||||
* Author: Robin
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_OBJECTS_TRANSLATEOBJECTS_H_
|
||||
#define CONFIG_OBJECTS_TRANSLATEOBJECTS_H_
|
||||
|
||||
#include <fsfw/objectmanager/ObjectManagerIF.h>
|
||||
|
||||
const char* translateObject(object_id_t object);
|
||||
|
||||
|
||||
#endif /* CONFIG_OBJECTS_TRANSLATEOBJECTS_H_ */
|
23
unittest/testcfg/pollingsequence/PollingSequenceFactory.cpp
Normal file
23
unittest/testcfg/pollingsequence/PollingSequenceFactory.cpp
Normal file
@ -0,0 +1,23 @@
|
||||
#include "PollingSequenceFactory.h"
|
||||
|
||||
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
||||
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
|
||||
#include <fsfw/tasks/FixedTimeslotTaskIF.h>
|
||||
|
||||
ReturnValue_t pst::pollingSequenceInitDefault(
|
||||
FixedTimeslotTaskIF *thisSequence) {
|
||||
/* Length of a communication cycle */
|
||||
uint32_t length = thisSequence->getPeriodMs();
|
||||
|
||||
/* Add polling sequence table here */
|
||||
|
||||
if (thisSequence->checkSequence() == HasReturnvaluesIF::RETURN_OK) {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
else {
|
||||
sif::error << "pst::pollingSequenceInitDefault: Sequence invalid!"
|
||||
<< std::endl;
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
}
|
||||
|
32
unittest/testcfg/pollingsequence/PollingSequenceFactory.h
Normal file
32
unittest/testcfg/pollingsequence/PollingSequenceFactory.h
Normal file
@ -0,0 +1,32 @@
|
||||
#ifndef POLLINGSEQUENCEFACTORY_H_
|
||||
#define POLLINGSEQUENCEFACTORY_H_
|
||||
|
||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
||||
|
||||
class FixedTimeslotTaskIF;
|
||||
|
||||
/**
|
||||
* All device handlers are scheduled by adding them into Polling Sequence Tables (PST)
|
||||
* to satisfy stricter timing requirements of device communication,
|
||||
* A device handler has four different communication steps:
|
||||
* 1. DeviceHandlerIF::SEND_WRITE -> Send write via interface
|
||||
* 2. DeviceHandlerIF::GET_WRITE -> Get confirmation for write
|
||||
* 3. DeviceHandlerIF::SEND_READ -> Send read request
|
||||
* 4. DeviceHandlerIF::GET_READ -> Read from interface
|
||||
* The PST specifies precisely when the respective ComIF functions are called
|
||||
* during the communication cycle time.
|
||||
* The task is created using the FixedTimeslotTaskIF,
|
||||
* which utilises the underlying Operating System Abstraction Layer (OSAL)
|
||||
*
|
||||
* @param thisSequence FixedTimeslotTaskIF * object is passed inside the Factory class when creating the PST
|
||||
* @return
|
||||
*/
|
||||
namespace pst {
|
||||
|
||||
/* Default PST */
|
||||
ReturnValue_t pollingSequenceInitDefault(FixedTimeslotTaskIF *thisSequence);
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif /* POLLINGSEQUENCEINIT_H_ */
|
16
unittest/testcfg/returnvalues/classIds.h
Normal file
16
unittest/testcfg/returnvalues/classIds.h
Normal file
@ -0,0 +1,16 @@
|
||||
#ifndef CONFIG_RETURNVALUES_CLASSIDS_H_
|
||||
#define CONFIG_RETURNVALUES_CLASSIDS_H_
|
||||
|
||||
#include <fsfw/returnvalues/FwClassIds.h>
|
||||
|
||||
/**
|
||||
* @brief CLASS_ID defintions which are required for custom returnvalues.
|
||||
*/
|
||||
namespace CLASS_ID {
|
||||
enum {
|
||||
MISSION_CLASS_ID_START = FW_CLASS_ID_COUNT,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif /* CONFIG_RETURNVALUES_CLASSIDS_H_ */
|
15
unittest/testcfg/testcfg.mk
Normal file
15
unittest/testcfg/testcfg.mk
Normal file
@ -0,0 +1,15 @@
|
||||
CXXSRC += $(wildcard $(CURRENTPATH)/cdatapool/*.cpp)
|
||||
CXXSRC += $(wildcard $(CURRENTPATH)/ipc/*.cpp)
|
||||
CXXSRC += $(wildcard $(CURRENTPATH)/objects/*.cpp)
|
||||
CXXSRC += $(wildcard $(CURRENTPATH)/pollingsequence/*.cpp)
|
||||
CXXSRC += $(wildcard $(CURRENTPATH)/events/*.cpp)
|
||||
|
||||
INCLUDES += $(CURRENTPATH)
|
||||
INCLUDES += $(CURRENTPATH)/objects
|
||||
INCLUDES += $(CURRENTPATH)/ipc
|
||||
INCLUDES += $(CURRENTPATH)/pollingsequence
|
||||
INCLUDES += $(CURRENTPATH)/returnvalues
|
||||
INCLUDES += $(CURRENTPATH)/tmtc
|
||||
INCLUDES += $(CURRENTPATH)/events
|
||||
INCLUDES += $(CURRENTPATH)/devices
|
||||
INCLUDES += $(CURRENTPATH)/cdatapool
|
18
unittest/testcfg/tmtc/apid.h
Normal file
18
unittest/testcfg/tmtc/apid.h
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef CONFIG_TMTC_APID_H_
|
||||
#define CONFIG_TMTC_APID_H_
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
/**
|
||||
* Application Process Definition: entity, uniquely identified by an
|
||||
* application process ID (APID), capable of generating telemetry source
|
||||
* packets and receiving telecommand packets.
|
||||
*
|
||||
* Chose APID(s) for mission and define it here.
|
||||
*/
|
||||
namespace apid {
|
||||
static const uint16_t DEFAULT_APID = 0x00;
|
||||
}
|
||||
|
||||
|
||||
#endif /* CONFIG_TMTC_APID_H_ */
|
25
unittest/testcfg/tmtc/pusIds.h
Normal file
25
unittest/testcfg/tmtc/pusIds.h
Normal file
@ -0,0 +1,25 @@
|
||||
#ifndef CONFIG_TMTC_PUSIDS_HPP_
|
||||
#define CONFIG_TMTC_PUSIDS_HPP_
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace pus {
|
||||
enum Ids: uint8_t {
|
||||
PUS_SERVICE_1 = 1,
|
||||
PUS_SERVICE_2 = 2,
|
||||
PUS_SERVICE_3 = 3,
|
||||
PUS_SERVICE_5 = 5,
|
||||
PUS_SERVICE_6 = 6,
|
||||
PUS_SERVICE_8 = 8,
|
||||
PUS_SERVICE_9 = 9,
|
||||
PUS_SERVICE_11 = 11,
|
||||
PUS_SERVICE_17 = 17,
|
||||
PUS_SERVICE_19 = 19,
|
||||
PUS_SERVICE_20 = 20,
|
||||
PUS_SERVICE_23 = 23,
|
||||
PUS_SERVICE_200 = 200,
|
||||
PUS_SERVICE_201 = 201,
|
||||
};
|
||||
};
|
||||
|
||||
#endif /* CONFIG_TMTC_PUSIDS_HPP_ */
|
7
unittest/testcfg/version.h
Normal file
7
unittest/testcfg/version.h
Normal file
@ -0,0 +1,7 @@
|
||||
#ifndef CONFIG_VERSION_H_
|
||||
#define CONFIG_VERSION_H_
|
||||
|
||||
#define SW_VERSION 1
|
||||
#define SW_SUBVERSION 6
|
||||
|
||||
#endif /* CONFIG_VERSION_H_ */
|
Reference in New Issue
Block a user