Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
argument_configuration.h
1#ifndef ARGUMENT_CONFIGURATION_H
2#define ARGUMENT_CONFIGURATION_H
3
4#include <map>
5#include <string>
6
7namespace application
8{
9 namespace helper
10 {
13 {
14 private:
15 std::map<std::string, std::string> mArguments;
16
17 bool trySetEchoMode(bool enabled);
18 bool tryAskSafely(std::string message, std::string argumentKey);
19
20 public:
22 static const std::string cConfigArgument;
24 static const std::string cEvConfigArgument;
26 static const std::string cDmConfigArgument;
28 static const std::string cPhmConfigArgument;
30 static const std::string cApiKeyArgument;
32 static const std::string cBearerTokenArgument;
33
42 int argc,
43 char *argv[],
44 std::string defaultConfigFile = "../../configuration/execution_manifest.arxml",
45 std::string extendedVehicleConfigFile = "../../configuration/extended_vehicle_manifest.arxml",
46 std::string diagnosticManagerConfigFile = "../../configuration/diagnostic_manager_manifest.arxml",
47 std::string healthMonitoringConfigFile = "../../configuration/health_monitoring_manifest.arxml");
48 ArgumentConfiguration() = delete;
49
52 const std::map<std::string, std::string> &GetArguments() const noexcept;
53
58 std::string message = "Please enter the VCC API key:");
59
64 std::string message = "Please enter the OAuth 2.0 bearer token:");
65 };
66 }
67}
68
69#endif
A helper class to manage the arguments passed to the main application.
Definition: argument_configuration.h:13
static const std::string cDmConfigArgument
Diagnostic Manager manifest filename argument key.
Definition: argument_configuration.h:26
const std::map< std::string, std::string > & GetArguments() const noexcept
Arguments property getter.
Definition: argument_configuration.cpp:105
static const std::string cPhmConfigArgument
Platform Health Management manifest filename argument key.
Definition: argument_configuration.h:28
static const std::string cApiKeyArgument
VCC API key argument key.
Definition: argument_configuration.h:30
static const std::string cEvConfigArgument
Extended Vehicle AA manifest filename argument key.
Definition: argument_configuration.h:24
static const std::string cConfigArgument
Execution manifest filename argument key.
Definition: argument_configuration.h:22
bool TryAskingVccApiKey(std::string message="Please enter the VCC API key:")
Try asking the user to enter the VCC API key safely.
Definition: argument_configuration.cpp:110
bool TryAskingBearToken(std::string message="Please enter the OAuth 2.0 bearer token:")
Try asking the user to enter the OAuth 2.0 bearer token safely.
Definition: argument_configuration.cpp:115
static const std::string cBearerTokenArgument
OAuth 2.0 bearer token argument key.
Definition: argument_configuration.h:32
AUTOSAR application namespace.
Definition: diag_message_handler.cpp:5