Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed
Fork of ICE by
Diff: src/ModbusMaster/ModbusMaster.cpp
- Revision:
- 99:55317f374a94
- Parent:
- 88:8a1a2bba8850
- Child:
- 106:c0ddba334e93
diff -r 42f92b03f1b8 -r 55317f374a94 src/ModbusMaster/ModbusMaster.cpp
--- a/src/ModbusMaster/ModbusMaster.cpp Tue Sep 20 19:58:36 2016 +0000
+++ b/src/ModbusMaster/ModbusMaster.cpp Wed Sep 21 20:32:19 2016 +0000
@@ -6,10 +6,13 @@
*****************************************************************************/
#include "global.h"
#include <stdio.h>
+#include <sstream>
+#include <iostream>
#include "MTSLog.h"
#include "BLEDataHandler.h"
#include "ModbusMaster.h"
#include "MbedJSONValue.h"
+#include "CloudFileSender.h"
DigitalOut dout1(PC_1);
DigitalOut dout2(PA_1);
@@ -117,6 +120,11 @@
if( status == true ) {
ModbusRegisterMap[iter->first].float_value = float_value;
logInfo("Modbus Tag:%s value=%2.2f", iter->first.c_str(), float_value );
+// std::ostringstream log_event;
+// log_event << "tag:"<< iter->first.c_str() << " value:" << float_value;
+// printf("%s:%d event=%s\r\n",__func__, __LINE__, log_event.str().c_str());
+// std::string queue_event( log_event.str().c_str() );
+// CloudFileQueueEvent( queue_event );
} else {
logInfo("Modbus Read Failed, tag=%s", iter->first.c_str() );
}
