fsfw/devicehandlers/CookieIF.h

35 lines
962 B
C
Raw Normal View History

#ifndef FSFW_DEVICEHANDLER_COOKIE_H_
#define FSFW_DEVICEHANDLER_COOKIE_H_
2020-04-18 14:16:46 +02:00
#include <cstdint>
2020-04-01 12:41:54 +02:00
/**
* @brief Physical address type
*/
using address_t = uint32_t;
2020-04-01 12:41:54 +02:00
/**
2020-04-01 17:05:55 +02:00
* @brief This datatype is used to identify different connection over a
* single interface (like RMAP or I2C)
2020-04-01 12:41:54 +02:00
* @details
* To use this class, implement a communication specific child cookie which
2020-04-09 17:56:48 +02:00
* inherits Cookie. Cookie instances are created in config/Factory.cpp by
* calling @code{.cpp} CookieIF* childCookie = new ChildCookie(...)
* @endcode .
2020-04-01 12:41:54 +02:00
*
* This cookie is then passed to the child device handlers, which stores the
* pointer and passes it to the communication interface functions.
*
* The cookie can be used to store all kinds of information
* about the communication, like slave addresses, communication status,
* communication parameters etc.
*
* @ingroup comm
*/
class CookieIF {
public:
virtual ~CookieIF() {};
};
#endif /* FSFW_DEVICEHANDLER_COOKIE_H_ */