config folder renamed

This commit is contained in:
Robin Müller 2020-10-29 11:47:03 +01:00
parent a9b4874904
commit a38c3e5005
33 changed files with 111 additions and 289 deletions

View File

@ -1,48 +0,0 @@
#include "dataPoolInit.h"
void datapool::dataPoolInit(std::map<uint32_t, PoolEntryIF*> * poolMap) {
uint8_t UINT8T_INIT[1] = {0};
uint16_t UINT16T_INIT[1] = {0};
uint32_t UINT32T_INIT[1] = {0};
float FLOAT_INIT[2] = {0.0, 0.0};
/* FSFW */
poolMap->emplace(datapool::INTERNAL_ERROR_STORE_FULL,
new PoolEntry<uint32_t>(UINT32T_INIT,1));
poolMap->emplace(datapool::INTERNAL_ERROR_MISSED_LIVE_TM,
new PoolEntry<uint32_t>(UINT32T_INIT,1));
poolMap->emplace(datapool::INTERNAL_ERROR_FULL_MSG_QUEUES,
new PoolEntry<uint32_t>(UINT32T_INIT,1));
/* TEST */
poolMap->emplace(datapool::TEST_UINT8,
new PoolEntry<uint8_t>(UINT8T_INIT,1));
poolMap->emplace(datapool::TEST_UINT16,
new PoolEntry<uint16_t>(UINT16T_INIT,1));
poolMap->emplace(datapool::TEST_UINT32,
new PoolEntry<uint32_t>(UINT32T_INIT,1));
poolMap->emplace(datapool::TEST_FLOAT_VECTOR,
new PoolEntry<float>(FLOAT_INIT,2));
// With new initializer list feature and boolean entries.
// /* FSFW */
// poolMap->emplace(datapool::INTERNAL_ERROR_STORE_FULL,
// new PoolEntry<uint32_t>({0},1));
// poolMap->emplace(datapool::INTERNAL_ERROR_MISSED_LIVE_TM,
// new PoolEntry<uint32_t>({0},1));
// poolMap->emplace(datapool::INTERNAL_ERROR_FULL_MSG_QUEUES,
// new PoolEntry<uint32_t>({0},1));
//
// /* TEST */
// poolMap->emplace(datapool::TEST_BOOLEAN,
// new PoolEntry<bool>({0},1));
// poolMap->emplace(datapool::TEST_UINT8,
// new PoolEntry<uint8_t>({0},1));
// poolMap->emplace(datapool::TEST_UINT16,
// new PoolEntry<uint16_t>({0},1));
// poolMap->emplace(datapool::TEST_UINT32,
// new PoolEntry<uint32_t>({0},1));
// poolMap->emplace(datapool::TEST_FLOAT_VECTOR,
// new PoolEntry<float>({0, 0},2));
}

View File

@ -1,29 +0,0 @@
#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,
/** [EXPORT] : [GROUP] FSFW */
INTERNAL_ERROR_STORE_FULL = 0xEE000001, //!< [EXPORT] : [NAME] Internal Error Store Entry [UNIT] (-) [SIZE] 1 [TYPE] uint32_t
INTERNAL_ERROR_MISSED_LIVE_TM = 0xEE000001, //!< [EXPORT] : [NAME] Internal Error Missed Live Tm [UNIT] (-) [SIZE] 1 [TYPE] uint32_t
INTERNAL_ERROR_FULL_MSG_QUEUES = 0xEE000001, //!< [EXPORT] : [NAME] Internal Error Full Msg Queue [UNIT] (-) [SIZE] 1 [TYPE] uint32_t
/** [EXPORT] : [GROUP] TEST */
TEST_BOOLEAN = 0x01010102, //!< [EXPORT] : [NAME] Test Boolean [UNIT] (-) [SIZE] 1 [TYPE] bool
TEST_UINT8 = 0x02020204, //!< [EXPORT] : [NAME] Test Byte [UNIT] (-) [SIZE] 1 [TYPE] uint8_t
TEST_UINT16 = 0x03030306, //!< [EXPORT] : [NAME] Test UINT16 [UNIT] (-) [SIZE] 1 [TYPE] uint16_t
TEST_UINT32 = 0x04040408, //!< [EXPORT] : [NAME] Test UINT32 [UNIT] (-) [SIZE] 1 [TYPE] uint32_t
TEST_FLOAT_VECTOR = 0x05050510, //!< [EXPORT] : [NAME] Test Float [UNIT] (-) [SIZE] 2 [TYPE] float
};
}
#endif /* CONFIG_CDATAPOOL_DATAPOOLINIT_H_ */

