projects
/
profile
/
ivi
/
automotive-message-broker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5be7583
)
fixed some compiler errors. disabled qscript agent
author
Kevron Rees
<tripzero.kev@gmail.com>
Thu, 12 Sep 2013 15:14:32 +0000
(08:14 -0700)
committer
Kevron Rees
<tripzero.kev@gmail.com>
Thu, 12 Sep 2013 15:14:32 +0000
(08:14 -0700)
examples/bluemonkey/bluemonkeyconfig
patch
|
blob
|
history
examples/opencvluxconfig
patch
|
blob
|
history
lib/debugout.cpp
patch
|
blob
|
history
lib/debugout.h
patch
|
blob
|
history
plugins/bluemonkey/bluemonkey.cpp
patch
|
blob
|
history
plugins/gpsnmea/gpsnmea.cpp
patch
|
blob
|
history
plugins/gpsnmea/gpsnmea.h
patch
|
blob
|
history
plugins/openxc/openxcplugin.cpp
patch
|
blob
|
history
plugins/openxc/openxcplugin.h
patch
|
blob
|
history
diff --git
a/examples/bluemonkey/bluemonkeyconfig
b/examples/bluemonkey/bluemonkeyconfig
index
e6db4f7
..
0c15bef
100644
(file)
--- a/
examples/bluemonkey/bluemonkeyconfig
+++ b/
examples/bluemonkey/bluemonkeyconfig
@@
-3,7
+3,7
@@
"sources" : [
{
"sources" : [
{
- "path" : "/usr/lib/automotive-message-broker/
murphy
sourceplugin.so"
+ "path" : "/usr/lib/automotive-message-broker/
example
sourceplugin.so"
}
],
"sinks": [
}
],
"sinks": [
diff --git
a/examples/opencvluxconfig
b/examples/opencvluxconfig
index
27b6cd7
..
b348e4b
100644
(file)
--- a/
examples/opencvluxconfig
+++ b/
examples/opencvluxconfig
@@
-7,7
+7,7
@@
"threaded" : "true",
"kinect" : "false",
"opencl" : "false",
"threaded" : "true",
"kinect" : "false",
"opencl" : "false",
- "cuda" : "
fals
e",
+ "cuda" : "
tru
e",
"pixelLowerBound" : "0",
"pixelUpperBound" : "255",
"fps" : "30",
"pixelLowerBound" : "0",
"pixelUpperBound" : "255",
"fps" : "30",
diff --git
a/lib/debugout.cpp
b/lib/debugout.cpp
index
102de07
..
ee7fa8b
100644
(file)
--- a/
lib/debugout.cpp
+++ b/
lib/debugout.cpp
@@
-28,5
+28,5
@@
const int DebugOut::Warning = 1 << 24;
void debugOut(string message)
{
void debugOut(string message)
{
- DebugOut()<<"DEBUG: "<<message<<endl;
+ DebugOut()<<"DEBUG: "<<message
.c_str()
<<endl;
}
}
diff --git
a/lib/debugout.h
b/lib/debugout.h
index
660fbfb
..
ce6f038
100644
(file)
--- a/
lib/debugout.h
+++ b/
lib/debugout.h
@@
-23,7
+23,6
@@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include <iostream>
#include <fstream>
#include <sstream>
#include <iostream>
#include <fstream>
#include <sstream>
-
#include "timestamp.h"
using namespace std;
#include "timestamp.h"
using namespace std;
@@
-53,7
+52,6
@@
public:
out<<"WARNING ";
}
}
out<<"WARNING ";
}
}
-
DebugOut const& operator << (string message) const
{
if(mDebugLevel <= debugThreshhold || mDebugLevel == Error || mDebugLevel == Warning)
DebugOut const& operator << (string message) const
{
if(mDebugLevel <= debugThreshhold || mDebugLevel == Error || mDebugLevel == Warning)
diff --git
a/plugins/bluemonkey/bluemonkey.cpp
b/plugins/bluemonkey/bluemonkey.cpp
index
6ee363e
..
c57eba2
100644
(file)
--- a/
plugins/bluemonkey/bluemonkey.cpp
+++ b/
plugins/bluemonkey/bluemonkey.cpp
@@
-93,13
+93,13
@@
BluemonkeySink::BluemonkeySink(AbstractRoutingEngine* e, map<string, string> con
{
irc = new IrcCommunication(config, this);
{
irc = new IrcCommunication(config, this);
-
reloadEngine(
);
+
QTimer::singleShot(1,this,SLOT(reloadEngine())
);
auth = new Authenticate(config, this);
connect(irc, &IrcCommunication::message, [&](QString sender, QString prefix, QString codes ) {
auth = new Authenticate(config, this);
connect(irc, &IrcCommunication::message, [&](QString sender, QString prefix, QString codes ) {
- if(codes.
contains
("authenticate"))
+ if(codes.
startsWith
("authenticate"))
{
int i = codes.indexOf("authenticate");
{
int i = codes.indexOf("authenticate");
@@
-185,17
+185,6
@@
bool BluemonkeySink::authenticate(QString pass)
void BluemonkeySink::loadConfig(QString str)
{
void BluemonkeySink::loadConfig(QString str)
{
- configsToLoad.append(str);
- QTimer::singleShot(1,this,SLOT(loadConfigPriv()));
-}
-
-void BluemonkeySink::loadConfigPriv()
-{
- if(!configsToLoad.count()) return;
-
- QString str = configsToLoad.first();
- configsToLoad.pop_front();
-
QFile file(str);
if(!file.open(QIODevice::ReadOnly))
{
QFile file(str);
if(!file.open(QIODevice::ReadOnly))
{
@@
-207,7
+196,7
@@
void BluemonkeySink::loadConfigPriv()
file.close();
file.close();
- DebugOut()<<"evaluating script: "<<script.toStdString();
+ DebugOut()<<"evaluating script: "<<script.toStdString()
<<endl
;
QScriptValue val = engine->evaluate(script);
QScriptValue val = engine->evaluate(script);
@@
-225,7
+214,7
@@
void BluemonkeySink::reloadEngine()
agent = new BluemonkeyAgent(engine);
agent = new BluemonkeyAgent(engine);
- engine->setAgent(agent);
+
//
engine->setAgent(agent);
QScriptValue value = engine->newQObject(this);
engine->globalObject().setProperty("bluemonkey", value);
QScriptValue value = engine->newQObject(this);
engine->globalObject().setProperty("bluemonkey", value);
@@
-241,6
+230,13
@@
void BluemonkeySink::reloadEngine()
void BluemonkeySink::writeProgram(QString program)
{
void BluemonkeySink::writeProgram(QString program)
{
+ QScriptSyntaxCheckResult result = QScriptEngine::checkSyntax(program);
+ if(result.state() != QScriptSyntaxCheckResult::Valid)
+ {
+ DebugOut(DebugOut::Error)<<"Syntax error in program: "<<result.errorMessage().toStdString()<<endl;
+ return;
+ }
+
QFile file(configuration["customPrograms"].c_str());
if(!file.open(QIODevice::ReadWrite | QIODevice::Append))
QFile file(configuration["customPrograms"].c_str());
if(!file.open(QIODevice::ReadWrite | QIODevice::Append))
diff --git
a/plugins/gpsnmea/gpsnmea.cpp
b/plugins/gpsnmea/gpsnmea.cpp
index
c0a1ce8
..
1bebf7c
100644
(file)
--- a/
plugins/gpsnmea/gpsnmea.cpp
+++ b/
plugins/gpsnmea/gpsnmea.cpp
@@
-380,7
+380,7
@@
GpsNmeaSource::~GpsNmeaSource()
device->close();
}
device->close();
}
-string GpsNmeaSource::uuid()
+
const
string GpsNmeaSource::uuid()
{
return mUuid;
}
{
return mUuid;
}
diff --git
a/plugins/gpsnmea/gpsnmea.h
b/plugins/gpsnmea/gpsnmea.h
index
456e4ea
..
c260604
100644
(file)
--- a/
plugins/gpsnmea/gpsnmea.h
+++ b/
plugins/gpsnmea/gpsnmea.h
@@
-35,7
+35,7
@@
public:
GpsNmeaSource(AbstractRoutingEngine* re, map<string, string> config);
~GpsNmeaSource();
GpsNmeaSource(AbstractRoutingEngine* re, map<string, string> config);
~GpsNmeaSource();
- string uuid();
+
const
string uuid();
void getPropertyAsync(AsyncPropertyReply *reply);
void getRangePropertyAsync(AsyncRangePropertyReply *reply);
AsyncPropertyReply * setProperty(AsyncSetPropertyRequest request);
void getPropertyAsync(AsyncPropertyReply *reply);
void getRangePropertyAsync(AsyncRangePropertyReply *reply);
AsyncPropertyReply * setProperty(AsyncSetPropertyRequest request);
diff --git
a/plugins/openxc/openxcplugin.cpp
b/plugins/openxc/openxcplugin.cpp
index
94ce8eb
..
75c7548
100644
(file)
--- a/
plugins/openxc/openxcplugin.cpp
+++ b/
plugins/openxc/openxcplugin.cpp
@@
-121,7
+121,7
@@
extern "C" AbstractSource * create(AbstractRoutingEngine* routingengine, map<str
}
}
-string OpenXCPlugin::uuid()
+
const
string OpenXCPlugin::uuid()
{
return "openxc";
}
{
return "openxc";
}
diff --git
a/plugins/openxc/openxcplugin.h
b/plugins/openxc/openxcplugin.h
index
ec44999
..
86dc9ae
100644
(file)
--- a/
plugins/openxc/openxcplugin.h
+++ b/
plugins/openxc/openxcplugin.h
@@
-31,7
+31,7
@@
class OpenXCPlugin: public AbstractSource
public:
OpenXCPlugin(AbstractRoutingEngine* re, map<string, string> config);
public:
OpenXCPlugin(AbstractRoutingEngine* re, map<string, string> config);
- string uuid();
+
const
string uuid();
void getPropertyAsync(AsyncPropertyReply *reply);
void getRangePropertyAsync(AsyncRangePropertyReply *reply);
AsyncPropertyReply * setProperty(AsyncSetPropertyRequest request);
void getPropertyAsync(AsyncPropertyReply *reply);
void getRangePropertyAsync(AsyncRangePropertyReply *reply);
AsyncPropertyReply * setProperty(AsyncSetPropertyRequest request);