Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
dcdb
dcdb
Commits
0983d521
Commit
0983d521
authored
Jul 17, 2013
by
Axel Auweter
Browse files
W.I.P. 2
parent
db5f42c5
Changes
3
Hide whitespace changes
Inline
Side-by-side
CollectAgent/collectagent.cpp
View file @
0983d521
...
...
@@ -70,6 +70,8 @@ void mqttCallback(SimpleMQTTMessage *msg)
uint64_t
ts
=
diff
.
total_nanoseconds
();
uint32_t
sid
=
msgCtr
;
msg
->
dump
();
#if 0
key = convert(&sid, sizeof(msgCtr));
name = convert(&ts, sizeof(ts));
...
...
@@ -165,7 +167,7 @@ int main(void) {
if
(
sensordataCf
<
0
)
{
cout
<<
"Creating sensordata column familiy...
\n
"
;
query
=
"CREATE TABLE sensordata ( sid int, ts bigint, value
floa
t, PRIMARY KEY (sid, ts)) WITH COMPACT STORAGE;"
;
query
=
"CREATE TABLE sensordata ( sid
big
int, ts bigint, value
bigin
t, PRIMARY KEY (sid, ts)) WITH COMPACT STORAGE;"
;
cout
<<
"Sending CQL statement: "
<<
query
;
myClient
->
execute_cql3_query
(
res
,
query
,
Compression
::
NONE
,
ConsistencyLevel
::
ONE
);
cout
<<
" --> Success!
\n
"
;
...
...
CollectAgent/simplemqttserver.h
View file @
0983d521
...
...
@@ -65,7 +65,7 @@
/*
* Enable verbose output of the MQTT server.
*/
#define SimpleMQTTVerbose
//
#define SimpleMQTTVerbose
#include "simplemqttservermessage.h"
typedef
void
(
*
SimpleMQTTMessageCallback
)(
SimpleMQTTMessage
*
);
...
...
CollectAgent/simplemqttservermessage.h
View file @
0983d521
...
...
@@ -64,6 +64,7 @@ public:
ssize_t
appendRawData
(
void
*
buf
,
size_t
len
);
bool
complete
();
bool
isPublish
();
// std::string getTopic();
void
dump
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment