ChimeraTK-ApplicationCore 04.06.00
Loading...
Searching...
No Matches
InternalModule.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Deutsches Elektronen-Synchrotron DESY, MSK, ChimeraTK Project <chimeratk-support@desy.de>
2// SPDX-License-Identifier: LGPL-3.0-or-later
3#pragma once
4
5#include "EntityOwner.h"
6
7#include <ChimeraTK/ControlSystemAdapter/ProcessArray.h>
8
9#include <thread>
10
11namespace ChimeraTK {
12
13 /********************************************************************************************************************/
14
21 class InternalModule : public EntityOwner {
22 public:
23 ~InternalModule() override = default;
24
27 virtual void activate() {}
28
31 virtual void deactivate() {}
32
35 std::string getQualifiedName() const override { throw; }
36 std::string getFullDescription() const override { throw; }
37 ModuleType getModuleType() const override { throw; }
38 VersionNumber getCurrentVersionNumber() const override { throw; }
39 void setCurrentVersionNumber(VersionNumber /*versionNumber*/) override { throw; }
40 DataValidity getDataValidity() const override { throw; }
41 void incrementDataFaultCounter() override { throw; }
42 void decrementDataFaultCounter() override { throw; }
43 std::list<EntityOwner*> getInputModulesRecursively([[maybe_unused]] std::list<EntityOwner*> startList) override;
44 size_t getCircularNetworkHash() const override;
45 };
46
47 /********************************************************************************************************************/
48 /********************************************************************************************************************/
49
50 inline std::list<EntityOwner*> InternalModule::getInputModulesRecursively(
51 [[maybe_unused]] std::list<EntityOwner*> startList) {
52 throw ChimeraTK::logic_error("getInputModulesRecursively() called on an InternalModule (ThreadedFanout or "
53 "TriggerFanout). This is probably "
54 "caused by incorrect ownership of variables/accessors or VariableGroups.");
55 }
56
57 /********************************************************************************************************************/
58
60 throw ChimeraTK::logic_error("getCircularNetworkHash() called on an InternalModule (ThreadedFanout or "
61 "TriggerFanout). This is probably "
62 "caused by incorrect ownership of variables/accessors or VariableGroups.");
63 }
64
65 /********************************************************************************************************************/
66
67} /* namespace ChimeraTK */
Base class for owners of other EntityOwners (e.g.
Definition EntityOwner.h:38
Base class for internal modules which are created by the variable connection code (e....
VersionNumber getCurrentVersionNumber() const override
Return the current version number which has been received with the last push-type read operation.
std::string getFullDescription() const override
Obtain the full description including the full description of the owner.
virtual void activate()
Activate synchronisation thread if needed.
ModuleType getModuleType() const override
Return the module type of this module, or in case of a VirtualModule the module type this VirtualModu...
DataValidity getDataValidity() const override
Return the data validity flag.
virtual void deactivate()
Deactivate synchronisation thread if running.
~InternalModule() override=default
void decrementDataFaultCounter() override
Decrement the fault counter and set the data validity flag to ok if the counter has reached 0.
std::string getQualifiedName() const override
Below all pure virtual functions of EntityOwner are "implemented" just to make the program compile fo...
void setCurrentVersionNumber(VersionNumber) override
Set the current version number.
std::list< EntityOwner * > getInputModulesRecursively(std::list< EntityOwner * > startList) override
Use pointer to the module as unique identifier.
size_t getCircularNetworkHash() const override
Get the ID of the circular dependency network (0 if none).
void incrementDataFaultCounter() override
Set the data validity flag to fault and increment the fault counter.
InvalidityTracer application module.