Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
diagnostic_manager.h
1#ifndef DIAGNOSTIC_MANAGER_H
2#define DIAGNOSTIC_MANAGER_H
3
4#include <obdemulator/serial_communication.h>
5#include <obdemulator/obd_emulator.h>
6#include "../../ara/exec/helper/modelled_process.h"
7#include "../../ara/com/someip/sd/someip_sd_client.h"
8#include "../../ara/diag/monitor.h"
9#include "../helper/network_configuration.h"
10#include "../doip/obd_to_doip_converter.h"
11
12namespace application
13{
14 namespace platform
15 {
18 {
19 private:
20 static const std::string cAppId;
21 static const std::string cSerialPort;
22 static const speed_t cBaudrate;
23 static const bool cSupportExtended;
24 static const ObdEmulator::CanBusSpeed cSpeed;
25
28 const ara::core::InstanceSpecifier *mEventSpecifier;
29 ara::diag::Event *mEvent;
30 const ara::core::InstanceSpecifier *mMonitorSpecifier;
31 ara::diag::Monitor *mMonitor;
32 ObdEmulator::SerialCommunication mSerialCommunication;
33 ObdEmulator::CanDriver mCanDriver;
34 doip::ObdToDoipConverter *mObdToDoipConverter;
35 ObdEmulator::ObdEmulator *mObdEmulator;
36
37 void configureNetworkLayer(const arxml::ArxmlReader &reader);
38
39 void configureSdClient(const arxml::ArxmlReader &reader);
40
41 void onEventStatusChanged(ara::diag::EventStatusByte eventStatus);
42
43 void configureEvent(const arxml::ArxmlReader &reader);
44
45 void onInitMonitor(ara::diag::InitMonitorReason reason);
46
47 void configureMonitor(const arxml::ArxmlReader &reader);
48
49 void checkServiceDiscovery();
50
51 protected:
52 int Main(
53 const std::atomic_bool *cancellationToken,
54 const std::map<std::string, std::string> &arguments) override;
55
56 public:
59 explicit DiagnosticManager(AsyncBsdSocketLib::Poller *poller);
60
61 ~DiagnosticManager() override;
62 };
63 }
64}
65
66#endif
A OBD service class to handle OBD queries asynchronously.
Definition: obd_to_doip_converter.h:14
Diagnostic Manager (DM) functional cluster.
Definition: diagnostic_manager.h:18
DiagnosticManager(AsyncBsdSocketLib::Poller *poller)
Constructor.
Definition: diagnostic_manager.cpp:15
int Main(const std::atomic_bool *cancellationToken, const std::map< std::string, std::string > &arguments) override
Main running block of the process.
Definition: diagnostic_manager.cpp:278
Network communication abstraction layer.
Definition: network_layer.h:18
SOME/IP service discovery client.
Definition: someip_sd_client.h:26
AUTOSAR shortname-path wrapper.
Definition: instance_specifier.h:14
Diagnostic event class that represents a fault path of a system.
Definition: event.h:52
A class to monitor the correct functionality of a system part.
Definition: monitor.h:40
A class that models an instance of an Adaptive (Platform) Application executable.
Definition: modelled_process.h:20
A class to read ARXML configuration files.
Definition: arxml_reader.h:14
AUTOSAR application namespace.
Definition: diag_message_handler.cpp:5
InitMonitorReason
Monitoring re-initialization reason.
Definition: monitor.h:17
Byte that specifies an event status.
Definition: event.h:33