Dependencies: FatFileSystem mbed WeatherMeters SDFileSystem
homepage.h@0:1a61c61d0845, 2012-04-03 (annotated)
- Committer:
- dcoban
- Date:
- Tue Apr 03 18:43:13 2012 +0000
- Revision:
- 0:1a61c61d0845
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dcoban | 0:1a61c61d0845 | 1 | /* Copyright 2012 Adam Green (http://mbed.org/users/AdamGreen/) |
dcoban | 0:1a61c61d0845 | 2 | |
dcoban | 0:1a61c61d0845 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); |
dcoban | 0:1a61c61d0845 | 4 | you may not use this file except in compliance with the License. |
dcoban | 0:1a61c61d0845 | 5 | You may obtain a copy of the License at |
dcoban | 0:1a61c61d0845 | 6 | |
dcoban | 0:1a61c61d0845 | 7 | http://www.apache.org/licenses/LICENSE-2.0 |
dcoban | 0:1a61c61d0845 | 8 | |
dcoban | 0:1a61c61d0845 | 9 | Unless required by applicable law or agreed to in writing, software |
dcoban | 0:1a61c61d0845 | 10 | distributed under the License is distributed on an "AS IS" BASIS, |
dcoban | 0:1a61c61d0845 | 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
dcoban | 0:1a61c61d0845 | 12 | See the License for the specific language governing permissions and |
dcoban | 0:1a61c61d0845 | 13 | limitations under the License. |
dcoban | 0:1a61c61d0845 | 14 | */ |
dcoban | 0:1a61c61d0845 | 15 | /* HTML for content to be returned from wind meter. */ |
dcoban | 0:1a61c61d0845 | 16 | #ifndef _HOMEPAGE_H_ |
dcoban | 0:1a61c61d0845 | 17 | #define _HOMEPAGE_H_ |
dcoban | 0:1a61c61d0845 | 18 | |
dcoban | 0:1a61c61d0845 | 19 | static const char g_HomePageHTML[] = |
dcoban | 0:1a61c61d0845 | 20 | "<html>\n" \ |
dcoban | 0:1a61c61d0845 | 21 | "<header>\n" \ |
dcoban | 0:1a61c61d0845 | 22 | " <title>Green's Weather Station</title>\n" \ |
dcoban | 0:1a61c61d0845 | 23 | "</header>\n" \ |
dcoban | 0:1a61c61d0845 | 24 | "<body>\n" \ |
dcoban | 0:1a61c61d0845 | 25 | "<h1 align=\"center\"><font color=\"green\">Green's Weather Station</font></h1>\n" \ |
dcoban | 0:1a61c61d0845 | 26 | "<p>\n" \ |
dcoban | 0:1a61c61d0845 | 27 | " <br>\n" \ |
dcoban | 0:1a61c61d0845 | 28 | " <table border=\"1\" align=\"center\" cellpadding=\"10\">\n" \ |
dcoban | 0:1a61c61d0845 | 29 | " <tr align=\"center\">\n" \ |
dcoban | 0:1a61c61d0845 | 30 | " <td><strong>Current Wind Speed</strong></td>\n" \ |
dcoban | 0:1a61c61d0845 | 31 | " <td>%.1f km/h</td>\n" \ |
dcoban | 0:1a61c61d0845 | 32 | " </tr>\n" \ |
dcoban | 0:1a61c61d0845 | 33 | " <tr align=\"center\">\n" \ |
dcoban | 0:1a61c61d0845 | 34 | " <td><strong>Maximum Wind Speed</strong></td>\n" \ |
dcoban | 0:1a61c61d0845 | 35 | " <td>%.1f km/h</td>\n" \ |
dcoban | 0:1a61c61d0845 | 36 | " </tr>\n" \ |
dcoban | 0:1a61c61d0845 | 37 | " <tr align=\"center\">\n" \ |
dcoban | 0:1a61c61d0845 | 38 | " <td><strong>Wind Direction</strong></td>\n" \ |
dcoban | 0:1a61c61d0845 | 39 | " <td>%s</td>\n" \ |
dcoban | 0:1a61c61d0845 | 40 | " </tr>\n" \ |
dcoban | 0:1a61c61d0845 | 41 | " <tr align=\"center\">\n" \ |
dcoban | 0:1a61c61d0845 | 42 | " <td><strong>Rain Gauge</strong></td>\n" \ |
dcoban | 0:1a61c61d0845 | 43 | " <td>%.4f mm</td>\n" \ |
dcoban | 0:1a61c61d0845 | 44 | " </tr>\n" \ |
dcoban | 0:1a61c61d0845 | 45 | " </table>\n" \ |
dcoban | 0:1a61c61d0845 | 46 | "</p>\n" \ |
dcoban | 0:1a61c61d0845 | 47 | "<p align=\"center\">\n" \ |
dcoban | 0:1a61c61d0845 | 48 | " Measurements last reset %s ago.\n" \ |
dcoban | 0:1a61c61d0845 | 49 | "</p>\n" \ |
dcoban | 0:1a61c61d0845 | 50 | "<form align=\"center\" method=\"post\" action=\"/reset.html\">\n" \ |
dcoban | 0:1a61c61d0845 | 51 | " <input type=\"submit\" value=\"Reset Measurements\">\n" \ |
dcoban | 0:1a61c61d0845 | 52 | "</form>\n" \ |
dcoban | 0:1a61c61d0845 | 53 | "</body>\n" \ |
dcoban | 0:1a61c61d0845 | 54 | "</html>\n"; |
dcoban | 0:1a61c61d0845 | 55 | |
dcoban | 0:1a61c61d0845 | 56 | static const char g_OkStatusLine[] = "HTTP/1.0 200 OK\r\n"; |
dcoban | 0:1a61c61d0845 | 57 | static const char g_HTMLHeaders[] = "Content-type: text/html\r\n"; |
dcoban | 0:1a61c61d0845 | 58 | |
dcoban | 0:1a61c61d0845 | 59 | #endif /* _HOMEPAGE_H_ */ |