"sources" : [
{
"name" : "WebsocketSource",
- "path" : "/usr/lib/automotive-message-broker/websocketsourceplugin.so",
+ "path" : "/usr/lib/automotive-message-broker/websocketsource.so",
"port" : "23000",
"ssl" : "false",
"ip" : "127.0.0.1",
- "binaryProtocol" : "true"
+ "binaryProtocol" : "false"
}
],
"sinks": [
--- /dev/null
+DBus plugin
+
+This plugin provides a nice DBus API to application who want access to AMB data.
+
+To use the DBus plugin, add the following to the "sinks" array in /etc/ambd/config:
+
+{
+ "name" : "dbussink",
+ "path" : "/usr/lib/automotive-message-broker/dbussinkplugin.so",
+ "frequency" : "60"
+}
+
+Configuration Key Definitions:
+
+"name"
+name of plugin. This key is not used by the plugin at this moment.
+
+"path"
+path to plugin on the filesystem.
+
+"frequency"
+Frequency in Hz which AMB will fire dbus signals. AMB will fire the most recent values at this rate.
+
+Default: 60
+
for(auto itr = interfaces.begin(); itr != interfaces.end(); itr++)
{
AbstractDBusInterface* t = *itr;
+
if(t->zone() == (Zone::Type)zone)
{
+ if(!t->isRegistered())
+ t->registerObject();
+
+ std::list<std::string> processes = manager->subscribedProcesses[t];
+
+ if(!contains(processes,sender))
+ {
+ DebugOut()<<"Referencing "<<t->objectPath()<<" with sender: "<<sender<<endl;
+ manager->subscribedProcesses[t].push_back(sender);
+ }
+
g_dbus_method_invocation_return_value(invocation,g_variant_new("(o)", t->objectPath().c_str()));
return;
}
boost::algorithm::erase_all(targetSource, "-");
if(t->zone() == (Zone::Type)zone && source == targetSource)
{
+ if(!t->isRegistered())
+ t->registerObject();
+
+ std::list<std::string> processes = manager->subscribedProcesses[t];
+
+ if(!contains(processes,sender))
+ {
+ DebugOut()<<"Referencing "<<t->objectPath()<<" with sender: "<<sender<<endl;
+ manager->subscribedProcesses[t].push_back(sender);
+ }
+
g_dbus_method_invocation_return_value(invocation,g_variant_new("(o)", t->objectPath().c_str()));
return;
}