diff options
author | JackLivio <jack@livio.io> | 2016-11-30 11:22:20 -0500 |
---|---|---|
committer | JackLivio <jack@livio.io> | 2016-11-30 11:22:20 -0500 |
commit | 321bad27745bf647b1e29ec7b95922a62bff2225 (patch) | |
tree | 70af34c8670ae177988c13f9f5b5223e13bdf95e | |
parent | f3cb4a2ec9603a59fcf1e46e1ff812e449b2197d (diff) | |
download | sdl_core-feature/experimental/send_binary_vehicle_data.tar.gz |
Send binary data for on vehicle data notificationfeature/experimental/send_binary_vehicle_data
-rw-r--r-- | src/components/application_manager/src/commands/mobile/on_vehicle_data_notification.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/components/application_manager/src/commands/mobile/on_vehicle_data_notification.cc b/src/components/application_manager/src/commands/mobile/on_vehicle_data_notification.cc index 37abbab351..9e8303f686 100644 --- a/src/components/application_manager/src/commands/mobile/on_vehicle_data_notification.cc +++ b/src/components/application_manager/src/commands/mobile/on_vehicle_data_notification.cc @@ -36,6 +36,7 @@ #include "application_manager/application_impl.h" #include "application_manager/message_helper.h" #include "interfaces/MOBILE_API.h" +#include "utils/file_system.h" namespace application_manager { @@ -91,6 +92,17 @@ void OnVehicleDataNotification::Run() { } } + std::vector<uint8_t> binary_data; + + LOG4CXX_DEBUG(logger_, "Reading Binary Data To Send"); + if (!file_system::ReadBinaryFile("binary_vehicle_data", binary_data)) { + LOG4CXX_ERROR(logger_, "Unable to read file."); + return; + } + + LOG4CXX_DEBUG(logger_, "Adding Binary Data to Vehicle Data Message"); + (*message_)[strings::params][strings::binary_data] = smart_objects::SmartObject(binary_data); + LOG4CXX_DEBUG( logger_, "Number of Notifications to be send: " << appNotification.size()); |