finished power clean up
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
target_sources(
|
||||
${LIB_EIVE_MISSION}
|
||||
PRIVATE Pdu1Handler.cpp
|
||||
PRIVATE CspCookie.cpp
|
||||
Pdu1Handler.cpp
|
||||
Pdu2Handler.cpp
|
||||
AcuHandler.cpp
|
||||
P60DockHandler.cpp
|
||||
|
29
mission/power/CspCookie.cpp
Normal file
29
mission/power/CspCookie.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
#include <mission/power/CspCookie.h>
|
||||
|
||||
using namespace GOMSPACE;
|
||||
CspCookie::CspCookie(uint16_t maxReplyLength_, uint8_t cspAddress_, uint32_t timeoutMs)
|
||||
: maxReplyLength(maxReplyLength_),
|
||||
cspAddress(cspAddress_),
|
||||
timeoutMs(timeoutMs),
|
||||
reqType(SpecialRequestTypes::DEFAULT_COM_IF) {}
|
||||
|
||||
CspCookie::~CspCookie() {}
|
||||
|
||||
uint16_t CspCookie::getMaxReplyLength() { return maxReplyLength; }
|
||||
|
||||
uint8_t CspCookie::getCspAddress() { return cspAddress; }
|
||||
|
||||
GOMSPACE::SpecialRequestTypes CspCookie::getRequest() const { return reqType; }
|
||||
|
||||
void CspCookie::setRequest(GOMSPACE::SpecialRequestTypes request, size_t replyLen_) {
|
||||
reqType = request;
|
||||
replyLen = replyLen_;
|
||||
}
|
||||
|
||||
uint8_t CspCookie::getCspPort() const { return cspPort; }
|
||||
|
||||
uint32_t CspCookie::getTimeout() const { return timeoutMs; }
|
||||
|
||||
void CspCookie::setCspPort(uint8_t port) { cspPort = port; }
|
||||
|
||||
size_t CspCookie::getReplyLen() const { return replyLen; }
|
38
mission/power/CspCookie.h
Normal file
38
mission/power/CspCookie.h
Normal file
@ -0,0 +1,38 @@
|
||||
#ifndef LINUX_CSP_CSPCOOKIE_H_
|
||||
#define LINUX_CSP_CSPCOOKIE_H_
|
||||
|
||||
#include <fsfw/devicehandlers/CookieIF.h>
|
||||
#include <mission/power/gsDefs.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
/**
|
||||
* @brief This is the cookie for devices supporting the CSP (CubeSat Space
|
||||
* Protocol).
|
||||
* @author J. Meier
|
||||
*/
|
||||
class CspCookie : public CookieIF {
|
||||
public:
|
||||
CspCookie(uint16_t maxReplyLength_, uint8_t cspAddress_, uint32_t timeoutMs);
|
||||
virtual ~CspCookie();
|
||||
|
||||
void setCspPort(uint8_t port);
|
||||
uint8_t getCspPort() const;
|
||||
uint16_t getMaxReplyLength();
|
||||
GOMSPACE::SpecialRequestTypes getRequest() const;
|
||||
void setRequest(GOMSPACE::SpecialRequestTypes request, size_t replyLen);
|
||||
size_t getReplyLen() const;
|
||||
uint8_t getCspAddress();
|
||||
uint32_t getTimeout() const;
|
||||
|
||||
private:
|
||||
uint8_t cspPort = 0;
|
||||
uint16_t maxReplyLength;
|
||||
uint8_t cspAddress;
|
||||
size_t replyLen = 0;
|
||||
uint32_t timeoutMs;
|
||||
GOMSPACE::SpecialRequestTypes reqType;
|
||||
};
|
||||
|
||||
#endif /* LINUX_CSP_CSPCOOKIE_H_ */
|
@ -1,8 +1,9 @@
|
||||
#include <fsfw/datapool/PoolReadGuard.h>
|
||||
#include <fsfw/globalfunctions/arrayprinter.h>
|
||||
#include <mission/power/defs.h>
|
||||
#include <mission/power/GomSpacePackets.h>
|
||||
#include <mission/power/GomspaceDeviceHandler.h>
|
||||
#include <mission/power/defs.h>
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "eive/objects.h"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef MISSION_POWER_GOMSPACEDEVICEHANDLER_H_
|
||||
#define MISSION_POWER_GOMSPACEDEVICEHANDLER_H_
|
||||
|
||||
#include <mission/csp/CspCookie.h>
|
||||
#include <mission/power/CspCookie.h>
|
||||
#include <mission/power/GomSpacePackets.h>
|
||||
#include <mission/power/gsDefs.h>
|
||||
|
||||
|
@ -8,8 +8,8 @@
|
||||
#include <fsfw/power/PowerSwitchIF.h>
|
||||
#include <fsfw/tasks/ExecutableObjectIF.h>
|
||||
#include <fsfw/timemanager/CCSDSTime.h>
|
||||
#include <mission/power/defs.h>
|
||||
#include <mission/power/GomspaceDeviceHandler.h>
|
||||
#include <mission/power/defs.h>
|
||||
#include <mission/power/gsDefs.h>
|
||||
|
||||
/**
|
||||
|
@ -19,13 +19,11 @@ static constexpr Event SWITCHING_Q7S_DENIED = event::makeEvent(SUBSYSTEM_ID, 2,
|
||||
|
||||
static constexpr Event FDIR_REACTION_IGNORED = event::makeEvent(SUBSYSTEM_ID, 3, severity::MEDIUM);
|
||||
|
||||
|
||||
enum class States { IDLE, SWITCHING_POWER, CHECKING_POWER, MODE_COMMANDING };
|
||||
enum class OpCodes { NONE, TO_OFF_DONE, TO_NOT_OFF_DONE, TIMEOUT_OCCURED };
|
||||
|
||||
} // namespace power
|
||||
|
||||
|
||||
namespace duallane {
|
||||
|
||||
enum Submodes : Submode_t { A_SIDE = 0, B_SIDE = 1, DUAL_MODE = 2 };
|
||||
|
Reference in New Issue
Block a user