C++11 adaptions
This commit is contained in:
parent
be8623a4f8
commit
d4bdf314f7
@ -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_ */
|
||||||
|
@ -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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user