add helper method
This commit is contained in:
parent
97e92c0dd2
commit
dea2da9eee
@ -323,6 +323,10 @@ ReturnValue_t PeriodicHelper::enablePeriodicPacket(const dp::structure_id_t stru
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t PeriodicHelper::enablePeriodicPacket(const dp::structure_id_t structureId) {
|
||||
return enablePeriodicPacket(structureId, std::nullopt);
|
||||
}
|
||||
|
||||
ReturnValue_t PeriodicHelper::disablePeriodicPacket(const dp::structure_id_t structureId) {
|
||||
// Get and check dataset first.
|
||||
const auto optSetSpec = getMutSetSpecification(structureId);
|
||||
|
@ -135,6 +135,7 @@ class PeriodicHelper : public PeriodicHelperIF {
|
||||
*/
|
||||
ReturnValue_t enablePeriodicPacket(dp::sid_t structureId,
|
||||
std::optional<dur_millis_t> frequencyMs) override;
|
||||
ReturnValue_t enablePeriodicPacket(dp::sid_t structureId) override;
|
||||
ReturnValue_t disablePeriodicPacket(dp::sid_t structureId) override;
|
||||
ReturnValue_t collectionEnabled(dp::sid_t structureId, bool& collectionEnabled) const override;
|
||||
|
||||
|
@ -17,6 +17,14 @@ class PeriodicHelperIF {
|
||||
dur_millis_t newCollectionIntervalMs) = 0;
|
||||
virtual ReturnValue_t enablePeriodicPacket(dp::sid_t structureId,
|
||||
std::optional<dur_millis_t> frequencyMs) = 0;
|
||||
/**
|
||||
* @brief Enables periodic packet generation for a given structure, and
|
||||
* keeps the previous configured collection interval.
|
||||
*
|
||||
* @param structureId
|
||||
* @return ReturnValue_t
|
||||
*/
|
||||
virtual ReturnValue_t enablePeriodicPacket(dp::sid_t structureId) = 0;
|
||||
virtual ReturnValue_t disablePeriodicPacket(dp::sid_t structureId) = 0;
|
||||
virtual ReturnValue_t collectionEnabled(dp::sid_t structureId, bool& collectionEnabled) const = 0;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user