option(qtmainloop "Use QCoreApplication mainloop " OFF)
option(websocket_plugin "websocket source and sink plugins" OFF)
-option(websocketsink_plugin "old websocket sink plugin" OFF)
+option(websocketold_plugin "old websocket sink plugin" OFF)
option(tpms_plugin "TPMS plugin " OFF)
option(obd2_plugin "OBD-II plugin" OFF)
option(database_plugin "Database plugins" OFF)
auto itr = mMasterPropertyList.begin();
while(itr != mMasterPropertyList.end())
{
- if(itr->second == property) {
+ VehicleProperty::Property prop = itr->second;
+ if(prop == property) {
AbstractSource* src = itr->first;
src->subscribeToPropertyChanges(property);
// Move to next source. It will skip all the remaining properties in this source.
}
}
- if(subscribed)
- propertySinkMap[property].emplace(sink, std::string(""));
+ //if(subscribed)
+ propertySinkMap[property].emplace(sink, std::string(""));
return subscribed;
}
// Subscribe to property in a new source if such property was subscribed. This catches newly supported properties in the process.
//
// TODO: is this sufficient to:
- /// Iterate through subscribed properties and resubscribe. This catches newly supported properties in the process.
+ // Iterate through subscribed properties and resubscribe. This catches newly supported properties in the process.
// which was originally located at the end of the setSupported and updateSupported functions? I think it is sufficient.
if( propertySinkMap.find(property) != propertySinkMap.end()){
source->subscribeToPropertyChanges(property);
{
"name" : "ExampleSouce",
"path" : "/usr/lib/automotive-message-broker/examplesourceplugin.so",
- "delay" : "6"
+ "delay" : "1000"
}
],
"sinks": [
{
"name" : "WebSocketSink",
- "path" : "/usr/lib/automotive-message-broker/websocketsinkplugin.so",
- "interface" : "lo",
+ "path" : "/usr/lib/automotive-message-broker/websocketsink.so",
+ "interface" : "eth1",
"ssl" : "false",
"port" : "23000",
"binaryProtocol" : "false"
"path" : "/usr/lib/automotive-message-broker/websocketsource.so",
"port" : "23000",
"ssl" : "false",
- "ip" : "127.0.0.1",
+ "ip" : "192.168.1.40",
"binaryProtocol" : "false"
}
],
}
void WebSocketSource::setSupported(PropertyList list)
{
- DebugOut() <<__SMALLFILE__ << ":" << __LINE__ <<"SET SUPPORTED"<<endl;
+ DebugOut() <<__SMALLFILE__ << ":" << __LINE__ <<" "<< __FUNCTION__ <<endl;
m_supportedProperties = list;
m_re->updateSupported(list,PropertyList(),this);
}
-if(websocketsink_plugin)
+if(websocketold_plugin)
include(CheckIncludeFiles)
include_directories(${CMAKE_SOURCE_DIR}/lib ${include_dirs})
install(TARGETS websocketsinkplugin LIBRARY DESTINATION lib${LIB_SUFFIX}/automotive-message-broker)
-endif(websocketsink_plugin)
+endif(websocketold_plugin)