2023-03-26 16:16:54 +02:00
|
|
|
#include <mission/power/CspCookie.h>
|
2020-12-14 08:42:48 +01:00
|
|
|
|
2022-09-01 17:31:43 +02:00
|
|
|
using namespace GOMSPACE;
|
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),
|
2022-09-01 17:31:43 +02:00
|
|
|
reqType(SpecialRequestTypes::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
|
|
|
|
2022-08-26 13:42:58 +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; }
|