eive-obsw/mission/csp/CspCookie.cpp

29 lines
866 B
C++
Raw Normal View History

2020-12-14 08:42:48 +01:00
#include "CspCookie.h"
2022-08-26 03:20:44 +02:00
CspCookie::CspCookie(uint16_t maxReplyLength_, uint8_t cspAddress_, uint32_t timeoutMs)
2022-08-26 14:28:06 +02:00
: maxReplyLength(maxReplyLength_),
cspAddress(cspAddress_),
timeoutMs(timeoutMs),
reqType(GOMSPACE::DEFAULT_COM_IF) {}
2020-12-14 08:42:48 +01:00
2022-01-17 15:58:27 +01:00
CspCookie::~CspCookie() {}
2020-12-14 08:42:48 +01:00
2022-01-17 15:58:27 +01:00
uint16_t CspCookie::getMaxReplyLength() { return maxReplyLength; }
2020-12-14 08:42:48 +01:00
2022-08-26 14:28:06 +02:00
uint8_t CspCookie::getCspAddress() { return cspAddress; }
2022-08-26 03:20:44 +02:00
2022-08-26 14:28:06 +02:00
GOMSPACE::SpecialRequestTypes CspCookie::getRequest() const { return reqType; }
2022-08-26 03:20:44 +02:00
void CspCookie::setRequest(GOMSPACE::SpecialRequestTypes request, size_t replyLen_) {
2022-08-26 03:20:44 +02:00
reqType = request;
replyLen = replyLen_;
}
2022-08-26 14:28:06 +02:00
uint8_t CspCookie::getCspPort() const { return cspPort; }
2022-08-26 03:20:44 +02:00
2022-08-26 14:28:06 +02:00
uint32_t CspCookie::getTimeout() const { return timeoutMs; }
2022-08-26 03:20:44 +02:00
2022-08-26 14:28:06 +02:00
void CspCookie::setCspPort(uint8_t port) { cspPort = port; }
2022-08-26 03:20:44 +02:00
2022-08-26 14:28:06 +02:00
size_t CspCookie::getReplyLen() const { return replyLen; }