diff --git a/tmtcpacket/pus/TcPacketBase.cpp b/tmtcpacket/pus/TcPacketBase.cpp index ca3e2a99a..50130c838 100644 --- a/tmtcpacket/pus/TcPacketBase.cpp +++ b/tmtcpacket/pus/TcPacketBase.cpp @@ -23,6 +23,10 @@ uint8_t TcPacketBase::getSubService() { return tcData->dataField.service_subtype; } +uint8_t TcPacketBase::getSourceId() { + return tcData->dataField.source_id; +} + uint8_t TcPacketBase::getAcknowledgeFlags() { return tcData->dataField.version_type_ack & 0b00001111; } diff --git a/tmtcpacket/pus/TcPacketBase.h b/tmtcpacket/pus/TcPacketBase.h index 582a22140..f5073eba9 100644 --- a/tmtcpacket/pus/TcPacketBase.h +++ b/tmtcpacket/pus/TcPacketBase.h @@ -108,6 +108,13 @@ public: * @return The packet's PUS Service Subtype. */ uint8_t getSubService(); + /** + * The source ID can be used to have an additional identifier, e.g. for different ground + * station. + * @return + */ + uint8_t getSourceId(); + /** * This is a getter for a pointer to the packet's Application data. *