device com IF formattign

This commit is contained in:
Robin Müller 2020-06-15 16:56:22 +02:00
parent c9d8bd59f0
commit e39d5689e5

View File

@ -1,5 +1,5 @@
#ifndef DEVICECOMMUNICATIONIF_H_ #ifndef FRAMEWORK_DEVICES_DEVICECOMMUNICATIONIF_H_
#define DEVICECOMMUNICATIONIF_H_ #define FRAMEWORK_DEVICES_DEVICECOMMUNICATIONIF_H_
#include <framework/devicehandlers/CookieIF.h> #include <framework/devicehandlers/CookieIF.h>
#include <framework/devicehandlers/DeviceHandlerIF.h> #include <framework/devicehandlers/DeviceHandlerIF.h>
@ -19,8 +19,8 @@
* the device handler to allow reuse of these components. * the device handler to allow reuse of these components.
* @details * @details
* Documentation: Dissertation Baetz p.138. * Documentation: Dissertation Baetz p.138.
* It works with the assumption that received data * It works with the assumption that received data is polled by a component.
* is polled by a component. There are four generic steps of device communication: * There are four generic steps of device communication:
* *
* 1. Send data to a device * 1. Send data to a device
* 2. Get acknowledgement for sending * 2. Get acknowledgement for sending
@ -77,8 +77,8 @@ public:
* - @c RETURN_OK for successfull send * - @c RETURN_OK for successfull send
* - Everything else triggers failure event with returnvalue as parameter 1 * - Everything else triggers failure event with returnvalue as parameter 1
*/ */
virtual ReturnValue_t sendMessage(CookieIF *cookie, const uint8_t * sendData, virtual ReturnValue_t sendMessage(CookieIF *cookie,
size_t sendLen) = 0; const uint8_t * sendData, size_t sendLen) = 0;
/** /**
* Called by DHB in the GET_WRITE doGetWrite(). * Called by DHB in the GET_WRITE doGetWrite().
@ -103,7 +103,8 @@ public:
* - Everything else triggers failure event with * - Everything else triggers failure event with
* returnvalue as parameter 1 * returnvalue as parameter 1
*/ */
virtual ReturnValue_t requestReceiveMessage(CookieIF *cookie, size_t requestLen) = 0; virtual ReturnValue_t requestReceiveMessage(CookieIF *cookie,
size_t requestLen) = 0;
/** /**
* Called by DHB in the GET_WRITE doGetRead(). * Called by DHB in the GET_WRITE doGetRead().
@ -119,8 +120,8 @@ public:
* - Everything else triggers failure event with * - Everything else triggers failure event with
* returnvalue as parameter 1 * returnvalue as parameter 1
*/ */
virtual ReturnValue_t readReceivedMessage(CookieIF *cookie, uint8_t **buffer, virtual ReturnValue_t readReceivedMessage(CookieIF *cookie,
size_t *size) = 0; uint8_t **buffer, size_t *size) = 0;
}; };
#endif /* DEVICECOMMUNICATIONIF_H_ */ #endif /* DEVICECOMMUNICATIONIF_H_ */