27 lines
1.1 KiB
C
27 lines
1.1 KiB
C
|
#ifndef DUMMIES_COMIFDUMMY_H_
|
||
|
#define DUMMIES_COMIFDUMMY_H_
|
||
|
|
||
|
#include <fsfw/devicehandlers/DeviceCommunicationIF.h>
|
||
|
#include <fsfw/objectmanager/SystemObject.h>
|
||
|
|
||
|
/**
|
||
|
* @brief The ComIFMock supports the simulation of various device communication error cases
|
||
|
* like incomplete or wrong replies and can be used to test the
|
||
|
* DeviceHandlerBase.
|
||
|
*/
|
||
|
class ComIFDummy : public DeviceCommunicationIF, public SystemObject {
|
||
|
public:
|
||
|
ComIFDummy(object_id_t objectId);
|
||
|
virtual ~ComIFDummy();
|
||
|
|
||
|
virtual ReturnValue_t initializeInterface(CookieIF *cookie) override;
|
||
|
virtual ReturnValue_t sendMessage(CookieIF *cookie, const uint8_t *sendData,
|
||
|
size_t sendLen) override;
|
||
|
virtual ReturnValue_t getSendSuccess(CookieIF *cookie) override;
|
||
|
virtual ReturnValue_t requestReceiveMessage(CookieIF *cookie, size_t requestLen) override;
|
||
|
virtual ReturnValue_t readReceivedMessage(CookieIF *cookie, uint8_t **buffer,
|
||
|
size_t *size) override;
|
||
|
};
|
||
|
|
||
|
#endif /* DUMMIES_COMIFDUMMY_H_ */
|