eive-obsw/mission/tmtc/DirectTmSinkIF.h

31 lines
830 B
C
Raw Normal View History

2023-03-09 12:20:13 +01:00
#ifndef MISSION_TMTC_DIRECTTMSINKIF_H_
#define MISSION_TMTC_DIRECTTMSINKIF_H_
#include <cstddef>
2023-03-10 19:01:31 +01:00
#include "eive/resultClassIds.h"
2023-03-09 12:20:13 +01:00
#include "fsfw/retval.h"
class DirectTmSinkIF {
public:
virtual ~DirectTmSinkIF() = default;
2023-03-10 19:01:31 +01:00
static constexpr uint8_t CLASS_ID = CLASS_ID::TM_SINK;
static constexpr ReturnValue_t IS_BUSY = returnvalue::makeCode(CLASS_ID, 0);
2023-03-09 12:20:13 +01:00
/**
2023-03-10 19:01:31 +01:00
* @brief Implements the functionality to write to a TM sink directly
2023-03-09 12:20:13 +01:00
*
* @param data Pointer to buffer holding the data to write
* @param size Number of bytes to write
2023-03-10 19:01:31 +01:00
* @return returnvalue::OK on success, returnvalue::FAILED on failure, IS_BUSY
* if the TM sink is busy.
2023-03-09 12:20:13 +01:00
*/
virtual ReturnValue_t write(const uint8_t* data, size_t size) = 0;
2023-03-10 18:04:04 +01:00
virtual bool isBusy() const = 0;
2023-03-09 12:20:13 +01:00
};
#endif /* MISSION_TMTC_DIRECTTMSINKIF_H_ */