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.
main.cpp
00001 #include "mqtt.h" 00002 #include "simulator.h" 00003 #include <assert.h> 00004 #include "mbed.h" 00005 00006 // mqtt singleton instance 00007 mqtt* mqtt::mqtt_singleton = NULL; 00008 #define REGRESSIONS 100 00009 00010 int main() 00011 { 00012 // prepare screen for input 00013 printf("\033[2J"); 00014 printf("\r\n"); 00015 00016 // setup callbacks and mqtt and wifi connection 00017 mqtt::instance()->setup_network(); 00018 00019 // wait for partner 00020 ThisThread::sleep_for(2000); 00021 00022 00023 for(int i = 0; i < REGRESSIONS; i++) 00024 { 00025 printf("starting simulation... %d\r\n",i); 00026 // start our simulation. will return once siimulation completes 00027 start_simulation( mqtt::instance() ); 00028 ThisThread::sleep_for(1000); 00029 } 00030 // shutdown 00031 mqtt::instance()->shutdown_network(); 00032 }
Generated on Fri Jul 29 2022 03:44:50 by
1.7.2