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: lib_Transmission
Diff: main.h
- Revision:
- 0:5d2c38c99ce6
- Child:
- 1:59b4a81bd792
diff -r 000000000000 -r 5d2c38c99ce6 main.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.h Thu Dec 10 09:49:52 2020 +0000
@@ -0,0 +1,42 @@
+#ifndef MAIN_H
+#define MAIN_H
+
+#define MBED_PROJECT "Transmission"
+#define HTTP_RETURN_OK "HTTP/1.1 200 OK\r\n"
+#define HTTP_RETURN_NO_CONTENT "HTTP/1.1 204 No Content\r\n"
+
+#include "mbed.h" // mbed-os 6.2
+#include "favicon.h"
+#include "lib_Transmission.h"
+#include "kvstore_global_api.h"
+#include <map>
+
+EthernetInterface eth;
+
+enum enumHTML { HEAD, OPEN, CLOSE, BODY, SMTP };
+
+BusOut Led(LED1, LED2, LED3);
+UnbufferedSerial pc(USBTX, USBRX, 230400);
+
+/* initialize */
+void setup(void);
+void init(void);
+
+/* string */
+string str_precision(float value);
+string csv_time(const bool& = true);
+
+/* transmission */
+void processing(string, Transmission::enum_trans_to);
+
+/* HTML */
+string html(enumHTML);
+
+/* NOTIFY */
+string notify(const string&, const string& = "");
+
+Transmission transmission(&pc, ð, &init, &processing);
+
+struct typeUc { string history; string name; string spec; string vlan; string mac; string mail[5]; }
+ uc = { "DATE;TIME;SENSOR;STATUS;VALUE\n", "", "", "", "", { "", "", "", "", "" } };
+#endif
\ No newline at end of file