1
0
forked from fsfw/fsfw

SubscriptIF implementation started

This commit is contained in:
NguSa1
2021-01-11 19:44:07 +01:00
parent f64e356de3
commit 217866c042
2 changed files with 88 additions and 5 deletions

View File

@ -1,6 +1,7 @@
#ifndef FSFW_DATAPOOLLOCAL_LOCALDATAPOOLMANAGER_H_
#define FSFW_DATAPOOLLOCAL_LOCALDATAPOOLMANAGER_H_
#include <fsfw/datapoollocal/ProvidesDataPoolSubscriptionIF.h>
#include "HasLocalDataPoolIF.h"
#include "../housekeeping/HousekeepingPacketDownlink.h"
@ -47,11 +48,13 @@ class HousekeepingPacketUpdate;
* Each pool entry has a valid state too.
* @author R. Mueller
*/
class LocalDataPoolManager {
class LocalDataPoolManager: public ProvidesDataPoolSubscriptionIF {
template<typename T> friend class LocalPoolVariable;
template<typename T, uint16_t vecSize> friend class LocalPoolVector;
friend class LocalPoolDataSetBase;
friend void (Factory::setStaticFrameworkObjectIds)();
public:
static constexpr uint8_t INTERFACE_ID = CLASS_ID::HOUSEKEEPING_MANAGER;
@ -61,6 +64,7 @@ public:
static constexpr ReturnValue_t REPORTING_STATUS_UNCHANGED = MAKE_RETURN_CODE(0x02);
static constexpr ReturnValue_t PERIODIC_HELPER_INVALID = MAKE_RETURN_CODE(0x03);
/**
* This constructor is used by a class which wants to implement
* a personal local data pool. The queueToUse can be supplied if it
@ -116,7 +120,7 @@ public:
*/
ReturnValue_t subscribeForPeriodicPacket(sid_t sid, bool enableReporting,
float collectionInterval, bool isDiagnostics,
object_id_t packetDestination = defaultHkDestination);
object_id_t packetDestination = defaultHkDestination) override;
/**
* @brief Subscribe for the generation of packets if the dataset
@ -130,7 +134,7 @@ public:
*/
ReturnValue_t subscribeForUpdatePackets(sid_t sid, bool reportingEnabled,
bool isDiagnostics,
object_id_t packetDestination = defaultHkDestination);
object_id_t packetDestination = defaultHkDestination) override;
/**
* @brief Subscribe for a notification message which will be sent
@ -149,7 +153,7 @@ public:
ReturnValue_t subscribeForSetUpdateMessages(const uint32_t setId,
object_id_t destinationObject,
MessageQueueId_t targetQueueId,
bool generateSnapshot);
bool generateSnapshot) override;
/**
* @brief Subscribe for an notification message which will be sent if a
@ -168,7 +172,7 @@ public:
ReturnValue_t subscribeForVariableUpdateMessages(const lp_id_t localPoolId,
object_id_t destinationObject,
MessageQueueId_t targetQueueId,
bool generateSnapshot);
bool generateSnapshot) override;
/**
* Non-Diagnostics packets usually have a lower minimum sampling frequency