new cookie.cpp + cookieIF.h

This commit is contained in:
Robin Müller 2020-03-23 19:17:53 +01:00
parent 59812199fd
commit ea41514553
2 changed files with 51 additions and 0 deletions

26
devicehandlers/Cookie.cpp Normal file
View File

@ -0,0 +1,26 @@
/**
* @file Cookie.cpp
*
* @date 23.03.2020
*/
#include <framework/devicehandlers/Cookie.h>
Cookie::Cookie(address_t logicalAddress_): logicalAddress(logicalAddress_) {
}
void Cookie::setAddress(address_t logicalAddress_) {
logicalAddress = logicalAddress_;
}
void Cookie::setMaxReplyLen(size_t maxReplyLen_) {
maxReplyLen = maxReplyLen_;
}
address_t Cookie::getAddress() const {
return logicalAddress;
}
size_t Cookie::getMaxReplyLen() const {
return maxReplyLen;
}

25
devicehandlers/CookieIF.h Normal file
View File

@ -0,0 +1,25 @@
/**
* @file CookieIF.h
*
* @date 23.03.2020
*/
#ifndef FRAMEWORK_DEVICEHANDLERS_COOKIEIF_H_
#define FRAMEWORK_DEVICEHANDLERS_COOKIEIF_H_
#include <framework/devicehandlers/DeviceHandlerIF.h>
class CookieIF {
public:
/**
* Default empty virtual destructor.
*/
virtual ~CookieIF() {};
virtual void setAddress(address_t logicalAddress_) = 0;
virtual address_t getAddress() const = 0;
virtual void setMaxReplyLen(size_t maxReplyLen_) = 0;
virtual size_t getMaxReplyLen() const = 0;
};
#endif /* FRAMEWORK_DEVICEHANDLERS_COOKIEIF_H_ */