changed all table parsing to use gom space API
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

This commit is contained in:
2022-08-26 13:42:58 +02:00
parent efb0bce718
commit a7482b657a
16 changed files with 131 additions and 187 deletions

View File

@ -0,0 +1 @@
target_sources(${LIB_EIVE_MISSION} PRIVATE CspCookie.cpp)

38
mission/csp/CspCookie.cpp Normal file
View File

@ -0,0 +1,38 @@
#include "CspCookie.h"
CspCookie::CspCookie(uint16_t maxReplyLength_, uint8_t cspAddress_, uint32_t timeoutMs)
: maxReplyLength(maxReplyLength_), cspAddress(cspAddress_), timeoutMs(timeoutMs),
reqType(GOMSPACE::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/csp/CspCookie.h Normal file
View File

@ -0,0 +1,38 @@
#ifndef LINUX_CSP_CSPCOOKIE_H_
#define LINUX_CSP_CSPCOOKIE_H_
#include <fsfw/devicehandlers/CookieIF.h>
#include "mission/devices/devicedefinitions/GomspaceDefinitions.h"
#include <cstdint>
#include <cstddef>
/**
* @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;
uint16_t maxReplyLength;
uint8_t cspAddress;
size_t replyLen = 0;
uint32_t timeoutMs;
GOMSPACE::SpecialRequestTypes reqType;
};
#endif /* LINUX_CSP_CSPCOOKIE_H_ */