1#ifndef H_EXTENSIONS_CUTEHMI_SERVICES_3_INCLUDE_CUTEHMI_SERVICES_ABSTRACTSERVICE_HPP
2#define H_EXTENSIONS_CUTEHMI_SERVICES_3_INCLUDE_CUTEHMI_SERVICES_ABSTRACTSERVICE_HPP
4#include "internal/common.hpp"
5#include "StateInterface.hpp"
8#include <cutehmi/workarounds/qt5compatibility/qsizetype.hpp>
14#include <cutehmi/workarounds/qt5compatibility/cutehmiQt6MocInclude.hpp>
24CUTEHMI_QT6_MOC_INCLUDE(
"AbstractServiceController.hpp")
31#include <QStateMachine>
34#include <QQmlListProperty>
52 QML_UNCREATABLE(
"AbstractService is an abstract class")
55 static constexpr int INITIAL_SHUTDOWN_TIMEOUT = 180000;
57 static constexpr int INITIAL_STOP_TIMEOUT = 30000;
59 static constexpr int INITIAL_START_TIMEOUT = 30000;
61 static constexpr int INITIAL_REPAIR_TIMEOUT = 30000;
63 static constexpr const char * INITIAL_NAME =
"Unnamed Service";
65 Q_PROPERTY(
int shutdownTimeout READ shutdownTimeout WRITE setShutdownTimeout NOTIFY shutdownTimeoutChanged)
67 Q_PROPERTY(
int stopTimeout READ stopTimeout WRITE setStopTimeout NOTIFY stopTimeoutChanged)
69 Q_PROPERTY(
int startTimeout READ startTimeout WRITE setStartTimeout NOTIFY startTimeoutChanged)
71 Q_PROPERTY(
int repairTimeout READ repairTimeout WRITE setRepairTimeout NOTIFY repairTimeoutChanged)
73 Q_PROPERTY(
QString name READ name WRITE setName NOTIFY nameChanged)
75 Q_PROPERTY(
QString status READ status NOTIFY statusChanged)
90 int shutdownTimeout()
const;
98 void setShutdownTimeout(
int shutdownTimeout);
100 int stopTimeout()
const;
107 void setStopTimeout(
int stopTimeout);
109 int startTimeout()
const;
116 void setStartTimeout(
int startTimeout);
118 int repairTimeout()
const;
125 void setRepairTimeout(
int repairTimeout);
129 void setName(
const QString & name);
146 Q_INVOKABLE
void clearControllers();
200 void setStatus(
const QString & status);
222 int stopTimeout = INITIAL_STOP_TIMEOUT;
223 int startTimeout = INITIAL_START_TIMEOUT;
224 int repairTimeout = INITIAL_REPAIR_TIMEOUT;
225 int shutdownTimeout = INITIAL_SHUTDOWN_TIMEOUT;
235 stateInterface(p_stateInterface),
Abstract service controller.
Definition: AbstractServiceController.hpp:38
Abstract service.
Definition: AbstractService.hpp:49
void stopTimeoutChanged()
void repairTimeoutChanged()
void initialized()
This signal is emitted, when service has performed all the initialization tasks and it is ready to be...
void startTimeoutChanged()
ControllersContainer & controllers()
QList< AbstractServiceController * > ControllersContainer
Definition: AbstractService.hpp:181
void shutdownTimeoutChanged()
State interface.
Definition: StateInterface.hpp:30