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),
|
2022-08-26 13:42:58 +02:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2022-08-26 13:42:58 +02:00
|
|
|
GOMSPACE::SpecialRequestTypes CspCookie::getRequest() const {
|
2022-08-26 03:20:44 +02:00
|
|
|
return reqType;
|
|
|
|
}
|
|
|
|
|
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_;
|
|
|
|
}
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|