Merge branch 'sa/new-if' into mueller/master
This commit is contained in:
commit
54e97f7bdc
@ -1,6 +1,7 @@
|
|||||||
#ifndef FSFW_DATAPOOLLOCAL_LOCALDATAPOOLMANAGER_H_
|
#ifndef FSFW_DATAPOOLLOCAL_LOCALDATAPOOLMANAGER_H_
|
||||||
#define FSFW_DATAPOOLLOCAL_LOCALDATAPOOLMANAGER_H_
|
#define FSFW_DATAPOOLLOCAL_LOCALDATAPOOLMANAGER_H_
|
||||||
|
|
||||||
|
#include <fsfw/datapoollocal/ProvidesDataPoolSubscriptionIF.h>
|
||||||
#include "HasLocalDataPoolIF.h"
|
#include "HasLocalDataPoolIF.h"
|
||||||
|
|
||||||
#include "../serviceinterface/ServiceInterface.h"
|
#include "../serviceinterface/ServiceInterface.h"
|
||||||
@ -48,11 +49,13 @@ class HousekeepingPacketUpdate;
|
|||||||
* Each pool entry has a valid state too.
|
* Each pool entry has a valid state too.
|
||||||
* @author R. Mueller
|
* @author R. Mueller
|
||||||
*/
|
*/
|
||||||
class LocalDataPoolManager {
|
class LocalDataPoolManager: public ProvidesDataPoolSubscriptionIF {
|
||||||
template<typename T> friend class LocalPoolVariable;
|
template<typename T> friend class LocalPoolVariable;
|
||||||
template<typename T, uint16_t vecSize> friend class LocalPoolVector;
|
template<typename T, uint16_t vecSize> friend class LocalPoolVector;
|
||||||
friend class LocalPoolDataSetBase;
|
friend class LocalPoolDataSetBase;
|
||||||
friend void (Factory::setStaticFrameworkObjectIds)();
|
friend void (Factory::setStaticFrameworkObjectIds)();
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static constexpr uint8_t INTERFACE_ID = CLASS_ID::HOUSEKEEPING_MANAGER;
|
static constexpr uint8_t INTERFACE_ID = CLASS_ID::HOUSEKEEPING_MANAGER;
|
||||||
|
|
||||||
@ -64,6 +67,7 @@ public:
|
|||||||
static constexpr ReturnValue_t POOLOBJECT_NOT_FOUND = MAKE_RETURN_CODE(4);
|
static constexpr ReturnValue_t POOLOBJECT_NOT_FOUND = MAKE_RETURN_CODE(4);
|
||||||
static constexpr ReturnValue_t DATASET_NOT_FOUND = MAKE_RETURN_CODE(5);
|
static constexpr ReturnValue_t DATASET_NOT_FOUND = MAKE_RETURN_CODE(5);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This constructor is used by a class which wants to implement
|
* This constructor is used by a class which wants to implement
|
||||||
* a personal local data pool. The queueToUse can be supplied if it
|
* a personal local data pool. The queueToUse can be supplied if it
|
||||||
@ -119,7 +123,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
ReturnValue_t subscribeForPeriodicPacket(sid_t sid, bool enableReporting,
|
ReturnValue_t subscribeForPeriodicPacket(sid_t sid, bool enableReporting,
|
||||||
float collectionInterval, bool isDiagnostics,
|
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
|
* @brief Subscribe for the generation of packets if the dataset
|
||||||
@ -133,7 +137,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
ReturnValue_t subscribeForUpdatePackets(sid_t sid, bool reportingEnabled,
|
ReturnValue_t subscribeForUpdatePackets(sid_t sid, bool reportingEnabled,
|
||||||
bool isDiagnostics,
|
bool isDiagnostics,
|
||||||
object_id_t packetDestination = defaultHkDestination);
|
object_id_t packetDestination = defaultHkDestination) override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Subscribe for a notification message which will be sent
|
* @brief Subscribe for a notification message which will be sent
|
||||||
@ -152,7 +156,7 @@ public:
|
|||||||
ReturnValue_t subscribeForSetUpdateMessages(const uint32_t setId,
|
ReturnValue_t subscribeForSetUpdateMessages(const uint32_t setId,
|
||||||
object_id_t destinationObject,
|
object_id_t destinationObject,
|
||||||
MessageQueueId_t targetQueueId,
|
MessageQueueId_t targetQueueId,
|
||||||
bool generateSnapshot);
|
bool generateSnapshot) override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Subscribe for an notification message which will be sent if a
|
* @brief Subscribe for an notification message which will be sent if a
|
||||||
@ -171,7 +175,7 @@ public:
|
|||||||
ReturnValue_t subscribeForVariableUpdateMessages(const lp_id_t localPoolId,
|
ReturnValue_t subscribeForVariableUpdateMessages(const lp_id_t localPoolId,
|
||||||
object_id_t destinationObject,
|
object_id_t destinationObject,
|
||||||
MessageQueueId_t targetQueueId,
|
MessageQueueId_t targetQueueId,
|
||||||
bool generateSnapshot);
|
bool generateSnapshot) override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Non-Diagnostics packets usually have a lower minimum sampling frequency
|
* Non-Diagnostics packets usually have a lower minimum sampling frequency
|
||||||
|
79
datapoollocal/ProvidesDataPoolSubscriptionIF.h
Normal file
79
datapoollocal/ProvidesDataPoolSubscriptionIF.h
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
#include <fsfw/datapoollocal/locPoolDefinitions.h>
|
||||||
|
#include <fsfw/ipc/messageQueueDefinitions.h>
|
||||||
|
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class ProvidesDataPoolSubscriptionIF{
|
||||||
|
public:
|
||||||
|
virtual ~ProvidesDataPoolSubscriptionIF(){};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Subscribe for the generation of periodic packets.
|
||||||
|
* @details
|
||||||
|
* This subscription mechanism will generally be used by the data creator
|
||||||
|
* to generate housekeeping packets which are downlinked directly.
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
virtual ReturnValue_t subscribeForPeriodicPacket(sid_t sid,
|
||||||
|
bool enableReporting,
|
||||||
|
float collectionInterval, bool isDiagnostics,
|
||||||
|
object_id_t packetDestination) = 0;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Subscribe for the generation of packets if the dataset
|
||||||
|
* is marked as changed.
|
||||||
|
* @details
|
||||||
|
* This subscription mechanism will generally be used by the data creator.
|
||||||
|
* @param sid
|
||||||
|
* @param isDiagnostics
|
||||||
|
* @param packetDestination
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
virtual ReturnValue_t subscribeForUpdatePackets(sid_t sid,
|
||||||
|
bool reportingEnabled,
|
||||||
|
bool isDiagnostics,
|
||||||
|
object_id_t packetDestination) = 0;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Subscribe for a notification message which will be sent
|
||||||
|
* if a dataset has changed.
|
||||||
|
* @details
|
||||||
|
* This subscription mechanism will generally be used internally by
|
||||||
|
* other software components.
|
||||||
|
* @param setId Set ID of the set to receive update messages from.
|
||||||
|
* @param destinationObject
|
||||||
|
* @param targetQueueId
|
||||||
|
* @param generateSnapshot If this is set to true, a copy of the current
|
||||||
|
* data with a timestamp will be generated and sent via message.
|
||||||
|
* Otherwise, only an notification message is sent.
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
virtual ReturnValue_t subscribeForSetUpdateMessages(const uint32_t setId,
|
||||||
|
object_id_t destinationObject,
|
||||||
|
MessageQueueId_t targetQueueId,
|
||||||
|
bool generateSnapshot) = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Subscribe for an notification message which will be sent if a
|
||||||
|
* pool variable has changed.
|
||||||
|
* @details
|
||||||
|
* This subscription mechanism will generally be used internally by
|
||||||
|
* other software components.
|
||||||
|
* @param localPoolId Pool ID of the pool variable
|
||||||
|
* @param destinationObject
|
||||||
|
* @param targetQueueId
|
||||||
|
* @param generateSnapshot If this is set to true, a copy of the current
|
||||||
|
* data with a timestamp will be generated and sent via message.
|
||||||
|
* Otherwise, only an notification message is sent.
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
virtual ReturnValue_t subscribeForVariableUpdateMessages(
|
||||||
|
const lp_id_t localPoolId,
|
||||||
|
object_id_t destinationObject,
|
||||||
|
MessageQueueId_t targetQueueId,
|
||||||
|
bool generateSnapshot) = 0;
|
||||||
|
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user