summaryrefslogtreecommitdiffstats
path: root/src/openxc-utils.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-02-22 11:44:27 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-02-22 12:15:13 +0100
commit747d58ad84d230f6cf11ac818bab65019df83611 (patch)
treea7a6f84cac521fd181b8aec490260fda676f08cc /src/openxc-utils.cpp
parentcfd941effb1b2183f6d3f693496aadd45762523f (diff)
No more warning about not defined functions
because of wrong header files inclusion. Some variables are now accessible using functions rather than using global variables that can not be accessed through separated files. Also fix timer returning function type. Change-Id: I36138ff671c2537f595235273abaa34783be18e1 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/openxc-utils.cpp')
-rw-r--r--src/openxc-utils.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/openxc-utils.cpp b/src/openxc-utils.cpp
index 5f001d4..cef8681 100644
--- a/src/openxc-utils.cpp
+++ b/src/openxc-utils.cpp
@@ -16,11 +16,6 @@
* limitations under the License.
*/
-#include <string>
-#include <json-c/json.h>
-#include <sys/timeb.h>
-
-#include "openxc.pb.h"
#include "openxc-utils.hpp"
openxc_VehicleMessage build_VehicleMessage_with_SimpleMessage(openxc_DynamicField_Type type, const openxc_SimpleMessage& message)
@@ -115,6 +110,9 @@ openxc_SimpleMessage get_simple_message(const openxc_VehicleMessage& v_msg)
{
if (v_msg.has_simple_message)
return v_msg.simple_message;
+
+ openxc_SimpleMessage s_msg = { true, "", false, build_DynamicField(false), false, build_DynamicField(false)};
+ return s_msg;
}
json_object* jsonify_simple(const openxc_SimpleMessage& s_msg)