Merge pull request 'cond code to string converter' (#40) from cond-code-string-converter into main
Reviewed-on: #40
This commit is contained in:
commit
e830cb5bdd
@ -158,6 +158,53 @@ enum class ProxyOpMessageType : uint8_t {
|
|||||||
CLOSURE = 0x0b
|
CLOSURE = 0x0b
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static inline const char* conditionCodeString(ConditionCode code) {
|
||||||
|
switch (code) {
|
||||||
|
case (ConditionCode::NO_ERROR): {
|
||||||
|
return "No Error";
|
||||||
|
}
|
||||||
|
case (ConditionCode::POSITIVE_ACK_LIMIT_REACHED): {
|
||||||
|
return "Positive ACK limit reached";
|
||||||
|
}
|
||||||
|
case (ConditionCode::KEEP_ALIVE_LIMIT_REACHED): {
|
||||||
|
return "Keep alive limit reached";
|
||||||
|
}
|
||||||
|
case (ConditionCode::INVALID_TRANSMISSION_MODE): {
|
||||||
|
return "Invalid transmission mode";
|
||||||
|
}
|
||||||
|
case (ConditionCode::FILESTORE_REJECTION): {
|
||||||
|
return "Filestore rejection";
|
||||||
|
}
|
||||||
|
case (ConditionCode::FILE_CHECKSUM_FAILURE): {
|
||||||
|
return "File checksum failure";
|
||||||
|
}
|
||||||
|
case (ConditionCode::FILE_SIZE_ERROR): {
|
||||||
|
return "File size error";
|
||||||
|
}
|
||||||
|
case (ConditionCode::NAK_LIMIT_REACHED): {
|
||||||
|
return "NAK limit reached";
|
||||||
|
}
|
||||||
|
case (ConditionCode::INACTIVITY_DETECTED): {
|
||||||
|
return "Inactivity detected";
|
||||||
|
}
|
||||||
|
case (ConditionCode::CHECK_LIMIT_REACHED): {
|
||||||
|
return "Check limit reached";
|
||||||
|
}
|
||||||
|
case (ConditionCode::UNSUPPORTED_CHECKSUM_TYPE): {
|
||||||
|
return "Unsupported checksum type";
|
||||||
|
}
|
||||||
|
case (ConditionCode::SUSPEND_REQUEST_RECEIVED): {
|
||||||
|
return "Suspend request received";
|
||||||
|
}
|
||||||
|
case (ConditionCode::CANCEL_REQUEST_RECEIVED): {
|
||||||
|
return "Cancel request received";
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
return "Invalid condition code value";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace cfdp
|
} // namespace cfdp
|
||||||
|
|
||||||
#endif /* FSFW_SRC_FSFW_CFDP_PDU_DEFINITIONS_H_ */
|
#endif /* FSFW_SRC_FSFW_CFDP_PDU_DEFINITIONS_H_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user