summaryrefslogtreecommitdiff
path: root/src/components/config_profile
diff options
context:
space:
mode:
authorJackLivio <jack@livio.io>2018-08-23 09:58:04 -0400
committerJackLivio <jack@livio.io>2018-08-23 09:58:04 -0400
commitfb890127f47c300d80c76e0464ea0f041783deb2 (patch)
tree8b7785aa9dca98776a29fbe9acee90cc6df3493d /src/components/config_profile
parent997674798fbe6a6ed2dd579d0703aa8e22d8a643 (diff)
parent73e4f50de1b77e1c938f31226f180f3c63a566fc (diff)
downloadsdl_core-fb890127f47c300d80c76e0464ea0f041783deb2.tar.gz
Merge remote-tracking branch 'origin/develop' into feature/full_app_idfeature/full_app_id
# Conflicts: # src/components/interfaces/MOBILE_API.xml
Diffstat (limited to 'src/components/config_profile')
-rw-r--r--src/components/config_profile/include/config_profile/profile.h34
-rw-r--r--src/components/config_profile/src/profile.cc60
2 files changed, 87 insertions, 7 deletions
diff --git a/src/components/config_profile/include/config_profile/profile.h b/src/components/config_profile/include/config_profile/profile.h
index 4cc57e5b0a..57e925cd43 100644
--- a/src/components/config_profile/include/config_profile/profile.h
+++ b/src/components/config_profile/include/config_profile/profile.h
@@ -110,10 +110,25 @@ class Profile : public protocol_handler::ProtocolHandlerSettings,
const std::string& app_resource_folder() const;
/**
- * @brief Returns true, if SDL 4.0 is enabled
- * @deprecated use max_supported_protocol_version instead
- */
- DEPRECATED bool enable_protocol_4() const OVERRIDE;
+ * @brief Returns offset from SIGRTMIN for user defined signal
+ * SIGLOWVOLTAGE
+ * which is used for handling LOW Voltage functionality
+ */
+ int low_voltage_signal_offset() const;
+
+ /**
+ * @brief Returns offset from SIGRTMIN for user defined signal
+ * SIGWAKEUP
+ * which is used for handling LOW Voltage functionality
+ */
+ int wake_up_signal_offset() const;
+
+ /**
+ * @brief Returns offset from SIGRTMIN for user defined signal
+ * SIGIGNITIONOFF
+ * which is used for handling LOW Voltage functionality
+ */
+ int ignition_off_signal_offset() const;
/**
* @brief Returns application icons folder path
@@ -753,6 +768,8 @@ class Profile : public protocol_handler::ProtocolHandlerSettings,
const std::pair<uint32_t, int32_t>& get_vehicle_data_frequency()
const OVERRIDE;
+ const std::pair<uint32_t, int32_t>& get_interior_vehicle_data_frequency()
+ const OVERRIDE;
const std::pair<uint32_t, int32_t>& start_stream_retry_amount()
const OVERRIDE;
@@ -979,6 +996,12 @@ class Profile : public protocol_handler::ProtocolHandlerSettings,
*/
std::pair<uint32_t, int32_t> get_vehicle_data_frequency_;
+ /*
+ * first value is count of request
+ * second is time scale
+ */
+ std::pair<uint32_t, int32_t> get_interior_vehicle_data_frequency_;
+
/**
* first value is count of retries for start stream
* second for timer
@@ -1025,6 +1048,9 @@ class Profile : public protocol_handler::ProtocolHandlerSettings,
std::vector<std::string> video_service_transports_;
bool error_occured_;
std::string error_description_;
+ int low_voltage_signal_offset_;
+ int wake_up_signal_offset_;
+ int ignition_off_signal_offset_;
DISALLOW_COPY_AND_ASSIGN(Profile);
};
diff --git a/src/components/config_profile/src/profile.cc b/src/components/config_profile/src/profile.cc
index 7fa67fc34c..57984324aa 100644
--- a/src/components/config_profile/src/profile.cc
+++ b/src/components/config_profile/src/profile.cc
@@ -190,6 +190,8 @@ const char* kAckMQKey = "AckMQ";
const char* kApplicationListUpdateTimeoutKey = "ApplicationListUpdateTimeout";
const char* kReadDIDFrequencykey = "ReadDIDRequest";
const char* kGetVehicleDataFrequencyKey = "GetVehicleDataRequest";
+const char* kGetInteriorVehicleDataFrequencyKey =
+ "GetInteriorVehicleDataRequest";
const char* kLegacyProtocolMaskKey = "LegacyProtocol";
const char* kHubProtocolMaskKey = "HubProtocol";
const char* kPoolProtocolMaskKey = "PoolProtocol";
@@ -223,6 +225,9 @@ const char* kEnableAppLaunchIOSKey = "EnableAppLaunchIOS";
const char* kAppTransportChangeTimerKey = "AppTransportChangeTimer";
const char* kAppTransportChangeTimerAdditionKey =
"AppTransportChangeTimerAddition";
+const char* kLowVoltageSignalOffsetKey = "LowVoltageSignal";
+const char* kWakeUpSignalOffsetKey = "WakeUpSignal";
+const char* kIgnitionOffSignalOffsetKey = "IgnitionOffSignal";
const char* kMultipleTransportsEnabledKey = "MultipleTransportsEnabled";
const char* kSecondaryTransportForBluetoothKey =
"SecondaryTransportForBluetooth";
@@ -340,6 +345,7 @@ const uint32_t kDefaultTransportManagerDisconnectTimeout = 0;
const uint32_t kDefaultApplicationListUpdateTimeout = 1;
const std::pair<uint32_t, uint32_t> kReadDIDFrequency = {5, 1};
const std::pair<uint32_t, uint32_t> kGetVehicleDataFrequency = {5, 1};
+const std::pair<uint32_t, uint32_t> kGetInteriorVehicleDataFrequency = {20, 1};
const std::pair<uint32_t, uint32_t> kStartStreamRetryAmount = {3, 1};
const uint32_t kDefaultMaxThreadPoolSize = 2;
const int kDefaultIAP2HubConnectAttempts = 0;
@@ -373,6 +379,9 @@ const uint16_t kDefaultWaitTimeBetweenApps = 4000;
const bool kDefaultEnableAppLaunchIOS = true;
const uint32_t kDefaultAppTransportChangeTimer = 500u;
const uint32_t kDefaultAppTransportChangeTimerAddition = 0u;
+const int32_t kDefaultLowVoltageSignalOffset = 1;
+const int32_t kDefaultWakeUpSignalOffset = 2;
+const int32_t kDefaultIgnitionOffSignalOffset = 3;
const std::string kAllowedSymbols =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890_.-";
const bool kDefaultMultipleTransportsEnabled = false;
@@ -487,7 +496,10 @@ Profile::Profile()
kDefaultAppTransportChangeTimerAddition)
, multiple_transports_enabled_(kDefaultMultipleTransportsEnabled)
, error_occured_(false)
- , error_description_() {
+ , error_description_()
+ , low_voltage_signal_offset_(kDefaultLowVoltageSignalOffset)
+ , wake_up_signal_offset_(kDefaultWakeUpSignalOffset)
+ , ignition_off_signal_offset_(kDefaultIgnitionOffSignalOffset) {
// SDL version
ReadStringValue(
&sdl_version_, kDefaultSDLVersion, kMainSection, kSDLVersionKey);
@@ -532,8 +544,16 @@ const std::string& Profile::app_resource_folder() const {
return app_resource_folder_;
}
-bool Profile::enable_protocol_4() const {
- return max_supported_protocol_version_ >= 4;
+int Profile::low_voltage_signal_offset() const {
+ return low_voltage_signal_offset_;
+}
+
+int Profile::wake_up_signal_offset() const {
+ return wake_up_signal_offset_;
+}
+
+int Profile::ignition_off_signal_offset() const {
+ return ignition_off_signal_offset_;
}
const std::string& Profile::app_icons_folder() const {
@@ -796,6 +816,11 @@ const std::pair<uint32_t, int32_t>& Profile::get_vehicle_data_frequency()
return get_vehicle_data_frequency_;
}
+const std::pair<uint32_t, int32_t>&
+Profile::get_interior_vehicle_data_frequency() const {
+ return get_interior_vehicle_data_frequency_;
+}
+
const std::pair<uint32_t, int32_t>& Profile::start_stream_retry_amount() const {
return start_stream_retry_amount_;
}
@@ -1878,6 +1903,11 @@ void Profile::UpdateValues() {
kMainSection,
kGetVehicleDataFrequencyKey);
+ ReadUintIntPairValue(&get_interior_vehicle_data_frequency_,
+ kGetInteriorVehicleDataFrequency,
+ kMainSection,
+ kGetInteriorVehicleDataFrequencyKey);
+
ReadUIntValue(&max_thread_pool_size_,
kDefaultMaxThreadPoolSize,
kApplicationManagerSection,
@@ -2139,6 +2169,30 @@ void Profile::UpdateValues() {
kAppTransportChangeTimerAdditionKey,
kMainSection);
+ ReadIntValue(&low_voltage_signal_offset_,
+ kDefaultLowVoltageSignalOffset,
+ kMainSection,
+ kLowVoltageSignalOffsetKey);
+
+ LOG_UPDATED_VALUE(
+ low_voltage_signal_offset_, kLowVoltageSignalOffsetKey, kMainSection);
+
+ ReadIntValue(&wake_up_signal_offset_,
+ kDefaultWakeUpSignalOffset,
+ kMainSection,
+ kWakeUpSignalOffsetKey);
+
+ LOG_UPDATED_VALUE(
+ wake_up_signal_offset_, kWakeUpSignalOffsetKey, kMainSection);
+
+ ReadIntValue(&ignition_off_signal_offset_,
+ kDefaultIgnitionOffSignalOffset,
+ kMainSection,
+ kIgnitionOffSignalOffsetKey);
+
+ LOG_UPDATED_VALUE(
+ ignition_off_signal_offset_, kIgnitionOffSignalOffsetKey, kMainSection);
+
ReadBoolValue(&multiple_transports_enabled_,
kDefaultMultipleTransportsEnabled,
kMultipleTransportsSection,