View File

@ -1,20 +0,0 @@
/**
* @brief Auto-generated event translation file. Contains 80 translations.
* Generated on: 2020-05-02 20:13:41
*/
#include <fsfw/unittest/config/events/translateEvents.h>
const char *TEST_EVENT_SERVICE_1_STRING = "TEST_EVENT_SERVICE_1";
const char *TEST2_STRING = "TEST2";
const char * translateEvents(Event event){
switch((event&0xFFFF)){
case 8000:
return TEST_EVENT_SERVICE_1_STRING;
case 9100:
return TEST2_STRING;
default:
return "UNKNOWN_EVENT";
}
return 0;
}

View File

@ -1,16 +0,0 @@
/*
* translateEvent.h
*
* Created on: 28 May 2019
* Author: Robin
*/
#ifndef CONFIG_EVENTS_TRANSLATEEVENTS_H_
#define CONFIG_EVENTS_TRANSLATEEVENTS_H_
#include <fsfw/events/Event.h>
const char * translateEvents(Event event);
#endif /* CONFIG_EVENTS_TRANSLATEEVENTS_H_ */

View File

@ -1,30 +0,0 @@
#ifndef HOSTED_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_
#define HOSTED_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_
#include <cstdint>
// The objects will be instantiated in the ID order
namespace objects {
enum sourceObjects: uint32_t {
/* First Byte 0x50-0x52 reserved for PUS Services **/
CCSDS_PACKET_DISTRIBUTOR = 0x50000100,
PUS_PACKET_DISTRIBUTOR = 0x50000200,
UDP_BRIDGE = 0x50000300,
UDP_POLLING_TASK = 0x50000400,
PUS_SERVICE_3 = 0x51000300,
PUS_SERVICE_6_MEM_MGMT = 0x51000500,
PUS_SERVICE_23 = 0x51002300,
PUS_SERVICE_201_HEALTH = 0x51020100,
PUS_TIME = 0x52000001,
PUS_FUNNEL = 0x52000002,
/* Test Task */
TEST_TASK = 0x42694269,
DUMMY_INTERFACE = 0xCAFECAFE,
DUMMY_HANDLER = 0x4400AFFE,
};
}
#endif /* BSP_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_ */

View File

@ -1,31 +0,0 @@
#include <PollingSequenceFactory.h>
#include <systemObjectList.h>
#include <fsfw/objectmanager/ObjectManagerIF.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();
thisSequence->addSlot(objects::DUMMY_HANDLER,
length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::DUMMY_HANDLER,
length * 0.25, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::DUMMY_HANDLER,
length * 0.5, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::DUMMY_HANDLER,
length * 0.75, DeviceHandlerIF::GET_READ);
if (thisSequence->checkSequence() == HasReturnvaluesIF::RETURN_OK) {
return HasReturnvaluesIF::RETURN_OK;
}
else {
sif::error << "PollingSequence::initialize has errors!" << std::endl;
return HasReturnvaluesIF::RETURN_FAILED;
}
}

View File

@ -1,28 +0,0 @@
/*
* classIds.h
*
* Created on: 16.07.2018
* Author: mohr
*/
#ifndef CONFIG_RETURNVALUES_CLASSIDS_H_
#define CONFIG_RETURNVALUES_CLASSIDS_H_
/**
* Source IDs starts at 73 for now
* Framework IDs for ReturnValues run from 0 to 56
* and are located inside <fsfw/returnvalues/FwClassIds.h>
*/
namespace CLASS_ID {
enum {
MISSION_CLASS_ID_START = FW_CLASS_ID_COUNT,
RS232_CHANNEL, //!< RS232
I2C_CHANNEL, //!< I2C
SPI_CHANNEL, //!< SPI
GPS_HANDLER, //!< GPS
PUS_SERVICE_3 //!< HKS
};
}
#endif /* CONFIG_RETURNVALUES_CLASSIDS_H_ */

