ploc components now compile for hosted (linux)
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
2022-11-10 17:32:11 +01:00
parent 5ed0ade358
commit ec7ce5ddb6
45 changed files with 116 additions and 46 deletions

View File

@ -6,7 +6,7 @@
#include <fsfw/ipc/MutexGuard.h>
#include <fsfw/tasks/SemaphoreFactory.h>
#include <fsfw/tasks/TaskFactory.h>
#include <fsfw_hal/linux/uart/UartCookie.h>
#include <fsfw_hal/linux/serial/SerialCookie.h>
#include <unistd.h> // write(), read(), close()
#include <cerrno> // Error integer and strerror() function

View File

@ -1,6 +1,7 @@
#ifndef MPSOC_RETURN_VALUES_IF_H_
#define MPSOC_RETURN_VALUES_IF_H_
#include "eive/resultClassIds.h"
#include "fsfw/returnvalues/returnvalue.h"
class MPSoCReturnValuesIF {

View File

@ -8,8 +8,10 @@
#include <fsfw/timemanager/Clock.h>
#include <fsfw/tmtcpacket/ccsds/SpacePacketCreator.h>
#include <fsfw/tmtcpacket/ccsds/SpacePacketReader.h>
#include <linux/devices/devicedefinitions/PlocSupervisorDefinitions.h>
#include <optional>
#include "eive/resultClassIds.h"
#include "mission/devices/devicedefinitions/SpBase.h"
namespace supv {

View File

@ -31,7 +31,7 @@ ReturnValue_t PlocMPSoCHandler::initialize() {
if (result != returnvalue::OK) {
return result;
}
uartComIf = dynamic_cast<UartComIF*>(communicationInterface);
uartComIf = dynamic_cast<SerialComIF*>(communicationInterface);
if (uartComIf == nullptr) {
sif::warning << "PlocMPSoCHandler::initialize: Invalid uart com if" << std::endl;
return ObjectManagerIF::CHILD_INIT_FAILED;

View File

@ -1,6 +1,8 @@
#ifndef BSP_Q7S_DEVICES_PLOC_PLOCMPSOCHANDLER_H_
#define BSP_Q7S_DEVICES_PLOC_PLOCMPSOCHANDLER_H_
#include <fsfw_hal/linux/serial/SerialComIF.h>
#include <string>
#include "PlocMPSoCHelper.h"
@ -10,7 +12,6 @@
#include "fsfw/ipc/QueueFactory.h"
#include "fsfw/tmtcservices/SourceSequenceCounter.h"
#include "fsfw_hal/linux/gpio/Gpio.h"
#include "fsfw_hal/linux/uart/UartComIF.h"
#include "linux/devices/devicedefinitions/MPSoCReturnValuesIF.h"
#include "linux/devices/devicedefinitions/PlocMPSoCDefinitions.h"
#include "linux/devices/devicedefinitions/PlocSupervisorDefinitions.h"
@ -123,7 +124,7 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
*/
DeviceCommandId_t nextReplyId = mpsoc::NONE;
UartComIF* uartComIf = nullptr;
SerialComIF* uartComIf = nullptr;
PlocMPSoCHelper* plocMPSoCHelper = nullptr;
Gpio uartIsolatorSwitch;

View File

@ -57,7 +57,7 @@ ReturnValue_t PlocMPSoCHelper::performOperation(uint8_t operationCode) {
}
ReturnValue_t PlocMPSoCHelper::setComIF(DeviceCommunicationIF* communicationInterface_) {
uartComIF = dynamic_cast<UartComIF*>(communicationInterface_);
uartComIF = dynamic_cast<SerialComIF*>(communicationInterface_);
if (uartComIF == nullptr) {
sif::warning << "PlocMPSoCHelper::initialize: Invalid uart com if" << std::endl;
return returnvalue::FAILED;

View File

@ -1,6 +1,8 @@
#ifndef BSP_Q7S_DEVICES_PLOCMPSOCHELPER_H_
#define BSP_Q7S_DEVICES_PLOCMPSOCHELPER_H_
#include <fsfw_hal/linux/serial/SerialComIF.h>
#include <string>
#include "fsfw/devicehandlers/CookieIF.h"
@ -9,7 +11,6 @@
#include "fsfw/returnvalues/returnvalue.h"
#include "fsfw/tasks/ExecutableObjectIF.h"
#include "fsfw/tmtcservices/SourceSequenceCounter.h"
#include "fsfw_hal/linux/uart/UartComIF.h"
#include "linux/devices/devicedefinitions/PlocMPSoCDefinitions.h"
#ifdef XIPHOS_Q7S
#include "bsp_q7s/fs/SdCardManager.h"
@ -136,7 +137,7 @@ class PlocMPSoCHelper : public SystemObject, public ExecutableObjectIF {
* Communication interface of MPSoC responsible for low level access. Must be set by the
* MPSoC Handler.
*/
UartComIF* uartComIF = nullptr;
SerialComIF* uartComIF = nullptr;
// Communication cookie. Must be set by the MPSoC Handler
CookieIF* comCookie = nullptr;
// Sequence count, must be set by Ploc MPSoC Handler

View File

@ -5,7 +5,12 @@
#include <linux/devices/devicedefinitions/PlocSupervisorDefinitions.h>
#include "OBSWConfig.h"
#ifdef XIPHOS_Q7S
#include "bsp_q7s/fs/SdCardManager.h"
#endif
#include "eive/eventSubsystemIds.h"
#include "fsfw/action/ActionHelper.h"
#include "fsfw/action/CommandActionHelper.h"
#include "fsfw/action/CommandsActionsIF.h"
@ -13,7 +18,7 @@
#include "fsfw/objectmanager/SystemObject.h"
#include "fsfw/returnvalues/returnvalue.h"
#include "fsfw/tasks/ExecutableObjectIF.h"
#include "linux/fsfwconfig/objects/systemObjectList.h"
#include "objects/systemObjectList.h"
/**
* @brief Because the buffer of the linux tty driver is limited to 2 x 65535 bytes, this class is

View File

@ -49,7 +49,7 @@ ReturnValue_t PlocSupervisorHandler::initialize() {
if (result != returnvalue::OK) {
return result;
}
#ifndef TE0720_1CFA
#ifdef XIPHOS_Q7S
sdcMan = SdCardManager::instance();
#endif /* TE0720_1CFA */
if (supvHelper == nullptr) {
@ -1761,7 +1761,7 @@ ReturnValue_t PlocSupervisorHandler::createMramDumpFile() {
std::string filename = "mram-dump--" + timeStamp + ".bin";
#ifndef TE0720_1CFA
#ifdef XIPHOS_Q7S
std::string currentMountPrefix = sdcMan->getCurrentMountPrefix();
#else
std::string currentMountPrefix("/mnt/sd0");

View File

@ -1,18 +1,21 @@
#ifndef MISSION_DEVICES_PLOCSUPERVISORHANDLER_H_
#define MISSION_DEVICES_PLOCSUPERVISORHANDLER_H_
#include <fsfw_hal/linux/serial/SerialComIF.h>
#include <linux/devices/ploc/PlocSupvUartMan.h>
#include "OBSWConfig.h"
#include "bsp_q7s/fs/SdCardManager.h"
#include "devices/powerSwitcherList.h"
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
#include "fsfw/timemanager/Countdown.h"
#include "fsfw_hal/linux/gpio/Gpio.h"
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
#include "fsfw_hal/linux/uart/UartComIF.h"
#include "linux/devices/devicedefinitions/PlocSupervisorDefinitions.h"
#ifdef XIPHOS_Q7S
#include "bsp_q7s/fs/SdCardManager.h"
#endif
using supv::ExecutionReport;
/**
@ -114,7 +117,7 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
*/
DeviceCommandId_t nextReplyId = supv::NONE;
UartComIF* uartComIf = nullptr;
SerialComIF* uartComIf = nullptr;
LinuxLibgpioIF* gpioComIF = nullptr;
Gpio uartIsolatorSwitch;
@ -141,9 +144,9 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
/** This buffer is used to concatenate space packets received in two different read steps */
uint8_t spacePacketBuffer[supv::MAX_PACKET_SIZE];
#ifndef TE0720_1CFA
#ifdef XIPHOS_Q7S
SdCardManager* sdcMan = nullptr;
#endif /* BOARD_TE0720 == 0 */
#endif
// Path to supervisor specific files on SD card
std::string supervisorFilePath = "ploc/supervisor";

View File

@ -16,9 +16,10 @@
#include "bsp_q7s/fs/SdCardManager.h"
#endif
#include <fsfw_hal/linux/serial/helper.h>
#include "fsfw/tasks/TaskFactory.h"
#include "fsfw/timemanager/Countdown.h"
#include "fsfw_hal/linux/uart/helper.h"
#include "mission/utility/Filenaming.h"
#include "mission/utility/ProgressPrinter.h"
#include "mission/utility/Timestamp.h"

View File

@ -2,6 +2,7 @@
#define BSP_Q7S_DEVICES_PLOCSUPVHELPER_H_
#include <fsfw/container/SimpleRingBuffer.h>
#include <fsfw_hal/linux/serial/SerialComIF.h>
#include <termios.h>
#include <string>
@ -13,7 +14,6 @@
#include "fsfw/osal/linux/BinarySemaphore.h"
#include "fsfw/returnvalues/returnvalue.h"
#include "fsfw/tasks/ExecutableObjectIF.h"
#include "fsfw_hal/linux/uart/UartComIF.h"
#include "linux/devices/devicedefinitions/PlocSupervisorDefinitions.h"
#ifdef XIPHOS_Q7S

View File

@ -1,6 +1,7 @@
#ifndef BSP_Q7S_DEVICES_ARCSECDATALINKLAYER_H_
#define BSP_Q7S_DEVICES_ARCSECDATALINKLAYER_H_
#include "eive/resultClassIds.h"
#include "fsfw/returnvalues/returnvalue.h"
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"

View File

@ -5,6 +5,7 @@
#include <fstream>
#include <nlohmann/json.hpp>
#include "eive/resultClassIds.h"
#include "fsfw/returnvalues/returnvalue.h"
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"

View File

@ -1591,7 +1591,7 @@ void StarTrackerHandler::preparePowerRequest() {
void StarTrackerHandler::prepareSwitchToBootloaderCmd() {
uint32_t length = 0;
struct RebootActionRequest rebootReq;
struct RebootActionRequest rebootReq {};
arc_pack_reboot_action_req(&rebootReq, commandBuffer, &length);
dataLinkLayer.encodeFrame(commandBuffer, length);
rawPacket = dataLinkLayer.getEncodedFrame();

View File

@ -85,7 +85,7 @@ ReturnValue_t StrHelper::performOperation(uint8_t operationCode) {
}
ReturnValue_t StrHelper::setComIF(DeviceCommunicationIF* communicationInterface_) {
uartComIF = dynamic_cast<UartComIF*>(communicationInterface_);
uartComIF = dynamic_cast<SerialComIF*>(communicationInterface_);
if (uartComIF == nullptr) {
sif::warning << "StrHelper::initialize: Invalid uart com if" << std::endl;
return returnvalue::FAILED;

View File

@ -10,12 +10,13 @@
#include "bsp_q7s/fs/SdCardManager.h"
#endif
#include <fsfw_hal/linux/serial/SerialComIF.h>
#include "fsfw/devicehandlers/CookieIF.h"
#include "fsfw/objectmanager/SystemObject.h"
#include "fsfw/osal/linux/BinarySemaphore.h"
#include "fsfw/returnvalues/returnvalue.h"
#include "fsfw/tasks/ExecutableObjectIF.h"
#include "fsfw_hal/linux/uart/UartComIF.h"
extern "C" {
#include "thirdparty/arcsec_star_tracker/client/generated/actionreq.h"
@ -255,7 +256,7 @@ class StrHelper : public SystemObject, public ExecutableObjectIF {
* UART communication object responsible for low level access of star tracker
* Must be set by star tracker handler
*/
UartComIF* uartComIF = nullptr;
SerialComIF* uartComIF = nullptr;
// Communication cookie. Must be set by the star tracker handler
CookieIF* comCookie = nullptr;