fixes and tweaks

This commit is contained in:
Robin Müller 2022-09-16 18:08:20 +02:00
parent 1a833e2d45
commit b4b11ebd3b
2 changed files with 7 additions and 7 deletions

View File

@ -14,11 +14,11 @@ static constexpr ReturnValue_t INVALID_PACKET_TYPE = MAKE_RETURN_CODE(2);
static constexpr ReturnValue_t INVALID_SEC_HEADER_FIELD = MAKE_RETURN_CODE(3); static constexpr ReturnValue_t INVALID_SEC_HEADER_FIELD = MAKE_RETURN_CODE(3);
static constexpr ReturnValue_t INCORRECT_PRIMARY_HEADER = MAKE_RETURN_CODE(4); static constexpr ReturnValue_t INCORRECT_PRIMARY_HEADER = MAKE_RETURN_CODE(4);
static constexpr ReturnValue_t INCOMPLETE_PACKET = MAKE_RETURN_CODE(5); static constexpr ReturnValue_t INCOMPLETE_PACKET = MAKE_RETURN_CODE(7);
static constexpr ReturnValue_t INVALID_PUS_VERSION = MAKE_RETURN_CODE(6); static constexpr ReturnValue_t INVALID_PUS_VERSION = MAKE_RETURN_CODE(8);
static constexpr ReturnValue_t INCORRECT_CHECKSUM = MAKE_RETURN_CODE(7); static constexpr ReturnValue_t INCORRECT_CHECKSUM = MAKE_RETURN_CODE(9);
static constexpr ReturnValue_t ILLEGAL_PACKET_SUBTYPE = MAKE_RETURN_CODE(8); static constexpr ReturnValue_t ILLEGAL_PACKET_SUBTYPE = MAKE_RETURN_CODE(10);
static constexpr ReturnValue_t INCORRECT_SECONDARY_HEADER = MAKE_RETURN_CODE(9); static constexpr ReturnValue_t INCORRECT_SECONDARY_HEADER = MAKE_RETURN_CODE(11);
}; // namespace tcdistrib }; // namespace tcdistrib
#endif // FSFW_TMTCPACKET_DEFINITIONS_H #endif // FSFW_TMTCPACKET_DEFINITIONS_H

View File

@ -23,11 +23,11 @@ constexpr uint16_t getSpacePacketIdFromApid(bool isTc, uint16_t apid,
return ((isTc << 4) | (secondaryHeaderFlag << 3) | ((apid >> 8) & 0x07)) << 8 | (apid & 0x00ff); return ((isTc << 4) | (secondaryHeaderFlag << 3) | ((apid >> 8) & 0x07)) << 8 | (apid & 0x00ff);
} }
constexpr uint16_t getTcSpacePacketIdFromApid(uint16_t apid, bool secondaryHeaderFlag = true) { constexpr uint16_t getTcSpacePacketIdFromApid(uint16_t apid, bool secondaryHeaderFlag) {
return getSpacePacketIdFromApid(true, apid, secondaryHeaderFlag); return getSpacePacketIdFromApid(true, apid, secondaryHeaderFlag);
} }
constexpr uint16_t getTmSpacePacketIdFromApid(uint16_t apid, bool secondaryHeaderFlag = true) { constexpr uint16_t getTmSpacePacketIdFromApid(uint16_t apid, bool secondaryHeaderFlag) {
return getSpacePacketIdFromApid(false, apid, secondaryHeaderFlag); return getSpacePacketIdFromApid(false, apid, secondaryHeaderFlag);
} }