View File

@ -1,29 +0,0 @@
/*
* PusIds.hpp
*
* Created on: 27.02.2019
* Author: jakob
*/
#ifndef CONFIG_TMTC_PUSIDS_HPP_
#define CONFIG_TMTC_PUSIDS_HPP_
namespace PUS{
enum Ids{
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_17 = 17,
PUS_SERVICE_23 = 23,
PUS_SERVICE_200 = 200,
PUS_SERVICE_201 = 201,
};
};
#endif /* CONFIG_TMTC_PUSIDS_HPP_ */

View File

@ -1,34 +0,0 @@
#ifndef CONFIG_TMTC_SUBSYSTEMIDRANGES_H_
#define CONFIG_TMTC_SUBSYSTEMIDRANGES_H_
#include <fsfw/events/fwSubsystemIdRanges.h>
#include <cstdint>
/**
* These IDs are part of the ID for an event thrown by a subsystem.
* Numbers 0-80 are reserved for FSFW Subsystem IDs (framework/events/)
*/
namespace SUBSYSTEM_ID {
enum: uint8_t {
SUBSYSTE_ID_START = FW_SUBSYSTEM_ID_RANGE,
/**
* 80-105: PUS Services
*/
PUS_SERVICE_2 = 82,
PUS_SERVICE_3 = 83,
PUS_SERVICE_5 = 85,
PUS_SERVICE_6 = 86,
PUS_SERVICE_8 = 88,
PUS_SERVICE_23 = 91,
DUMMY_DEVICE = 100,
/**
* 105-115: AOCS
*/
GPS_DEVICE = 105,
SPI_COM_IF = 128,
I2C_COM_IF = 138
};
}
#endif /* CONFIG_TMTC_SUBSYSTEMIDRANGES_H_ */

View File

@ -1,10 +0,0 @@
#ifndef CONFIG_TMTC_TMTCSIZE_H_
#define CONFIG_TMTC_TMTCSIZE_H_
#include <cstdint>
namespace tmtcsize {
static const uint32_t MAX_TM_PACKET = 50;
}
#endif /* CONFIG_TMTC_TMTCSIZE_H_ */

View File

@ -0,0 +1,5 @@
#include "dataPoolInit.h"
void datapool::dataPoolInit(std::map<uint32_t, PoolEntryIF*> * poolMap) {
}

View 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_ */

View 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_ */

View File

@ -2,7 +2,7 @@
#include <fsfw/unittest/config/ipc/MissionMessageTypes.h>
void messagetypes::clearMissionMessage(CommandMessage* message) {
switch((message->getCommand()>>8) & 0xff) {
switch(message->getMessageType()) {
default:
break;
}

View 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_ */

View 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;
}
}

View File

@ -1,13 +1,14 @@
#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:
* 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
@ -17,15 +18,15 @@ class FixedTimeslotTaskIF;
* 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
* @param thisSequence FixedTimeslotTaskIF * object is passed inside the Factory class when creating the PST
* @return
*/
namespace pst {
/* 0.4 second period init*/
/* Default PST */
ReturnValue_t pollingSequenceInitDefault(FixedTimeslotTaskIF *thisSequence);
}
#endif /* POLLINGSEQUENCEINIT_H_ */

View 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_ */

View File

@ -1,18 +1,17 @@
#ifndef CONFIG_TMTC_APID_H_
#define CONFIG_TMTC_APID_H_
#include <stdint.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
* packets and receiving telecommand packets.
*
* SOURCE APID: 0x73 / 115 / s
* APID is a 11 bit number
* Chose APID(s) for mission and define it here.
*/
namespace apid {
static const uint16_t SOURCE_OBSW = 0x73;
static const uint16_t DEFAULT_APID = 0x00;
}

View File

@ -1,16 +1,18 @@
#ifndef CONFIG_TMTC_PUSIDS_HPP_
#define CONFIG_TMTC_PUSIDS_HPP_
#include <cstdint>
namespace pus {
enum Ids{
enum Ids: uint8_t {
PUS_SERVICE_1 = 1,
PUS_SERVICE_2 = 2,
PUS_SERVICE_3 = 3,
PUS_SERVICE_3_PSB = 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,