summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author <philippe colliot>2016-03-11 17:56:13 +0100
committer <philippe colliot>2016-03-11 17:56:13 +0100
commit5a1e74b626716ac100a7a541d90eb9d6f60fd502 (patch)
tree988aa83fe65325c17665f675a93d5041fd488be6
parentfe2954930afdf5d70a47ac3be5f02f3e301a33a2 (diff)
downloadpoi-service-5a1e74b626716ac100a7a541d90eb9d6f60fd502.tar.gz
First tentative to connect DBus proxy to nodejs POC but seg fault :-(
-rw-r--r--test/navigation/w3c/socket-based-poc/README.md13
-rw-r--r--test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/CMakeLists.txt3
-rw-r--r--test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/NavigationCoreConfigurationWrapper.cpp (renamed from test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/NavigationCoreConfiguration.cpp)69
-rw-r--r--test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/NavigationCoreConfigurationWrapper.hpp (renamed from test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/NavigationCoreConfiguration.hpp)36
-rw-r--r--test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/binding.gyp9
-rw-r--r--test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/genivi-navigationcore-configuration_proxy.h207
-rw-r--r--test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/genivi-navigationcore-constants.h198
-rw-r--r--test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/package.json2
-rw-r--r--test/navigation/w3c/socket-based-poc/server.js4
9 files changed, 487 insertions, 54 deletions
diff --git a/test/navigation/w3c/socket-based-poc/README.md b/test/navigation/w3c/socket-based-poc/README.md
index 3c2336c..34b7856 100644
--- a/test/navigation/w3c/socket-based-poc/README.md
+++ b/test/navigation/w3c/socket-based-poc/README.md
@@ -3,8 +3,9 @@ Technology used: nodejs
To get nodejs:
sudo apt-get install nodejs npm
+npm install -g node-gyp
-To build the module in C++ and install the module localy for nodejs:
+To build the c++ add-on in C++ and install the module localy for nodejs:
cd ./node-cpp-lbs-modules
npm build .
npm pack
@@ -21,3 +22,13 @@ nodejs server.js
In your browser open the file ./index.html
+Annex:
+To debug the C++ add-on:
+cd ./node-cpp-lbs-modules
+node-gyp configure --debug
+node-gyp build --debug
+npm pack
+cd ..
+npm install node-cpp-lbs-modules/node-cpp-based-modules-0.1.0.tgz
+
+nodejs debug server.js \ No newline at end of file
diff --git a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/CMakeLists.txt b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/CMakeLists.txt
index dbb03d0..792306f 100644
--- a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/CMakeLists.txt
+++ b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/CMakeLists.txt
@@ -3,7 +3,10 @@ cmake_minimum_required(VERSION 2.8)
aux_source_directory(. SRC_LIST)
include_directories(
./
+ /usr/include/dbus-c++-1/
/usr/include/nodejs/src/
+ /usr/include/glib-2.0/
+ /usr/lib/i386-linux-gnu/glib-2.0/include/
)
add_executable(${PROJECT_NAME} ${SRC_LIST})
diff --git a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/NavigationCoreConfiguration.cpp b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/NavigationCoreConfigurationWrapper.cpp
index 1e6081a..2f79c9c 100644
--- a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/NavigationCoreConfiguration.cpp
+++ b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/NavigationCoreConfigurationWrapper.cpp
@@ -1,14 +1,16 @@
#include <node.h>
-#include "NavigationCoreConfiguration.hpp"
+#include "NavigationCoreConfigurationWrapper.hpp"
using namespace v8;
using namespace std;
-using namespace org::genivi::navigationcore;
-Persistent<FunctionTemplate> NavigationCoreConfiguration::constructor;
+//DBus::Glib::BusDispatcher dispatcher;
+static DBus::Connection *connection;
-void NavigationCoreConfiguration::ConfigurationChanged(const Handle<Function>& callback, const Handle<Array>& array) {
+Persistent<FunctionTemplate> NavigationCoreConfigurationWrapper::constructor;
+
+void NavigationCoreConfigurationWrapper::ConfigurationChanged(const Handle<Function>& callback, const Handle<Array>& array) {
HandleScope scope;
// In case the operation succeeded, convention is to pass null as the
// first argument before the result arguments.
@@ -24,11 +26,11 @@ void NavigationCoreConfiguration::ConfigurationChanged(const Handle<Function>& c
callback->Call(Context::GetCurrent()->Global(), argc, argv);
}
-void NavigationCoreConfiguration::Init(Handle<Object> target) {
+void NavigationCoreConfigurationWrapper::Init(Handle<Object> target) {
HandleScope scope;
Local<FunctionTemplate> tpl = FunctionTemplate::New(New);
- Local<String> name = String::NewSymbol("NavigationCoreConfiguration");
+ Local<String> name = String::NewSymbol("NavigationCoreConfigurationWrapper");
constructor = Persistent<FunctionTemplate>::New(tpl);
// ObjectWrap uses the first internal field to store the wrapped pointer.
@@ -47,9 +49,10 @@ void NavigationCoreConfiguration::Init(Handle<Object> target) {
target->Set(name, constructor->GetFunction());
}
-NavigationCoreConfiguration::NavigationCoreConfiguration() : ObjectWrap() {}
+NavigationCoreConfigurationWrapper::NavigationCoreConfigurationWrapper() : mp_proxy() {
+}
-Handle<Value> NavigationCoreConfiguration::New(const Arguments& args) {
+Handle<Value> NavigationCoreConfigurationWrapper::New(const Arguments& args) {
HandleScope scope;
if (!args.IsConstructCall()) {
@@ -57,15 +60,17 @@ Handle<Value> NavigationCoreConfiguration::New(const Arguments& args) {
String::New("Use the new operator to create instances of this object."))
);
}
+ NavigationCoreConfigurationProxy* proxy = new NavigationCoreConfigurationProxy(*connection);
// Creates a new instance object of this type and wraps it.
- NavigationCoreConfiguration* obj = new NavigationCoreConfiguration();
+ NavigationCoreConfigurationWrapper* obj = new NavigationCoreConfigurationWrapper();
+ obj->mp_proxy = proxy;
obj->Wrap(args.This());
return args.This();
}
-Handle<Value> NavigationCoreConfiguration::GetProperty(const Arguments& args) {
+Handle<Value> NavigationCoreConfigurationWrapper::GetProperty(const Arguments& args) {
HandleScope scope; //to properly clean up v8 handles
if (args.Length() < 1) {
@@ -78,11 +83,11 @@ Handle<Value> NavigationCoreConfiguration::GetProperty(const Arguments& args) {
if(propertyName == "Locale") {
// Retrieves the pointer to the wrapped object instance.
- NavigationCoreConfiguration* obj = ObjectWrap::Unwrap<NavigationCoreConfiguration>(args.This());
+ NavigationCoreConfigurationWrapper* obj = ObjectWrap::Unwrap<NavigationCoreConfigurationWrapper>(args.This());
Local<Object> ret = Object::New();
- Locale localeValue = obj->m_proxy.GetLocale();
+ Locale localeValue = obj->mp_proxy->GetLocale();
ret->Set( 0, String::New(propertyName.c_str()) );
ret->Set( 1, String::New(localeValue.languageCode.c_str()) );
ret->Set( 2, String::New(localeValue.countryCode.c_str()) );
@@ -93,7 +98,7 @@ Handle<Value> NavigationCoreConfiguration::GetProperty(const Arguments& args) {
{
if(propertyName == "TimeFormat") {
// Retrieves the pointer to the wrapped object instance.
- NavigationCoreConfiguration* obj = ObjectWrap::Unwrap<NavigationCoreConfiguration>(args.This());
+ NavigationCoreConfigurationWrapper* obj = ObjectWrap::Unwrap<NavigationCoreConfigurationWrapper>(args.This());
Local<Object> ret = Object::New();
@@ -103,7 +108,7 @@ Handle<Value> NavigationCoreConfiguration::GetProperty(const Arguments& args) {
{
if(propertyName == "CoordinatesFormat") {
// Retrieves the pointer to the wrapped object instance.
- NavigationCoreConfiguration* obj = ObjectWrap::Unwrap<NavigationCoreConfiguration>(args.This());
+ NavigationCoreConfigurationWrapper* obj = ObjectWrap::Unwrap<NavigationCoreConfigurationWrapper>(args.This());
Local<Object> ret = Object::New();
@@ -114,7 +119,7 @@ Handle<Value> NavigationCoreConfiguration::GetProperty(const Arguments& args) {
return Undefined();
}
-Handle<Value> NavigationCoreConfiguration::SetProperty(const Arguments& args)
+Handle<Value> NavigationCoreConfigurationWrapper::SetProperty(const Arguments& args)
{
HandleScope scope; //to properly clean up v8 handles
@@ -143,8 +148,8 @@ Handle<Value> NavigationCoreConfiguration::SetProperty(const Arguments& args)
localeValue.scriptCode = std::string(*scriptCode);
// Retrieves the pointer to the wrapped object instance.
- NavigationCoreConfiguration* obj = ObjectWrap::Unwrap<NavigationCoreConfiguration>(args.This());
- obj->m_proxy.SetLocale(localeValue);
+ NavigationCoreConfigurationWrapper* obj = ObjectWrap::Unwrap<NavigationCoreConfigurationWrapper>(args.This());
+ obj->mp_proxy->SetLocale(localeValue);
Handle<Value> callBackValue = property_obj->Get(String::New("callBack"));
@@ -160,13 +165,13 @@ Handle<Value> NavigationCoreConfiguration::SetProperty(const Arguments& args)
return Undefined();
}
-Handle<Value> NavigationCoreConfiguration::GetVersion(const Arguments& args) {
+Handle<Value> NavigationCoreConfigurationWrapper::GetVersion(const Arguments& args) {
HandleScope scope; //to properly clean up v8 handles
// Retrieves the pointer to the wrapped object instance.
- NavigationCoreConfiguration* obj = ObjectWrap::Unwrap<NavigationCoreConfiguration>(args.This());
+ NavigationCoreConfigurationWrapper* obj = ObjectWrap::Unwrap<NavigationCoreConfigurationWrapper>(args.This());
- Version version = obj->m_proxy.GetVersion();
+ Version version = obj->mp_proxy->GetVersion();
Local<Object> ret = Object::New();
ret->Set( 0, Int32::New(version.versionMajor) );
@@ -177,13 +182,13 @@ Handle<Value> NavigationCoreConfiguration::GetVersion(const Arguments& args) {
return scope.Close(ret);
}
-Handle<Value> NavigationCoreConfiguration::GetSupportedLocales(const Arguments& args) {
+Handle<Value> NavigationCoreConfigurationWrapper::GetSupportedLocales(const Arguments& args) {
HandleScope scope; //to properly clean up v8 handles
// Retrieves the pointer to the wrapped object instance.
- NavigationCoreConfiguration* obj = ObjectWrap::Unwrap<NavigationCoreConfiguration>(args.This());
+ NavigationCoreConfigurationWrapper* obj = ObjectWrap::Unwrap<NavigationCoreConfigurationWrapper>(args.This());
- std::vector<Locale > localeList = obj->m_proxy.GetSupportedLocales();
+ std::vector<Locale > localeList = obj->mp_proxy->GetSupportedLocales();
Local<Array> ret = Array::New();
for (unsigned i=0;i<localeList.size();i++)
@@ -198,26 +203,26 @@ Handle<Value> NavigationCoreConfiguration::GetSupportedLocales(const Arguments&
return scope.Close(ret);
}
-Handle<Value> NavigationCoreConfiguration::GetUnitsOfMeasurement(const Arguments& args)
+Handle<Value> NavigationCoreConfigurationWrapper::GetUnitsOfMeasurement(const Arguments& args)
{
HandleScope scope; //to properly clean up v8 handles
// Retrieves the pointer to the wrapped object instance.
- NavigationCoreConfiguration* obj = ObjectWrap::Unwrap<NavigationCoreConfiguration>(args.This());
+ NavigationCoreConfigurationWrapper* obj = ObjectWrap::Unwrap<NavigationCoreConfigurationWrapper>(args.This());
- Configuration_proxy::UnitsOfMeasurement unitsOfMeasurement = obj->m_proxy.GetUnitsOfMeasurement();
+ NavigationCoreConfigurationProxy::UnitsOfMeasurement unitsOfMeasurement = obj->mp_proxy->GetUnitsOfMeasurement();
Local<Array> ret = Array::New();
- for (Configuration_proxy::UnitsOfMeasurement::iterator iter = unitsOfMeasurement.begin(); iter != unitsOfMeasurement.end(); iter++) {
+ for (NavigationCoreConfigurationProxy::UnitsOfMeasurement::iterator iter = unitsOfMeasurement.begin(); iter != unitsOfMeasurement.end(); iter++) {
Local<Object> data = Object::New();
- Configuration_proxy::UnitsOfMeasurementValueStruct unitsOfMeasurement;
+ NavigationCoreConfigurationProxy::UnitsOfMeasurementValueStruct unitsOfMeasurement;
unitsOfMeasurement = iter->second;
data->Set(String::New("key"), Int32::New(iter->first));
switch (unitsOfMeasurement.type) {
- case Configuration_proxy::intValue:
+ case NavigationCoreConfigurationProxy::intValue:
data->Set(String::New("value"), Int32::New(unitsOfMeasurement.value.intValue));
break;
- case Configuration_proxy::doubleValue:
+ case NavigationCoreConfigurationProxy::doubleValue:
default:
data->Set(String::New("value"), Number::New(unitsOfMeasurement.value.doubleValue));
break;
@@ -228,7 +233,7 @@ Handle<Value> NavigationCoreConfiguration::GetUnitsOfMeasurement(const Arguments
}
void RegisterModule(Handle<Object> target) {
- NavigationCoreConfiguration::Init(target);
+ NavigationCoreConfigurationWrapper::Init(target);
}
-NODE_MODULE(NavigationCoreConfiguration, RegisterModule);
+NODE_MODULE(NavigationCoreConfigurationWrapper, RegisterModule);
diff --git a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/NavigationCoreConfiguration.hpp b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/NavigationCoreConfigurationWrapper.hpp
index 1e294cb..a0439bf 100644
--- a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/NavigationCoreConfiguration.hpp
+++ b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/NavigationCoreConfigurationWrapper.hpp
@@ -1,5 +1,9 @@
-#ifndef NAVIGATIONCORECONFIGURATION_HPP
-#define NAVIGATIONCORECONFIGURATION_HPP
+#ifndef NAVIGATIONCORECONFIGURATIONWRAPPER_HPP
+#define NAVIGATIONCORECONFIGURATIONWRAPPER_HPP
+
+#include <dbus-c++/glib-integration.h>
+#include "genivi-navigationcore-constants.h"
+#include "genivi-navigationcore-configuration_proxy.h"
#include <node.h>
#include <node_buffer.h>
@@ -45,12 +49,9 @@ public:
std::string scriptCode;
};
-
-namespace org {
-namespace genivi {
-namespace navigationcore {
-
-class Configuration_proxy
+class NavigationCoreConfigurationProxy
+ : public org::genivi::navigationcore::Configuration_proxy,
+ public DBus::ObjectProxy
{
public:
@@ -84,7 +85,10 @@ public:
typedef std::map<UnitsOfMeasurementAttribute,UnitsOfMeasurementValueStruct > UnitsOfMeasurement;
- Configuration_proxy()
+ NavigationCoreConfigurationProxy(DBus::Connection &connection)
+ : DBus::ObjectProxy(connection,
+ "/org/genivi/navigationcore/Configuration",
+ "org.genivi.navigationcore.Configuration")
{
Locale en_US { "eng","USA", "Latn" };
Locale de_DE { "deu","DEU", "Latn" };
@@ -100,6 +104,11 @@ public:
m_units_of_measurement[LENGTH] = value;
}
+ void ConfigurationChanged(const std::vector< int32_t >& changedSettings)
+ {
+
+ }
+
Version GetVersion()
{
return m_version;
@@ -131,15 +140,14 @@ private:
std::vector<Locale > m_locale_list;
UnitsOfMeasurement m_units_of_measurement;
};
-} } }
-class NavigationCoreConfiguration : public node::ObjectWrap {
+class NavigationCoreConfigurationWrapper : public node::ObjectWrap {
public:
static v8::Persistent<v8::FunctionTemplate> constructor;
static void Init(v8::Handle<v8::Object> target);
protected:
- NavigationCoreConfiguration();
+ NavigationCoreConfigurationWrapper();
static v8::Handle<v8::Value> New(const v8::Arguments& args);
static v8::Handle<v8::Value> GetVersion(const v8::Arguments& args);
@@ -151,8 +159,8 @@ protected:
static void ConfigurationChanged(const v8::Handle<v8::Function> &callback, const v8::Handle<v8::Array>& array);
- // Your own object variables here
- org::genivi::navigationcore::Configuration_proxy m_proxy;
+private:
+ NavigationCoreConfigurationProxy* mp_proxy;
};
#endif
diff --git a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/binding.gyp b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/binding.gyp
index b2b78ef..ccc85b1 100644
--- a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/binding.gyp
+++ b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/binding.gyp
@@ -1,10 +1,11 @@
{
"targets": [
{
- "target_name": "NavigationCoreConfiguration",
- "sources": [ "./NavigationCoreConfiguration.cpp" ],
- "include_dirs": ["./"],
- "cflags_cc": ["-Wall", "-std=gnu++11", "-fexceptions"]
+ "target_name": "NavigationCoreConfigurationWrapper",
+ "sources": [ "./NavigationCoreConfigurationWrapper.cpp" ],
+ "include_dirs": ["./","/usr/include/dbus-c++-1/","/usr/include/glib-2.0/","/usr/lib/i386-linux-gnu/glib-2.0/include/"],
+ "cflags_cc": ["-Wall", "-std=gnu++11", "-fexceptions"],
+ "libraries": ["-ldbus-c++-1 -ldbus-1 -ldbus-c++-glib-1", "-L/usr/lib/i386-linux-gnu/"]
}
]
diff --git a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/genivi-navigationcore-configuration_proxy.h b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/genivi-navigationcore-configuration_proxy.h
new file mode 100644
index 0000000..32caeeb
--- /dev/null
+++ b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/genivi-navigationcore-configuration_proxy.h
@@ -0,0 +1,207 @@
+
+/*
+ * This file was automatically generated by dbusxx-xml2cpp; DO NOT EDIT!
+ */
+
+#ifndef __dbusxx___home_psa_Desktop_genivi_navigation_master_src_navigation_build_dbus_include_navigation_core_genivi_navigationcore_configuration_proxy_h__PROXY_MARSHAL_H
+#define __dbusxx___home_psa_Desktop_genivi_navigation_master_src_navigation_build_dbus_include_navigation_core_genivi_navigationcore_configuration_proxy_h__PROXY_MARSHAL_H
+
+#include <dbus-c++/dbus.h>
+#include <cassert>
+
+namespace org {
+namespace genivi {
+namespace navigationcore {
+
+class Configuration_proxy
+: public ::DBus::InterfaceProxy
+{
+public:
+
+ Configuration_proxy()
+ : ::DBus::InterfaceProxy("org.genivi.navigationcore.Configuration")
+ {
+ connect_signal(Configuration_proxy, ConfigurationChanged, _ConfigurationChanged_stub);
+ }
+
+public:
+
+ /* properties exported by this interface */
+public:
+
+ /* methods exported by this interface,
+ * this functions will invoke the corresponding methods on the remote objects
+ */
+ ::DBus::Struct< uint16_t, uint16_t, uint16_t, std::string > GetVersion()
+ {
+ ::DBus::CallMessage call;
+ call.member("GetVersion");
+ ::DBus::Message ret = invoke_method (call);
+ ::DBus::MessageIter ri = ret.reader();
+
+ ::DBus::Struct< uint16_t, uint16_t, uint16_t, std::string > argout;
+ ri >> argout;
+ return argout;
+ }
+
+ void SetUnitsOfMeasurement(const std::map< int32_t, ::DBus::Struct< uint8_t, ::DBus::Variant > >& unitsOfMeasurementList)
+ {
+ ::DBus::CallMessage call;
+ ::DBus::MessageIter wi = call.writer();
+
+ wi << unitsOfMeasurementList;
+ call.member("SetUnitsOfMeasurement");
+ ::DBus::Message ret = invoke_method (call);
+ }
+
+ std::map< int32_t, ::DBus::Struct< uint8_t, ::DBus::Variant > > GetUnitsOfMeasurement()
+ {
+ ::DBus::CallMessage call;
+ call.member("GetUnitsOfMeasurement");
+ ::DBus::Message ret = invoke_method (call);
+ ::DBus::MessageIter ri = ret.reader();
+
+ std::map< int32_t, ::DBus::Struct< uint8_t, ::DBus::Variant > > argout;
+ ri >> argout;
+ return argout;
+ }
+
+ std::map< int32_t, ::DBus::Struct< uint8_t, ::DBus::Variant > > GetSupportedUnitsOfMeasurement()
+ {
+ ::DBus::CallMessage call;
+ call.member("GetSupportedUnitsOfMeasurement");
+ ::DBus::Message ret = invoke_method (call);
+ ::DBus::MessageIter ri = ret.reader();
+
+ std::map< int32_t, ::DBus::Struct< uint8_t, ::DBus::Variant > > argout;
+ ri >> argout;
+ return argout;
+ }
+
+ void SetTimeFormat(const int32_t& timeFormat)
+ {
+ ::DBus::CallMessage call;
+ ::DBus::MessageIter wi = call.writer();
+
+ wi << timeFormat;
+ call.member("SetTimeFormat");
+ ::DBus::Message ret = invoke_method (call);
+ }
+
+ int32_t GetTimeFormat()
+ {
+ ::DBus::CallMessage call;
+ call.member("GetTimeFormat");
+ ::DBus::Message ret = invoke_method (call);
+ ::DBus::MessageIter ri = ret.reader();
+
+ int32_t argout;
+ ri >> argout;
+ return argout;
+ }
+
+ std::vector< int32_t > GetSupportedTimeFormats()
+ {
+ ::DBus::CallMessage call;
+ call.member("GetSupportedTimeFormats");
+ ::DBus::Message ret = invoke_method (call);
+ ::DBus::MessageIter ri = ret.reader();
+
+ std::vector< int32_t > argout;
+ ri >> argout;
+ return argout;
+ }
+
+ void SetCoordinatesFormat(const int32_t& coordinatesFormat)
+ {
+ ::DBus::CallMessage call;
+ ::DBus::MessageIter wi = call.writer();
+
+ wi << coordinatesFormat;
+ call.member("SetCoordinatesFormat");
+ ::DBus::Message ret = invoke_method (call);
+ }
+
+ int32_t GetCoordinatesFormat()
+ {
+ ::DBus::CallMessage call;
+ call.member("GetCoordinatesFormat");
+ ::DBus::Message ret = invoke_method (call);
+ ::DBus::MessageIter ri = ret.reader();
+
+ int32_t argout;
+ ri >> argout;
+ return argout;
+ }
+
+ std::vector< int32_t > GetSupportedCoordinatesFormats()
+ {
+ ::DBus::CallMessage call;
+ call.member("GetSupportedCoordinatesFormats");
+ ::DBus::Message ret = invoke_method (call);
+ ::DBus::MessageIter ri = ret.reader();
+
+ std::vector< int32_t > argout;
+ ri >> argout;
+ return argout;
+ }
+
+ void SetLocale(const std::string& languageCode, const std::string& countryCode, const std::string& scriptCode)
+ {
+ ::DBus::CallMessage call;
+ ::DBus::MessageIter wi = call.writer();
+
+ wi << languageCode;
+ wi << countryCode;
+ wi << scriptCode;
+ call.member("SetLocale");
+ ::DBus::Message ret = invoke_method (call);
+ }
+
+ void GetLocale(std::string& languageCode, std::string& countryCode, std::string& scriptCode)
+ {
+ ::DBus::CallMessage call;
+ call.member("GetLocale");
+ ::DBus::Message ret = invoke_method (call);
+ ::DBus::MessageIter ri = ret.reader();
+
+ ri >> languageCode;
+ ri >> countryCode;
+ ri >> scriptCode;
+ }
+
+ std::vector< ::DBus::Struct< std::string, std::string, std::string > > GetSupportedLocales()
+ {
+ ::DBus::CallMessage call;
+ call.member("GetSupportedLocales");
+ ::DBus::Message ret = invoke_method (call);
+ ::DBus::MessageIter ri = ret.reader();
+
+ std::vector< ::DBus::Struct< std::string, std::string, std::string > > argout;
+ ri >> argout;
+ return argout;
+ }
+
+
+public:
+
+ /* signal handlers for this interface
+ */
+ virtual void ConfigurationChanged(const std::vector< int32_t >& changedSettings) = 0;
+
+private:
+
+ /* unmarshalers (to unpack the DBus message before calling the actual signal handler)
+ */
+ void _ConfigurationChanged_stub(const ::DBus::SignalMessage &sig)
+ {
+ ::DBus::MessageIter ri = sig.reader();
+
+ std::vector< int32_t > changedSettings;
+ ri >> changedSettings;
+ ConfigurationChanged(changedSettings);
+ }
+};
+
+} } }
+#endif //__dbusxx___home_psa_Desktop_genivi_navigation_master_src_navigation_build_dbus_include_navigation_core_genivi_navigationcore_configuration_proxy_h__PROXY_MARSHAL_H
diff --git a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/genivi-navigationcore-constants.h b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/genivi-navigationcore-constants.h
new file mode 100644
index 0000000..905d3be
--- /dev/null
+++ b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/genivi-navigationcore-constants.h
@@ -0,0 +1,198 @@
+
+/* This is an automatically generated file, do not edit */
+
+enum GENIVI_NAVIGATIONCORE_Constants {
+ GENIVI_NAVIGATIONCORE_INVALID = 0x0000,
+ GENIVI_NAVIGATIONCORE_DEFAULT = 0xfffe,
+ GENIVI_NAVIGATIONCORE_ALL = 0xffff,
+ GENIVI_NAVIGATIONCORE_AVAILABLE = 0x0001,
+ GENIVI_NAVIGATIONCORE_NOT_AVAILABLE = 0x0002,
+ GENIVI_NAVIGATIONCORE_TIME_FORMAT = 0x0003,
+ GENIVI_NAVIGATIONCORE_12H = 0x0004,
+ GENIVI_NAVIGATIONCORE_24H = 0x0005,
+ GENIVI_NAVIGATIONCORE_COORDINATES_FORMAT = 0x0006,
+ GENIVI_NAVIGATIONCORE_DEGREES = 0x0007,
+ GENIVI_NAVIGATIONCORE_MINUTES = 0x0008,
+ GENIVI_NAVIGATIONCORE_SECONDS = 0x0009,
+ GENIVI_NAVIGATIONCORE_TIMESTAMP = 0x0010,
+ GENIVI_NAVIGATIONCORE_TIMEZONE_OFFSET = 0x0011,
+ GENIVI_NAVIGATIONCORE_DAYLIGHT_OFFSET = 0x0012,
+ GENIVI_NAVIGATIONCORE_LOCALE = 0x0025,
+ GENIVI_NAVIGATIONCORE_UNITS_OF_MEASUREMENT = 0x0030,
+ GENIVI_NAVIGATIONCORE_LENGTH = 0x0031,
+ GENIVI_NAVIGATIONCORE_METER = 0x0032,
+ GENIVI_NAVIGATIONCORE_MILE = 0x0033,
+ GENIVI_NAVIGATIONCORE_KM = 0x0034,
+ GENIVI_NAVIGATIONCORE_YARD = 0x0035,
+ GENIVI_NAVIGATIONCORE_FOOT = 0x0036,
+ GENIVI_NAVIGATIONCORE_DISABLED_PROMPT = 0x0041,
+ GENIVI_NAVIGATIONCORE_AUTOMATIC_PROMPT = 0x0042,
+ GENIVI_NAVIGATIONCORE_MANUAL_PROMPT = 0x0043,
+ GENIVI_NAVIGATIONCORE_CRUISE = 0x0050,
+ GENIVI_NAVIGATIONCORE_MANEUVER_APPEARED = 0x0051,
+ GENIVI_NAVIGATIONCORE_PRE_ADVICE = 0x0052,
+ GENIVI_NAVIGATIONCORE_ADVICE = 0x0053,
+ GENIVI_NAVIGATIONCORE_PASSED = 0x0054,
+ GENIVI_NAVIGATIONCORE_ACTIVE = 0x0060,
+ GENIVI_NAVIGATIONCORE_INACTIVE = 0x0061,
+ GENIVI_NAVIGATIONCORE_STRAIGHT_ON = 0x0070,
+ GENIVI_NAVIGATIONCORE_CROSSROAD = 0x0071,
+ GENIVI_NAVIGATIONCORE_ROUNDABOUT = 0x0072,
+ GENIVI_NAVIGATIONCORE_HIGHWAY_ENTER = 0x0073,
+ GENIVI_NAVIGATIONCORE_HIGHWAY_EXIT = 0x0074,
+ GENIVI_NAVIGATIONCORE_FOLLOW_SPECIFIC_LANE = 0x0075,
+ GENIVI_NAVIGATIONCORE_DESTINATION = 0x0076,
+ GENIVI_NAVIGATIONCORE_WAYPOINT = 0x0077,
+ GENIVI_NAVIGATIONCORE_TURN = 0x0078,
+ GENIVI_NAVIGATIONCORE_BIFURCATION = 0x0079,
+ GENIVI_NAVIGATIONCORE_LEFT = 0x0080,
+ GENIVI_NAVIGATIONCORE_SLIGHT_LEFT = 0x0081,
+ GENIVI_NAVIGATIONCORE_HARD_LEFT = 0x0082,
+ GENIVI_NAVIGATIONCORE_RIGHT = 0x0083,
+ GENIVI_NAVIGATIONCORE_SLIGHT_RIGHT = 0x0084,
+ GENIVI_NAVIGATIONCORE_HARD_RIGHT = 0x0085,
+ GENIVI_NAVIGATIONCORE_UTURN_RIGHT = 0x0086,
+ GENIVI_NAVIGATIONCORE_UTURN_LEFT = 0x0087,
+ GENIVI_NAVIGATIONCORE_ALL_MANUAL = 0x0090,
+ GENIVI_NAVIGATIONCORE_ALL_AUTOMATIC = 0x0091,
+ GENIVI_NAVIGATIONCORE_TRAFFIC_MANUAL = 0x0092,
+ GENIVI_NAVIGATIONCORE_OFF_ROUTE_MANUAL = 0x0093,
+ GENIVI_NAVIGATIONCORE_LATITUDE = 0x00a0,
+ GENIVI_NAVIGATIONCORE_LONGITUDE = 0x00a1,
+ GENIVI_NAVIGATIONCORE_ALTITUDE = 0x00a2,
+ GENIVI_NAVIGATIONCORE_HEADING = 0x00a3,
+ GENIVI_NAVIGATIONCORE_SPEED = 0x00a4,
+ GENIVI_NAVIGATIONCORE_CLIMB = 0x00a5,
+ GENIVI_NAVIGATIONCORE_COUNTRY = 0x00a6,
+ GENIVI_NAVIGATIONCORE_STATE = 0x00a7,
+ GENIVI_NAVIGATIONCORE_CITY = 0x00a8,
+ GENIVI_NAVIGATIONCORE_ZIPCODE = 0x00a9,
+ GENIVI_NAVIGATIONCORE_STREET = 0x00aa,
+ GENIVI_NAVIGATIONCORE_HOUSENUMBER = 0x00ab,
+ GENIVI_NAVIGATIONCORE_CROSSING = 0x00ac,
+ GENIVI_NAVIGATIONCORE_DISTRICT = 0x00ad,
+ GENIVI_NAVIGATIONCORE_PHONENUMBER = 0x00ae,
+ GENIVI_NAVIGATIONCORE_POINAME = 0x00af,
+ GENIVI_NAVIGATIONCORE_TOWNCENTER = 0x00b0,
+ GENIVI_NAVIGATIONCORE_LOCATION_INPUT = 0x00b1,
+ GENIVI_NAVIGATIONCORE_FULL_ADDRESS = 0x00b2,
+ GENIVI_NAVIGATIONCORE_COUNTRYCODE = 0x00b3,
+ GENIVI_NAVIGATIONCORE_HOUSENAME = 0x00b4,
+ GENIVI_NAVIGATIONCORE_POSTAL_CODE = 0x00b5,
+ GENIVI_NAVIGATIONCORE_NOT_STARTED = 0x0c0,
+ GENIVI_NAVIGATIONCORE_SEARCHING = 0x00c1,
+ GENIVI_NAVIGATIONCORE_FINISHED = 0x00c2,
+ GENIVI_NAVIGATIONCORE_OK = 0x00d0,
+ GENIVI_NAVIGATIONCORE_UNKNOWN = 0x00d1,
+ GENIVI_NAVIGATIONCORE_AMBIGUOUS = 0x00d2,
+ GENIVI_NAVIGATIONCORE_INCONSISTENT = 0x00d3,
+ GENIVI_NAVIGATIONCORE_GNSS_FIX_STATUS = 0x00e0,
+ GENIVI_NAVIGATIONCORE_DR_STATUS = 0x00e1,
+ GENIVI_NAVIGATIONCORE_MM_STATUS = 0x00e2,
+ GENIVI_NAVIGATIONCORE_SIMULATION_MODE = 0x00e3,
+ GENIVI_NAVIGATIONCORE_MATCH_TYPE = 0x00f0,
+ GENIVI_NAVIGATIONCORE_ON_ROAD = 0x00f1,
+ GENIVI_NAVIGATIONCORE_OFF_ROAD = 0x00f2,
+ GENIVI_NAVIGATIONCORE_ON_FERRY = 0x00f3,
+ GENIVI_NAVIGATIONCORE_IN_TUNNEL = 0x00f4,
+ GENIVI_NAVIGATIONCORE_ON_CARPARK = 0x00f5,
+ GENIVI_NAVIGATIONCORE_NO_FIX = 0x0100,
+ GENIVI_NAVIGATIONCORE_TIME_FIX = 0x0101,
+ GENIVI_NAVIGATIONCORE_2D_FIX = 0x0102,
+ GENIVI_NAVIGATIONCORE_3D_FIX = 0x0103,
+ GENIVI_NAVIGATIONCORE_SEGMENT_ID = 0x0110,
+ GENIVI_NAVIGATIONCORE_DIRECTION_ON_SEGMENT = 0x0112,
+ GENIVI_NAVIGATIONCORE_DISTANCE_ON_SEGMENT = 0x0113,
+ GENIVI_NAVIGATIONCORE_INTERMEDIATE_POINTS = 0x0120,
+ GENIVI_NAVIGATIONCORE_WAYPOINT_TYPE = 0x0121,
+ GENIVI_NAVIGATIONCORE_SOFT_POINT = 0x0122,
+ GENIVI_NAVIGATIONCORE_HARD_POINT = 0x0123,
+ GENIVI_NAVIGATIONCORE_CALCULATION_OK = 0x0130,
+ GENIVI_NAVIGATIONCORE_NO_POSITION = 0x0131,
+ GENIVI_NAVIGATIONCORE_UNMATCHED_POSITION = 0x0132,
+ GENIVI_NAVIGATIONCORE_UNREACHABLE_DESTINATION = 0x0133,
+ GENIVI_NAVIGATIONCORE_UNFULFILLED_PREFERENCE_MODE = 0x0134,
+ GENIVI_NAVIGATIONCORE_LINK_ID = 0x0140,
+ GENIVI_NAVIGATIONCORE_START_LATITUDE = 0x0141,
+ GENIVI_NAVIGATIONCORE_END_LATITUDE = 0x0142,
+ GENIVI_NAVIGATIONCORE_START_LONGITUDE = 0x0143,
+ GENIVI_NAVIGATIONCORE_END_LONGITUDE = 0x0144,
+ GENIVI_NAVIGATIONCORE_START_ALTITUDE = 0x0145,
+ GENIVI_NAVIGATIONCORE_END_ALTITUDE = 0x0146,
+ GENIVI_NAVIGATIONCORE_ROAD_NAME = 0x0147,
+ GENIVI_NAVIGATIONCORE_DISTANCE = 0x0148,
+ GENIVI_NAVIGATIONCORE_TIME = 0x0149,
+ GENIVI_NAVIGATIONCORE_MANEUVER = 0x014a,
+ GENIVI_NAVIGATIONCORE_INSTRUCTION = 0x014b,
+ GENIVI_NAVIGATIONCORE_BORDER_CROSSING = 0x014c,
+ GENIVI_NAVIGATIONCORE_ADDITIONAL_INFORMATION = 0x014d,
+ GENIVI_NAVIGATIONCORE_ROAD_NUMBER = 0x014e,
+ GENIVI_NAVIGATIONCORE_START_OFFSET = 0x014f,
+ GENIVI_NAVIGATIONCORE_FASTEST = 0x0160,
+ GENIVI_NAVIGATIONCORE_SHORTEST = 0x0161,
+ GENIVI_NAVIGATIONCORE_ECOLOGICAL = 0x0162,
+ GENIVI_NAVIGATIONCORE_SCENIC = 0x0163,
+ GENIVI_NAVIGATIONCORE_EASY = 0x0164,
+ GENIVI_NAVIGATIONCORE_BALANCED = 0x0166,
+ GENIVI_NAVIGATIONCORE_CHEAPEST = 0x0167,
+ GENIVI_NAVIGATIONCORE_FERRY = 0x0170,
+ GENIVI_NAVIGATIONCORE_TOLL_ROADS = 0x0171,
+ GENIVI_NAVIGATIONCORE_TUNNELS = 0x0172,
+ GENIVI_NAVIGATIONCORE_HIGHWAYS_MOTORWAYS = 0x0173,
+ GENIVI_NAVIGATIONCORE_VEHICLE_SIZE_LIMIT = 0x0174,
+ GENIVI_NAVIGATIONCORE_CRIME_AREAS = 0x0175,
+ GENIVI_NAVIGATIONCORE_BY_CAR = 0x0180,
+ GENIVI_NAVIGATIONCORE_ON_FOOT = 0x0181,
+ GENIVI_NAVIGATIONCORE_LONG_RANGE_TRAINS = 0x0182,
+ GENIVI_NAVIGATIONCORE_PUBLIC_TRANSPORTATION = 0x0183,
+ GENIVI_NAVIGATIONCORE_BY_BICYCLE = 0x0184,
+ GENIVI_NAVIGATIONCORE_BY_TRUCK = 0x0185,
+ GENIVI_NAVIGATIONCORE_BLOCK_NUMBER = 0x0186,
+ GENIVI_NAVIGATIONCORE_UNIT_NUMBER = 0x0187,
+ GENIVI_NAVIGATIONCORE_BEGIN_STREET = 0x0188,
+ GENIVI_NAVIGATIONCORE_ROAD_INTERSECTION = 0x0189,
+ GENIVI_NAVIGATIONCORE_ARRIVAL_TIME = 0x018a,
+ GENIVI_NAVIGATIONCORE_ARRIVAL_DATE = 0x018b,
+ GENIVI_NAVIGATIONCORE_DEPARTURE_TIME = 0x018c,
+ GENIVI_NAVIGATIONCORE_DEPARTURE_DATE = 0x018d,
+ GENIVI_NAVIGATIONCORE_TOTAL_TIME = 0x018e,
+ GENIVI_NAVIGATIONCORE_TOTAL_DISTANCE = 0x018f,
+ GENIVI_NAVIGATIONCORE_PROHIBIT = 0x0190,
+ GENIVI_NAVIGATIONCORE_AVOID = 0x0191,
+ GENIVI_NAVIGATIONCORE_USE = 0x0192,
+ GENIVI_NAVIGATIONCORE_PREFER = 0x0193,
+ GENIVI_NAVIGATIONCORE_IGNORE = 0x0194,
+ GENIVI_NAVIGATIONCORE_TRAFFIC_REALTIME = 0x0200,
+ GENIVI_NAVIGATIONCORE_TRAFFIC = 0x0210,
+ GENIVI_NAVIGATIONCORE_OFF_ROUTE = 0x0211,
+ GENIVI_NAVIGATIONCORE_MANUAL = 0x0212,
+ GENIVI_NAVIGATIONCORE_SIMULATION_STATUS_NO_SIMULATION = 0x0220,
+ GENIVI_NAVIGATIONCORE_SIMULATION_STATUS_RUNNING = 0x0221,
+ GENIVI_NAVIGATIONCORE_SIMULATION_STATUS_PAUSED = 0x0222,
+ GENIVI_NAVIGATIONCORE_SIMULATION_STATUS_FIXED_POSITION = 0x0223,
+ GENIVI_NAVIGATIONCORE_ROAD_FORM_CHANGE = 0x0230,
+ GENIVI_NAVIGATIONCORE_ROAD_REGULAR = 0x0231,
+ GENIVI_NAVIGATIONCORE_ROAD_HIGHWAY_MOTORWAY = 0x0232,
+ GENIVI_NAVIGATIONCORE_ROAD_FERRY = 0x0233,
+ GENIVI_NAVIGATIONCORE_DIRECTION = 0x0240,
+ GENIVI_NAVIGATIONCORE_EXIT_NUMBER = 0x0241,
+ GENIVI_NAVIGATIONCORE_ROAD_FORM = 0x0242,
+ GENIVI_NAVIGATIONCORE_LANE_INFO = 0x0243,
+ GENIVI_NAVIGATIONCORE_LANE_INFO_BITMASK_STRAIGHT = 0x0001,
+ GENIVI_NAVIGATIONCORE_LANE_INFO_BITMASK_SLIGHTRIGHT = 0x0002,
+ GENIVI_NAVIGATIONCORE_LANE_INFO_BITMASK_RIGHT = 0x0004,
+ GENIVI_NAVIGATIONCORE_LANE_INFO_BITMASK_SHARPRIGHT = 0x0008,
+ GENIVI_NAVIGATIONCORE_LANE_INFO_BITMASK_RIGHTUTURN = 0x0010,
+ GENIVI_NAVIGATIONCORE_LANE_INFO_BITMASK_SLIGHTLEFT = 0x0020,
+ GENIVI_NAVIGATIONCORE_LANE_INFO_BITMASK_LEFT = 0x0040,
+ GENIVI_NAVIGATIONCORE_LANE_INFO_BITMASK_SHARPLEFT = 0x0080,
+ GENIVI_NAVIGATIONCORE_LANE_INFO_BITMASK_LEFTUTURN = 0x0100,
+ GENIVI_NAVIGATIONCORE_DIVIDER_UNDEFINED = 0x0250,
+ GENIVI_NAVIGATIONCORE_DIVIDER_INTERRUPTEDLONG = 0x0251,
+ GENIVI_NAVIGATIONCORE_DIVIDER_INTERRUPTEDSHORT = 0x0252,
+ GENIVI_NAVIGATIONCORE_DIVIDER_SOLIDSINGLE = 0x0253,
+ GENIVI_NAVIGATIONCORE_DIVIDER_SOLIDDOUBLE = 0x0254,
+ GENIVI_NAVIGATIONCORE_DIVIDER_SOLIDINTERRUPTED = 0x0255,
+ GENIVI_NAVIGATIONCORE_DIVIDER_INTERRUPTEDSOLID = 0x0256,
+};
+ \ No newline at end of file
diff --git a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/package.json b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/package.json
index 6064421..9fd3d53 100644
--- a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/package.json
+++ b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/package.json
@@ -10,7 +10,7 @@
],
"author": "Philippe Colliot <philippe.colliot@mpsa.com>",
"contributors": [""],
- "main": "./build/Release/NavigationCoreConfiguration",
+ "main": "./build/Release/NavigationCoreConfigurationWrapper",
"license": "MPL V.2.0",
"devDependencies": {
"chai": "~3.5.0",
diff --git a/test/navigation/w3c/socket-based-poc/server.js b/test/navigation/w3c/socket-based-poc/server.js
index 8d5fa3b..421d437 100644
--- a/test/navigation/w3c/socket-based-poc/server.js
+++ b/test/navigation/w3c/socket-based-poc/server.js
@@ -16,10 +16,10 @@ var tree = webidl2.parse(file.toString());
//console.log(escodegen.generate(tree));
// Requirements of LBS add-on modules
-var navigationCoreConfiguration = require(resource.generatedNodejsModulePath+'/NavigationCoreConfiguration');
+var navigationCoreConfigurationWrapper = require(resource.generatedNodejsModulePath+'/NavigationCoreConfigurationWrapper');
// Create instances
-var i_navigationCoreConfiguration = new navigationCoreConfiguration.NavigationCoreConfiguration();
+var i_navigationCoreConfiguration = new navigationCoreConfigurationWrapper.NavigationCoreConfigurationWrapper();
// Create and init server
var port = 8080;