Merge pull request 'AcceptsTelemetryIF tweaks' (#712) from eive/fsfw:mueller/accepts_tm_if_adaptions into development

Reviewed-on: fsfw/fsfw#712
This commit is contained in:
Steffen Gaisser 2022-11-21 16:30:43 +01:00
commit d6ee2ed400
6 changed files with 10 additions and 6 deletions

View File

@ -34,6 +34,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## Changes ## Changes
- `AcceptsTelemetryIF`: `getReportReceptionQueue` is const now
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/712
- Moved some container returnvalues to dedicated header and namespace - Moved some container returnvalues to dedicated header and namespace
to they can be used without template specification. to they can be used without template specification.
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/707 PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/707

View File

@ -21,9 +21,11 @@ class AcceptsTelemetryIF {
* receiving message queue. * receiving message queue.
* @return The telemetry reception message queue id. * @return The telemetry reception message queue id.
*/ */
virtual MessageQueueId_t getReportReceptionQueue(uint8_t virtualChannel) = 0; [[nodiscard]] virtual MessageQueueId_t getReportReceptionQueue(uint8_t virtualChannel) const = 0;
virtual MessageQueueId_t getReportReceptionQueue() { return getReportReceptionQueue(0); } [[nodiscard]] virtual MessageQueueId_t getReportReceptionQueue() const {
return getReportReceptionQueue(0);
}
}; };
#endif /* FSFW_TMTCSERVICES_ACCEPTSTELEMETRYIF_H_ */ #endif /* FSFW_TMTCSERVICES_ACCEPTSTELEMETRYIF_H_ */

View File

@ -240,7 +240,7 @@ void TmTcBridge::registerCommDisconnect() {
} }
} }
MessageQueueId_t TmTcBridge::getReportReceptionQueue(uint8_t virtualChannel) { MessageQueueId_t TmTcBridge::getReportReceptionQueue(uint8_t virtualChannel) const {
return tmTcReceptionQueue->getId(); return tmTcReceptionQueue->getId();
} }

View File

@ -65,7 +65,7 @@ class TmTcBridge : public AcceptsTelemetryIF,
ReturnValue_t performOperation(uint8_t operationCode = 0) override; ReturnValue_t performOperation(uint8_t operationCode = 0) override;
/** AcceptsTelemetryIF override */ /** AcceptsTelemetryIF override */
MessageQueueId_t getReportReceptionQueue(uint8_t virtualChannel = 0) override; MessageQueueId_t getReportReceptionQueue(uint8_t virtualChannel) const override;
/** AcceptsTelecommandsIF override */ /** AcceptsTelecommandsIF override */
uint32_t getIdentifier() const override; uint32_t getIdentifier() const override;

View File

@ -6,7 +6,7 @@ AcceptsTmMock::AcceptsTmMock(object_id_t registeredId, MessageQueueId_t queueToR
AcceptsTmMock::AcceptsTmMock(MessageQueueId_t queueToReturn) AcceptsTmMock::AcceptsTmMock(MessageQueueId_t queueToReturn)
: SystemObject(objects::NO_OBJECT, false), returnedQueue(queueToReturn) {} : SystemObject(objects::NO_OBJECT, false), returnedQueue(queueToReturn) {}
MessageQueueId_t AcceptsTmMock::getReportReceptionQueue(uint8_t virtualChannel) { MessageQueueId_t AcceptsTmMock::getReportReceptionQueue(uint8_t virtualChannel) const {
return returnedQueue; return returnedQueue;
} }

View File

@ -9,7 +9,7 @@ class AcceptsTmMock : public SystemObject, public AcceptsTelemetryIF {
AcceptsTmMock(object_id_t registeredId, MessageQueueId_t queueToReturn); AcceptsTmMock(object_id_t registeredId, MessageQueueId_t queueToReturn);
explicit AcceptsTmMock(MessageQueueId_t queueToReturn); explicit AcceptsTmMock(MessageQueueId_t queueToReturn);
MessageQueueId_t getReportReceptionQueue(uint8_t virtualChannel) override; MessageQueueId_t getReportReceptionQueue(uint8_t virtualChannel) const override;
const char* getName() const override; const char* getName() const override;
MessageQueueId_t returnedQueue; MessageQueueId_t returnedQueue;