put functions in namespace

This commit is contained in:
Robin Müller 2021-09-28 17:42:29 +02:00
parent b1a9c90087
commit cffd77ed32
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
1 changed files with 4 additions and 0 deletions

View File

@ -69,6 +69,8 @@ protected:
SpacePacketData localData;
};
namespace spacepacket {
constexpr uint16_t getTcSpacePacketIdFromApid(uint16_t apid) {
return (0x18 << 8) | (((apid >> 8) & 0x07) << 8) | (apid & 0x00ff);
}
@ -77,4 +79,6 @@ constexpr uint16_t getTmSpacePacketIdFromApid(uint16_t apid) {
return (0x08 << 8) | (((apid >> 8) & 0x07) << 8) | (apid & 0x00ff);
}
}
#endif /* SPACEPACKET_H_ */