device handler unittest wip
This commit is contained in:
24
tests/src/fsfw_tests/unit/devicehandler/ComIFMock.cpp
Normal file
24
tests/src/fsfw_tests/unit/devicehandler/ComIFMock.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#include "ComIFMock.h"
|
||||
|
||||
ComIFMock::ComIFMock(obejct_id_t objectId) {}
|
||||
|
||||
ComIFMock::~ComIFMock() {}
|
||||
|
||||
ReturnValue_t ComIFMock::initializeInterface(CookieIF *cookie) { return RETURN_OK; }
|
||||
|
||||
ReturnValue_t ComIFMock::sendMessage(CookieIF *cookie, const uint8_t *sendData, size_t sendLen) {
|
||||
rememberSentByte = *sendData;
|
||||
return RETURN_OK;
|
||||
}
|
||||
|
||||
ReturnValue_t ComIFMock::getSendSuccess(CookieIF *cookie) { return RETURN_OK; }
|
||||
|
||||
ReturnValue_t ComIFMock::requestReceiveMessage(CookieIF *cookie, size_t requestLen) {
|
||||
return RETURN_OK;
|
||||
}
|
||||
|
||||
ReturnValue_t ComIFMock::readReceivedMessage(CookieIF *cookie, uint8_t **buffer, size_t *size) {
|
||||
*size = sizeof(rememberSentByte);
|
||||
*buffer = &rememberSentByte;
|
||||
return RETURN_OK;
|
||||
}
|
||||
Reference in New Issue
Block a user