40 lines
1.4 KiB
C++
40 lines
1.4 KiB
C++
#ifndef FSFW_CFDP_HANDLER_DEFS_H
|
|
#define FSFW_CFDP_HANDLER_DEFS_H
|
|
|
|
#include "fsfw/storagemanager/storeAddress.h"
|
|
|
|
namespace cfdp {
|
|
|
|
enum class CfdpStates { IDLE, BUSY_CLASS_1_NACKED, BUSY_CLASS_2_ACKED, SUSPENDED };
|
|
|
|
static constexpr uint8_t SSID = SUBSYSTEM_ID::CFDP;
|
|
|
|
struct PacketInfo {
|
|
PacketInfo(PduType type, store_address_t storeId,
|
|
std::optional<FileDirective> directive = std::nullopt)
|
|
: pduType(type), directiveType(directive), storeId(storeId) {}
|
|
|
|
PduType pduType = PduType::FILE_DATA;
|
|
std::optional<FileDirective> directiveType = FileDirective::INVALID_DIRECTIVE;
|
|
store_address_t storeId = store_address_t::invalid();
|
|
PacketInfo() = default;
|
|
};
|
|
|
|
template <size_t SIZE>
|
|
using PacketInfoList = etl::list<PacketInfo, SIZE>;
|
|
using PacketInfoListBase = etl::ilist<PacketInfo>;
|
|
|
|
namespace events {
|
|
|
|
static constexpr Event STORE_ERROR = event::makeEvent(SSID, 0, severity::LOW);
|
|
static constexpr Event MSG_QUEUE_ERROR = event::makeEvent(SSID, 1, severity::LOW);
|
|
static constexpr Event SERIALIZATION_ERROR = event::makeEvent(SSID, 2, severity::LOW);
|
|
static constexpr Event FILESTORE_ERROR = event::makeEvent(SSID, 3, severity::LOW);
|
|
//! [EXPORT] : [COMMENT] P1: Transaction step ID, P2: 0 for source file name, 1 for dest file name
|
|
static constexpr Event FILENAME_TOO_LARGE_ERROR = event::makeEvent(SSID, 4, severity::LOW);
|
|
|
|
} // namespace events
|
|
|
|
} // namespace cfdp
|
|
#endif // FSFW_CFDP_HANDLER_DEFS_H
|