changes for C++11

This commit is contained in:
Robin Müller 2021-09-28 16:30:51 +02:00
parent ee531f8067
commit 5284eadca6
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
3 changed files with 10 additions and 10 deletions

View File

@ -79,6 +79,7 @@ enum: uint8_t {
HAL_GPIO, //HGIO HAL_GPIO, //HGIO
MGM_LIS3MDL, //MGMLIS3 MGM_LIS3MDL, //MGMLIS3
MGM_RM3100, //MGMRM3100 MGM_RM3100, //MGMRM3100
SPACE_PACKET_PARSER, //SPPA
FW_CLASS_ID_COUNT // [EXPORT] : [END] FW_CLASS_ID_COUNT // [EXPORT] : [END]
}; };

View File

@ -32,15 +32,6 @@ public:
*/ */
virtual ~SpacePacket(); virtual ~SpacePacket();
static constexpr uint16_t getTcSpacePacketIdFromApid(uint16_t apid) {
uint16_t tcPacketId = (0x18 << 8) | (((apid >> 8) & 0x07) << 8) | (apid & 0x00ff);
return tcPacketId;
}
static constexpr uint16_t getTmSpacePacketIdFromApid(uint16_t apid) {
uint16_t tmPacketId = (0x08 << 8) | (((apid >> 8) & 0x07) << 8) | (apid & 0x00ff);
return tmPacketId;
}
/** /**
* With this call, the complete data content (including the CCSDS Primary * With this call, the complete data content (including the CCSDS Primary
* Header) is overwritten with the byte stream given. * Header) is overwritten with the byte stream given.
@ -78,4 +69,12 @@ protected:
SpacePacketData localData; SpacePacketData localData;
}; };
constexpr uint16_t getTcSpacePacketIdFromApid(uint16_t apid) {
return (0x18 << 8) | (((apid >> 8) & 0x07) << 8) | (apid & 0x00ff);
}
constexpr uint16_t getTmSpacePacketIdFromApid(uint16_t apid) {
return (0x08 << 8) | (((apid >> 8) & 0x07) << 8) | (apid & 0x00ff);
}
#endif /* SPACEPACKET_H_ */ #endif /* SPACEPACKET_H_ */

View File

@ -21,7 +21,7 @@ public:
//! is the size of the PUS packet starting at that index. //! is the size of the PUS packet starting at that index.
using IndexSizePair = std::pair<size_t, size_t>; using IndexSizePair = std::pair<size_t, size_t>;
static constexpr uint8_t INTERFACE_ID = CLASS_ID::PUS_PARSER; static constexpr uint8_t INTERFACE_ID = CLASS_ID::SPACE_PACKET_PARSER;
static constexpr ReturnValue_t NO_PACKET_FOUND = MAKE_RETURN_CODE(0x00); static constexpr ReturnValue_t NO_PACKET_FOUND = MAKE_RETURN_CODE(0x00);
static constexpr ReturnValue_t SPLIT_PACKET = MAKE_RETURN_CODE(0x01); static constexpr ReturnValue_t SPLIT_PACKET = MAKE_RETURN_CODE(0x01);