eive-obsw/mission/csp/CspCookie.cpp

39 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)
: 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 03:20:44 +02:00
uint8_t CspCookie::getCspAddress() {
return cspAddress;
}
GOMSPACE::SpecialRequestTypes CspCookie::getRequest() const {
2022-08-26 03:20:44 +02:00
return reqType;
}
void CspCookie::setRequest(GOMSPACE::SpecialRequestTypes request, size_t replyLen_) {
2022-08-26 03:20:44 +02:00
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;
}