mission and config folders added , make file is added

This commit is contained in:
2021-06-21 13:42:47 +02:00
parent caea75b0a8
commit 6a65c7af33
34 changed files with 1463 additions and 0 deletions

View File

@ -0,0 +1,8 @@
target_sources(${TARGET_NAME} PRIVATE
ipc/missionMessageTypes.cpp
)
# Add include paths for the executable
target_include_directories(${TARGET_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)

View File

@ -0,0 +1,57 @@
#ifndef CONFIG_FSFWCONFIG_H_
#define CONFIG_FSFWCONFIG_H_
#include <cstddef>
#include <cstdint>
//! Used to determine whether C++ ostreams are used
//! Those can lead to code bloat.
#define FSFW_CPP_OSTREAM_ENABLED 1
//! Reduced printout to further decrease code size
//! Be careful, this also turns off most diagnostic prinouts!
#define FSFW_ENHANCED_PRINTOUT 0
//! Can be used to enable additional debugging printouts for developing the FSFW
#define FSFW_PRINT_VERBOSITY_LEVEL 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 FSFW_OBJ_EVENT_TRANSLATION is set to one,
//! additional output which requires the translation files translateObjects
//! and translateEvents (and their compiled source files)
#define FSFW_OBJ_EVENT_TRANSLATION 0
#if FSFW_OBJ_EVENT_TRANSLATION == 1
#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_NO_C99_IO 1
//! Specify whether a special mode store is used for Subsystem components.
#define FSFW_USE_MODESTORE 0
namespace fsfwconfig {
//! Default timestamp size. The default timestamp will be an eight byte CDC
//! short timestamp.
static constexpr uint8_t FSFW_MISSION_TIMESTAMP_SIZE = 8;
//! Configure the allocated pool sizes for the event manager.
static constexpr size_t FSFW_EVENTMGMR_MATCHTREE_NODES = 240;
static constexpr size_t FSFW_EVENTMGMT_EVENTIDMATCHERS = 120;
static constexpr size_t FSFW_EVENTMGMR_RANGEMATCHERS = 120;
}
#endif /* CONFIG_FSFWCONFIG_H_ */

View File

@ -0,0 +1,15 @@
/**
* @brief This file can be used to add preprocessor define for conditional
* code inclusion exclusion or various other project constants and
* properties in one place.
*/
#ifndef FSFWCONFIG_OBSWCONFIG_H_
#define FSFWCONFIG_OBSWCONFIG_H_
#define ADD_TEST_FOLDER 0
#define OBSW_ADD_TEST_CODE 0
// Define not used yet, PUS stack and TMTC tasks are always started
#define ADD_PUS_STACK 1
#endif /* FSFWCONFIG_OBSWCONFIG_H_ */

View File

@ -0,0 +1,46 @@
/*
* dataPoolInit.cpp
*
* brief: Initialisation function for all variables in the data pool.
* This file was auto-generated by getDataPoolFromFLPmib.py via
* the flpmib database at 2018-06-04T12:02:46+00:00.
*/
#include "../../../bsp_linux/fsfwconfig/datapool/dataPoolInit.h"
void dataPoolInit(std::map<uint32_t, PoolEntryIF*>* pool_map) {
uint32_t testVar[1] = { 0 };
pool_map->insert(
std::pair<uint32_t, PoolEntryIF*>(datapool::DUMMY1,
new PoolEntry<uint32_t>(testVar, 1)));
pool_map->insert(
std::pair<uint32_t, PoolEntryIF*>(datapool::DUMMY2,
new PoolEntry<uint32_t>(testVar, 1)));
pool_map->insert(
std::pair<uint32_t, PoolEntryIF*>(datapool::DUMMY3,
new PoolEntry<uint32_t>(testVar, 1)));
pool_map->insert(
std::pair<uint32_t, PoolEntryIF*>(datapool::DUMMY4,
new PoolEntry<uint32_t>(testVar, 1)));
pool_map->insert(
std::pair<uint32_t, PoolEntryIF*>(datapool::DUMMY5,
new PoolEntry<uint32_t>(testVar, 1)));
pool_map->insert(
std::pair<uint32_t, PoolEntryIF*>(datapool::DUMMY6,
new PoolEntry<uint32_t>(testVar, 1)));
int32_t testVarSigned[1] = { 0 };
pool_map->insert(
std::pair<int32_t, PoolEntryIF*>(datapool::LIMIT_VAR,
new PoolEntry<int32_t>(testVarSigned, 1)));
/*float t_Centroid_PoolId[2] = {0,0};
pool_map->insert(
std::pair<uint32_t, PoolEntryIF*>(datapool::Centroid_PoolId,
new PoolEntry<float>(t_Centroid_PoolId, 2)));
uint32_t t_CentroidTime_PoolId[2] = {0,0};
pool_map->insert(
std::pair<uint32_t, PoolEntryIF*>(datapool::CentroidTime_PoolId,
new PoolEntry<uint32_t>(t_CentroidTime_PoolId, 2)));
*/
//TODO: define your pool map entries here
}

View File

@ -0,0 +1,32 @@
/*
* dataPoolInit.h
*
* brief: Initialisation function for all variables in the data pool.
* This file was auto-generated by getDataPoolFromFLPmib.py via
* the flpmib database at 2018-06-04T12:02:46+00:00.
*/
#ifndef DATAPOOLINIT_H_
#define DATAPOOLINIT_H_
#include <fsfw/datapool/DataPool.h>
namespace datapool {
enum opus_variable_id {
NO_PARAMETER = 0x0, //This PID is used to denote a non-existing param in the OBSW (NOPARAME), Size: 1
DUMMY1 = 0x100000,
DUMMY2 = 0x100001,
DUMMY3 = 0x100002,
DUMMY4 = 0x100003,
DUMMY5 = 0x100004,
DUMMY6 = 0x100005,//TEST VAR
LIMIT_VAR = 0x100006,
TIME_STAMPER = 0x100007,
//Centroid_PoolId = 0x100008,
//CentroidTime_PoolId = 0x100009
//TODO: add your unique datapool Ids here
};
}
void dataPoolInit( std::map<uint32_t, PoolEntryIF*>* pool_map );
#endif /* DATAPOOLINIT_H_ */

View File

@ -0,0 +1,20 @@
/*
* subsystemIdRanges.h
*
* Created on: Jul 27, 2018
* Author: gaisser
*/
#ifndef FSFWCONFIG_TMTC_SUBSYSTEMIDRANGES_H_
#define FSFWCONFIG_TMTC_SUBSYSTEMIDRANGES_H_
namespace SUBSYSTEM_ID {
enum {
DUMMY = 10,
//VISIBLE=11
//TODO: add your subsystem id for your device here
};
}
#endif /* FSFWCONFIG_TMTC_SUBSYSTEMIDRANGES_H_ */

View File

@ -0,0 +1,10 @@
CXXSRC += $(wildcard $(CURRENTPATH)/datapool/*.cpp)
CXXSRC += $(wildcard $(CURRENTPATH)/events/*.cpp)
CXXSRC += $(wildcard $(CURRENTPATH)/ipc/*.cpp)
CXXSRC += $(wildcard $(CURRENTPATH)/objects/*.cpp)
CXXSRC += $(wildcard $(CURRENTPATH)/pollingsequence/*.cpp)
INCLUDES += $(CURRENTPATH)
INCLUDES += $(CURRENTPATH)/events
INCLUDES += $(CURRENTPATH)/returnvalues
INCLUDES += $(CURRENTPATH)/tmtc

View File

@ -0,0 +1,16 @@
/*
* MissionMessageTypes.cpp
*
* Created on: 17.06.2016
* Author: baetz
*/
#include <fsfw/ipc/CommandMessageCleaner.h>
void messagetypes::clearMissionMessage(CommandMessage* message) {
switch((message->getCommand()>>8) & 0xff){
default:
message->setCommand(CommandMessage::CMD_NONE);
break;
}
}

View File

@ -0,0 +1,28 @@
/*
* MissionMessageTypes.h
*
* Created on: 16.06.2016
* Author: baetz
*/
#ifndef FSFWCONFIG_IPC_MISSIONMESSAGETYPES_H_
#define FSFWCONFIG_IPC_MISSIONMESSAGETYPES_H_
#include <fsfw/ipc/FwMessageTypes.h>
class CommandMessage;
namespace messagetypes {
//First type must have number MESSAGE_TYPE::FW_MESSAGES_COUNT!
//Remember to add new message types to the clearMissionMessage() function below!
enum MISSION_MESSAGE_TYPE {
COSTUM_MESSAGE = FW_MESSAGES_COUNT,
};
void clearMissionMessage(CommandMessage* message);
}
#endif /* FSFWCONFIG_IPC_MISSIONMESSAGETYPES_H_ */

View File

@ -0,0 +1,59 @@
#ifndef FSFWCONFIG_OBJECTS_SYSTEMOBJECTLIST_H_
#define FSFWCONFIG_OBJECTS_SYSTEMOBJECTLIST_H_
#include <fsfw/objectmanager/frameworkObjects.h>
namespace objects {
enum mission_objects {
UDP_BRIDGE = 0x50000300,
UDP_POLLING_TASK = 0x50000400,
TM_FUNNEL = 0x50000500,
/****************Assembly********************/
SOFTWARE = 0x1,
DUMMY_ASS = 0xCAFECAFE,
/****************Controller******************/
DUMMY_CONTROLLER = 0xCAFEAFFE,
/****************Device Handler**************/
DUMMY1 = 0x01,
DUMMY2 = 0x02,
DUMMY3 = 0x03,
DUMMY4 = 0x04,
DUMMY5 = 0x05,
DUMMY6 = 0x06,
DUMMY7 = 0x07,
DUMMY8 = 0x08,
/****************MISC*********************/
TIME_STAMPER = 0x09,
/**************TC Handling****************/
CCSDS_DISTRIBUTOR = 0x10,
PUS_DISTRIBUTOR = 0x11,
/****** 0x49 ('I') for Communication Interfaces *****/
//TEST_ECHO_COM_IF = 0x4900AFFE,
/**************** Test *********************/
//TEST_DEVICE_HANDLER = 0x4400AFFE,
//TEST_TASK = 0x4400CAFE,
//TEST_DEVICE_SERIALIZE=0x4401CAFE,
/**************** PCO *********************/
//PCO_HANDLER= 0x12,
//PCO_COMMIF=0x13,
//CENTROID_INJECTOR=0x14,
//CENTROID_WRITER = 0x15
//TODO: add the object ids for your device and your communication interface
};
}
#endif /* FSFWCONFIG_OBJECTS_SYSTEMOBJECTLIST_H_ */

View File

@ -0,0 +1,21 @@
/*
* PollingSequenceCentroid.h
*
* Created on: May 1, 2021
* Author: mala
*/
#ifndef BSP_LINUX_FSFWCONFIG_POLLINGSEQUENCE_POLLINGSEQUENCEARDUINO_H_
#define BSP_LINUX_FSFWCONFIG_POLLINGSEQUENCE_POLLINGSEQUENCEARDUINO_H_
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
#include "../../fsfwconfig/OBSWConfig.h"
class FixedTimeslotTaskIF;
ReturnValue_t pollingSequenceArduinoFunction(FixedTimeslotTaskIF *thisSequence);
#endif /* BSP_LINUX_FSFWCONFIG_POLLINGSEQUENCE_POLLINGSEQUENCEARDUINO_H_ */

View File

@ -0,0 +1,38 @@
/*
* PollingSequenceCentroidFunction.cpp
*
* Created on: May 1, 2021
* Author: mala
*/
#include <fsfw/objectmanager/ObjectManagerIF.h>
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
#include <fsfw/tasks/FixedTimeslotTaskIF.h>
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
#include "../../../bsp_linux/fsfwconfig/objects/systemObjectList.h"
#include "../../../bsp_linux/fsfwconfig/OBSWConfig.h"
#include "PollingSequenceArduino.h"
ReturnValue_t pollingSequenceArduinoFunction(
FixedTimeslotTaskIF* thisSequence){
uint32_t length = thisSequence->getPeriodMs();
//thisSequence->addSlot(objects::CENTROID_INJECTOR, length * 0, 2);
//thisSequence->addSlot(objects::CENTROID_WRITER, length * 0.1, 2);
thisSequence->addSlot(objects::ARDUINO_HANDLER, length * 0, 0);
thisSequence->addSlot(objects::ARDUINO_HANDLER, length * 0.2, 1);
thisSequence->addSlot(objects::ARDUINO_HANDLER, length * 0.4, 2);
thisSequence->addSlot(objects::ARDUINO_HANDLER, length * 0.6, 3);
//thisSequence->addSlot(objects::CENTROID_WRITER, length * 0.1, 2);
if (thisSequence->checkSequence() == HasReturnvaluesIF::RETURN_OK) {
return HasReturnvaluesIF::RETURN_OK;
}
else {
sif::error << "pollingSequenceCentroidFunction::initialize has errors!"
<< std::endl;
return HasReturnvaluesIF::RETURN_FAILED;
}
}

View File

@ -0,0 +1,22 @@
/*
* classIds.h
*
* Created on: 30.06.2016
* Author: baetz
*/
#ifndef FSFWCONFIG_RETURNVALUES_CLASSIDS_H_
#define FSFWCONFIG_RETURNVALUES_CLASSIDS_H_
#include <fsfw/returnvalues/FwClassIds.h>
namespace CLASS_ID {
enum {
DUMMY_HANDLER = FW_CLASS_ID_COUNT, //DDH
//VISIBLE_HANDLER_CLASS=FW_CLASS_ID_COUNT+1
//TODO: add your arduino handler class id
};
}
#endif /* FSFWCONFIG_RETURNVALUES_CLASSIDS_H_ */

View File

@ -0,0 +1,19 @@
/*
* apid.h
*
* Created on: Sep 22, 2020
* Author: steffen
*/
#ifndef FSFWCONFIG_TMTC_APID_H_
#define FSFWCONFIG_TMTC_APID_H_
#include <cstdint>
namespace apid{
static const uint16_t APID = 0xEF;
};
#endif /* FSFWCONFIG_TMTC_APID_H_ */

View File

@ -0,0 +1,20 @@
#ifndef FSFWCONFIG_TMTC_PUSIDS_H_
#define FSFWCONFIG_TMTC_PUSIDS_H_
namespace pus {
enum {
PUS_SERVICE_1 = 1,
PUS_SERVICE_2 = 2,
PUS_SERVICE_3 = 3,
PUS_SERVICE_5 = 5,
PUS_SERVICE_8 = 8,
PUS_SERVICE_9 = 9,
PUS_SERVICE_17 = 17,
PUS_SERVICE_200 = 200
};
}
#endif /* FSFWCONFIG_TMTC_PUSIDS_H_ */