Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef ECSS_SERVICES_SERVICEPOOL_HPP
#define ECSS_SERVICES_SERVICEPOOL_HPP
#include "Services/RequestVerificationService.hpp"
#include "Services/TimeManagementService.hpp"
#include "Services/EventReportService.hpp"
#include "Services/EventActionService.hpp"
#include "Services/ParameterService.hpp"
#include "Services/TestService.hpp"
#include "Services/MemoryManagementService.hpp"
/**
* Defines a class that contains instances of all Services.
*
* All Services should be stored here and should not be instantiated in a different way.
*
* @todo Find a way to disable services which are not used
*/
class ServicePool {
public:
RequestVerificationService requestVerification;
EventReportService eventReport;
MemoryManagementService memoryManagement;
TimeManagementService timeManagement;
EventActionService eventAction;
TestService testService;
ParameterService parameterManagement;
/**
* The default ServicePool constructor
*/
ServicePool() = default;
/**
* Reset all the services and their contents/properties to the original values
*
* @note This performs the reset in-place, i.e. no new memory is allocated. As such, all
* Services already stored as values will point to the "new" Services after a reset.
*/
void reset();
};
/**
* A global variable that defines the basic pool where services can be fetched from
*/
extern ServicePool Services;
#endif //ECSS_SERVICES_SERVICEPOOL_HPP