8#include "Arp/System/Acf/ILibrary.hpp"
9#include "Arp/System/Acf/IComponent.hpp"
10#include "Arp/System/Rsc/Services/IRscServiceFactory.hpp"
37 uint32 startOrder = GetDefaultStartOrder(),
38 bool isSingleton =
false);
54 static uint32 GetDefaultStartOrder(
void);
73 template<
class TService,
class TServiceFactory>
89 bool isSingleton =
false;
90 bool isRequired =
false;
93 static const uint32 maxComponentStartOrder;
94 static const uint32 customComponentStartOrderShift;
102 return this->application;
107 return this->library;
112 return this->fullName;
122 return this->componentCategory;
127 return this->startOrder;
132 return this->isSingleton;
137 return this->isRequired;
140template<
class TService,
class TServiceFactory>
This class represents the version of a special SDK or Arp build.
Definition: BasicVersion.hpp:36
Use this class as base class for all Acf components.
Definition: ComponentBase.hpp:23
void Initialize(void) override
Initializes this component: creates singletons, makes any registrations, creates any resources not de...
Version GetVersion(void) const final
Gets the version of this component which defaults to the build version of the related library.
Definition: ComponentBase.hpp:115
ComponentCategory GetComponentCategory(void) const final
Gets the ComponentCategory of this component.
Definition: ComponentBase.hpp:120
void SubscribeServices(void) override
Subscribes services required by this component.
void PublishServices(void) override
Publishes components services.
bool IsSingleton(void) const final
Determines if this component is a singleton, that is, it's instantiated only once on the entire syste...
Definition: ComponentBase.hpp:130
void LoadSettings(const String &settingsPath) override
Loads components firmware settings.
void LoadConfig(void) override
Loads components project configuration.
String GetFullName(void) const final
Gets the full qualified name of this component
Definition: ComponentBase.hpp:110
IApplication & GetApplication(void) const final
Gets the applicatopn instance of the actual process which loaded this component.
Definition: ComponentBase.hpp:100
void PowerDown(void) override
This operation is called on a power breakdown event and executes component specific actions when powe...
void Dispose(void) override
Disposes component.
ComponentBase(IApplication &application, ILibrary &library, const String &fullName, ComponentCategory category, uint32 startOrder=GetDefaultStartOrder(), bool isSingleton=false)
Constructs an <see cref = "IComponentFactory" / > instance.
void SetupSettings(void) override
Sets up components settings which were loaded in LoadSettings.
~ComponentBase(void) override=default
The default destructor.
bool IsRequired(void) const final
Determines if this component is required.
Definition: ComponentBase.hpp:135
void PublishComponentService(void)
Publishes a component service for this component instance.
Definition: ComponentBase.hpp:141
ILibrary & GetLibrary(void) const final
Gets the library instance of this component.
Definition: ComponentBase.hpp:105
void SetupConfig(void) override
Sets up components configuration which was loaded in LoadConfig.
uint32 GetStartOrder(void) const final
Gets the start order of this component.
Definition: ComponentBase.hpp:125
void ResetConfig(void) override
Resets components project configuration.
This interface shall be implemented by the application class.
Definition: IApplication.hpp:19
This is the most important basic interface of the Arp platform. Any component shall implement this in...
Definition: IComponent.hpp:81
Any Acf Library shall implement this interface.
Definition: ILibrary.hpp:22
virtual const Version & GetBuildVersion(void) const =0
Gets the SDK version of the SDK used to build the shared library.
std::uint32_t uint32
The Arp unsigned integer type of 4 byte size.
Definition: PrimitiveTypes.hpp:36
ComponentCategory
This enumeration determines the category of a component.
Definition: ComponentCategory.hpp:17
@ System
System components used by the System, Device, Plc or Io domains.
Namespace for classes and interfaces for the Remote Service Call implementation
Root namespace for the PLCnext API