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: MaximInterface mbed
WebServerInterface Class Reference
Network interface to the web server supporting authenticated posting of event through an HTTP challenge-respones scheme with SHA-256 data signing. More...
#include <WebServerInterface.hpp>
Public Member Functions | |
| WebServerInterface (ESP8266 &esp8266) | |
| bool | initialize () |
| Initialize network interface and connect to access point. | |
| bool | authPostHttpEvent (MaximInterface::DS2465 &macCoproc, PostEvent event, const std::string &postData, bool setSecret) |
| Send an authenticated event message to the web server. | |
| const MaximInterface::RomId & | sessionId () const |
Static Public Member Functions | |
| static std::string | formatSensorDataPostBody (const SensorData &sensorData) |
| Format sensor data as text suitable for use in a POST body. | |
Detailed Description
Network interface to the web server supporting authenticated posting of event through an HTTP challenge-respones scheme with SHA-256 data signing.
Definition at line 52 of file WebServerInterface.hpp.
Constructor & Destructor Documentation
| WebServerInterface | ( | ESP8266 & | esp8266 ) |
- Parameters:
-
esp8266 Interface to ESP8266 for Wi-Fi access. pc Optional serial interface for received web traffic.
Definition at line 56 of file WebServerInterface.hpp.
Member Function Documentation
| bool authPostHttpEvent | ( | MaximInterface::DS2465 & | macCoproc, |
| PostEvent | event, | ||
| const std::string & | postData, | ||
| bool | setSecret | ||
| ) |
Send an authenticated event message to the web server.
- Parameters:
-
macCoProc Coprocessor such as the DS2465 used to calculate the authentication MAC. event Event message type. Message body as determined by the event message type. True if the Transport Secret needs to be selected in the coprocessor.
- Returns:
- True on success.
| std::string formatSensorDataPostBody | ( | const SensorData & | sensorData ) | [static] |
Format sensor data as text suitable for use in a POST body.
- Parameters:
-
sensorData Sensor data to format.
- Returns:
- Data formatted for web server.
Definition at line 317 of file WebServerInterface.cpp.
| bool initialize | ( | ) |
Initialize network interface and connect to access point.
- Returns:
- True on success.
Definition at line 71 of file WebServerInterface.cpp.
| const MaximInterface::RomId& sessionId | ( | ) | const |
Session ID used by the web server to distinguish between multiple Controllers.
Definition at line 79 of file WebServerInterface.hpp.
Generated on Wed Jul 13 2022 21:31:03 by
1.7.2
MAXREFDES143#: DeepCover Embedded Security in IoT Authenticated Sensing & Notification