Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
generators
EMAM2MQTT
Commits
70cb1fb0
Commit
70cb1fb0
authored
Jun 07, 2019
by
Georg Vinogradov
Browse files
Send double message instead of str
parent
a8845022
Changes
1
Hide whitespace changes
Inline
Side-by-side
mqtt_adapter/MqttAdapter_tests_a_compA.cpp
View file @
70cb1fb0
...
...
@@ -34,7 +34,12 @@ void MqttAdapter_tests_a_compA::init(tests_a_compA *comp)
void
MqttAdapter_tests_a_compA
::
publish_echoPublisher
()
{
mqtt
::
message
tmpMsg
;
tmpMsg
.
set_payload
(
std
::
to_string
(
component
->
rosOut
));
double
value
=
component
->
rosOut
;
uint8_t
*
buf
=
(
uint8_t
*
)
&
value
;
tmpMsg
.
set_payload
(
buf
,
8
);
// pointer to byte buffer of length 8
try
{
_echoPublisher
->
publish
(
tmpMsg
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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