eive-obsw/mission/csp/CspCookie.h
Robin Mueller 7dde1150e8
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
gom space commands
2022-08-31 22:52:32 +02:00

40 lines
1002 B
C++

#ifndef LINUX_CSP_CSPCOOKIE_H_
#define LINUX_CSP_CSPCOOKIE_H_
#include <fsfw/devicehandlers/CookieIF.h>
#include <cstddef>
#include <cstdint>
#include "mission/devices/devicedefinitions/GomspaceDefinitions.h"
/**
* @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_ */