added getter function

This commit is contained in:
Robin Müller 2021-06-13 12:38:24 +02:00
parent fb7b059137
commit 1b6759020a
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
2 changed files with 11 additions and 0 deletions

View File

@ -23,6 +23,10 @@ uint8_t TcPacketBase::getSubService() {
return tcData->dataField.service_subtype; return tcData->dataField.service_subtype;
} }
uint8_t TcPacketBase::getSourceId() {
return tcData->dataField.source_id;
}
uint8_t TcPacketBase::getAcknowledgeFlags() { uint8_t TcPacketBase::getAcknowledgeFlags() {
return tcData->dataField.version_type_ack & 0b00001111; return tcData->dataField.version_type_ack & 0b00001111;
} }

View File

@ -108,6 +108,13 @@ public:
* @return The packet's PUS Service Subtype. * @return The packet's PUS Service Subtype.
*/ */
uint8_t getSubService(); 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. * This is a getter for a pointer to the packet's Application data.
* *