Merge remote-tracking branch 'origin/master' into mueller/fmt-log
This commit is contained in:
@ -1,7 +1,3 @@
|
||||
target_sources(${TARGET_NAME} PRIVATE
|
||||
commonPollingSequenceFactory.cpp
|
||||
)
|
||||
target_sources(${TARGET_NAME} PRIVATE commonPollingSequenceFactory.cpp)
|
||||
|
||||
target_include_directories(${TARGET_NAME} PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
target_include_directories(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
21
config/common/definitions.h
Normal file
21
config/common/definitions.h
Normal file
@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
/**
|
||||
* Enumerations for used PUS service IDs.
|
||||
*/
|
||||
namespace pus {
|
||||
enum ServiceIds : uint8_t {
|
||||
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_11 = 11,
|
||||
PUS_SERVICE_17 = 17,
|
||||
PUS_SERVICE_20 = 20,
|
||||
PUS_SERVICE_200 = 200
|
||||
};
|
||||
}
|
@ -6,8 +6,8 @@
|
||||
namespace CLASS_ID {
|
||||
enum commonClassIds : uint8_t {
|
||||
COMMON_CLASS_ID_START = FW_CLASS_ID_COUNT,
|
||||
DUMMY_HANDLER, // DDH
|
||||
COMMON_CLASS_ID_END // [EXPORT] : [END]
|
||||
DUMMY_HANDLER, // DDH
|
||||
COMMON_CLASS_ID_END // [EXPORT] : [END]
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
//! Specify the debug output verbose level
|
||||
#define OBSW_VERBOSE_LEVEL 1
|
||||
|
||||
#define OBSW_TCPIP_UDP_WIRETAPPING 0
|
||||
#define OBSW_PRINT_MISSED_DEADLINES 0
|
||||
|
||||
//! Perform internal unit testd at application startup
|
||||
@ -44,24 +44,10 @@ static const uint16_t COMMON_APID = 0xEF;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include <fsfw/events/fwSubsystemIdRanges.h>
|
||||
#include <fsfw/returnvalues/FwClassIds.h>
|
||||
namespace cfg {
|
||||
|
||||
static constexpr uint32_t OBSW_MAX_SCHEDULED_TCS = @OBSW_MAX_SCHEDULED_TCS@;
|
||||
|
||||
/**
|
||||
* Enumerations for used PUS service IDs.
|
||||
*/
|
||||
namespace pus {
|
||||
enum ServiceIds: uint8_t {
|
||||
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_20 = 20,
|
||||
PUS_SERVICE_200 = 200
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
@ -6,12 +6,15 @@
|
||||
#include "objects/systemObjectList.h"
|
||||
#include "pollingsequence/pollingSequenceFactory.h"
|
||||
|
||||
ReturnValue_t pst::pollingSequenceExamples(FixedTimeslotTaskIF* thisSequence) {
|
||||
ReturnValue_t pst::pollingSequenceExamples(FixedTimeslotTaskIF *thisSequence) {
|
||||
uint32_t length = thisSequence->getPeriodMs();
|
||||
|
||||
thisSequence->addSlot(objects::TEST_DUMMY_1, length * 0, FsfwExampleTask::OpCodes::SEND_RAND_NUM);
|
||||
thisSequence->addSlot(objects::TEST_DUMMY_2, length * 0, FsfwExampleTask::OpCodes::SEND_RAND_NUM);
|
||||
thisSequence->addSlot(objects::TEST_DUMMY_3, length * 0, FsfwExampleTask::OpCodes::SEND_RAND_NUM);
|
||||
thisSequence->addSlot(objects::TEST_DUMMY_1, length * 0,
|
||||
FsfwExampleTask::OpCodes::SEND_RAND_NUM);
|
||||
thisSequence->addSlot(objects::TEST_DUMMY_2, length * 0,
|
||||
FsfwExampleTask::OpCodes::SEND_RAND_NUM);
|
||||
thisSequence->addSlot(objects::TEST_DUMMY_3, length * 0,
|
||||
FsfwExampleTask::OpCodes::SEND_RAND_NUM);
|
||||
|
||||
thisSequence->addSlot(objects::TEST_DUMMY_1, length * 0.2,
|
||||
FsfwExampleTask::OpCodes::RECEIVE_RAND_NUM);
|
||||
@ -20,9 +23,12 @@ ReturnValue_t pst::pollingSequenceExamples(FixedTimeslotTaskIF* thisSequence) {
|
||||
thisSequence->addSlot(objects::TEST_DUMMY_3, length * 0.2,
|
||||
FsfwExampleTask::OpCodes::RECEIVE_RAND_NUM);
|
||||
|
||||
thisSequence->addSlot(objects::TEST_DUMMY_1, length * 0.5, FsfwExampleTask::OpCodes::DELAY_SHORT);
|
||||
thisSequence->addSlot(objects::TEST_DUMMY_2, length * 0.5, FsfwExampleTask::OpCodes::DELAY_SHORT);
|
||||
thisSequence->addSlot(objects::TEST_DUMMY_3, length * 0.5, FsfwExampleTask::OpCodes::DELAY_SHORT);
|
||||
thisSequence->addSlot(objects::TEST_DUMMY_1, length * 0.5,
|
||||
FsfwExampleTask::OpCodes::DELAY_SHORT);
|
||||
thisSequence->addSlot(objects::TEST_DUMMY_2, length * 0.5,
|
||||
FsfwExampleTask::OpCodes::DELAY_SHORT);
|
||||
thisSequence->addSlot(objects::TEST_DUMMY_3, length * 0.5,
|
||||
FsfwExampleTask::OpCodes::DELAY_SHORT);
|
||||
|
||||
if (thisSequence->checkSequence() == HasReturnvaluesIF::RETURN_OK) {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
@ -32,23 +38,33 @@ ReturnValue_t pst::pollingSequenceExamples(FixedTimeslotTaskIF* thisSequence) {
|
||||
}
|
||||
}
|
||||
|
||||
ReturnValue_t pst::pollingSequenceDevices(FixedTimeslotTaskIF* thisSequence) {
|
||||
ReturnValue_t pst::pollingSequenceDevices(FixedTimeslotTaskIF *thisSequence) {
|
||||
uint32_t length = thisSequence->getPeriodMs();
|
||||
|
||||
thisSequence->addSlot(objects::TEST_DEVICE_HANDLER_0, 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::TEST_DEVICE_HANDLER_1, 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::TEST_DEVICE_HANDLER_0, 0,
|
||||
DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::TEST_DEVICE_HANDLER_1, 0,
|
||||
DeviceHandlerIF::PERFORM_OPERATION);
|
||||
|
||||
thisSequence->addSlot(objects::TEST_DEVICE_HANDLER_0, 0.3 * length, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::TEST_DEVICE_HANDLER_1, 0.3 * length, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::TEST_DEVICE_HANDLER_0, 0.3 * length,
|
||||
DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::TEST_DEVICE_HANDLER_1, 0.3 * length,
|
||||
DeviceHandlerIF::SEND_WRITE);
|
||||
|
||||
thisSequence->addSlot(objects::TEST_DEVICE_HANDLER_0, 0.45 * length, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::TEST_DEVICE_HANDLER_1, 0.45 * length, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::TEST_DEVICE_HANDLER_0, 0.45 * length,
|
||||
DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::TEST_DEVICE_HANDLER_1, 0.45 * length,
|
||||
DeviceHandlerIF::GET_WRITE);
|
||||
|
||||
thisSequence->addSlot(objects::TEST_DEVICE_HANDLER_0, 0.6 * length, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::TEST_DEVICE_HANDLER_1, 0.6 * length, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::TEST_DEVICE_HANDLER_0, 0.6 * length,
|
||||
DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::TEST_DEVICE_HANDLER_1, 0.6 * length,
|
||||
DeviceHandlerIF::SEND_READ);
|
||||
|
||||
thisSequence->addSlot(objects::TEST_DEVICE_HANDLER_0, 0.8 * length, DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::TEST_DEVICE_HANDLER_1, 0.8 * length, DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::TEST_DEVICE_HANDLER_0, 0.8 * length,
|
||||
DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::TEST_DEVICE_HANDLER_1, 0.8 * length,
|
||||
DeviceHandlerIF::GET_READ);
|
||||
|
||||
if (thisSequence->checkSequence() == HasReturnvaluesIF::RETURN_OK) {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
|
Reference in New Issue
Block a user