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: ATParser
Fork of ESP8266 by
Revision 5:a517950927fe, committed 2015-06-17
- Comitter:
- sam_grove
- Date:
- Wed Jun 17 20:56:56 2015 +0000
- Parent:
- 4:844719bff1b1
- Child:
- 6:0c084df39bda
- Commit message:
- comment out code. needs some work
Changed in this revision
| hwnamedriver.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/hwnamedriver.h Sun May 31 13:07:08 2015 -0500
+++ b/hwnamedriver.h Wed Jun 17 20:56:56 2015 +0000
@@ -34,195 +34,195 @@
*/
-class HWNameDriver :
-{
-public:
-
- /**
- * This enum defines the possible connect types.
- */
- enum connectType {
- TCP,
- UDP,
- };
-
- /**
- * Initialize the network hardware.
- *
- * \returns 1 on success, 0 on failure
- */
- virtual init (void ) const {
- return 0;
- }
-
- /**
- * Reset the newtwork hardware
- *
- * \returns 1 on success, 0 on failure
- */
- virtual int reset(void) const {
- return 0;
- }
-
- /**
- * Start a connection, either TCP or UDP
- *
- * \returns 1 on success, 0 on failure
- */
- virtual int connect(connectType type) const {
- return 0;
- }
-
- /**
- * Send data over the open connection
- *
- * @param data The data to send.
- * @param dataLen The number of bytes of data to send.
- * @param timeout The timeout time to wait in ms, default to 1500ms.
- *
- * \returns # of bytes sent on success, -1 on failure
- */
- virtual int send(uint8_t *data, int dataLen, int timeout = 1500) const {
- return 0;
- }
-
- /**
- * Receive data over the open connection
- *
- * @param data Buffer to put received data into.
- * @param dataMaxSize The maximum size of the data buffer to put received data into.
- * @param timeout The timeout time to wait in ms, default to 1500ms.
- *
- * \returns # of bytes recieved on success, -1 on failure
- */
- virtual int receive(uint8_t *data, int dataMaxSize,int timeout = 1500) const {
- return 0;
- }
-
- /**
- * Stop the interface, bringing down dhcp if necessary.
- *
- * \returns 1 on success, 0 on failure
- */
- virtual int disconnect(void) const {
- return 0;
- }
-
- /**
- * Put the hardware to sleep / low power mode.
- *
- * \returns 1 on success, 0 on failure
- */
- virtual int sleep(void) const {
- return 0;
- }
-
- /**
- * Wakeup the hardware.
- *
- * \returns 1 on success, 0 on failure
- */
- virtual int wakeup(void) const {
- return 0;
- }
-
- /**
- * Set the current IP address.
- *
- * @param ip The IP Address to use.
- *
- * \returns 1 on success, 0 on failure
- */
- virtual int setIPAddress(const char *ip) const {
- return 0;
- }
-
- /**
- * Get the current IP address.
- *
- * \returns a pointer to a string containing the IP address on success, 0 on failure.
- */
- virtual char *getIPAddress(void) const {
- return 0;
- }
-
- /**
- * Set the current gateway address.
- *
- * @param gateway The Gateway to use.
- *
- * \returns 1 on success, 0 on failure
- */
- virtual int setGateway(const char *gateway) const {
- return 0;
- }
-
- /**
- * Get the current gateway address.
- *
- * \returns a pointer to a string containing the gateway address on success, 0 on failure.
- */
- virtual char *getGateway(void) const {
- return 0;
- }
-
- /**
- * Set the Network of the HWDevice
- *
- * @param netmask The networkMask to use.
- *
- * \returns 1 on success, 0 on failure
- */
- virtual int setNetworkMask(const char *netmask) const {
- return 0;
- };
-
- /**
- * Get the current network mask.
- *
- * \returns a pointer to a string containing the network mask on success, 0 on failure.
- */
- virtual char *getNetworkMask(void) const {
- return 0;
- }
-
- /**
- * Set the MAC Address of the HWDevice
- *
- * @param mac The static IP address to use
- *
- * \returns 1 on success, 0 on failure
- */
- virtual int setMACAddress(const char *mac) const {
- return 0;
- };
-
- /**
- * Get the devices MAC address.
- *
- * \returns a pointer to a string containing the mac address on success, 0 on failure.
- */
- virtual char *getMACAddress(void) const {
- return 0;
- }
-
- /**
- * Get the current status of the interface connection.
- *
- * \returns true if connected, false otherwise.
- */
- virtual bool isConnected(void) const {
- return false;
- }
-
-private:
- char IPAddress[15]; // "xxx.xxx.xxx.xxx" IPV4
- char NetworkMask[15]; // "xxx.xxx.xxx.xxx"
- char Gateway[15]; // "xxx.xxx.xxx.xxx"
- char MacAddress[17]; // "xx:xx:xx:xx:xx:xx"
- bool connected;
-
-};
+//class HWNameDriver :
+//{
+//public:
+//
+// /**
+// * This enum defines the possible connect types.
+// */
+// enum connectType {
+// TCP,
+// UDP,
+// };
+//
+// /**
+// * Initialize the network hardware.
+// *
+// * \returns 1 on success, 0 on failure
+// */
+// virtual init (void ) const {
+// return 0;
+// }
+//
+// /**
+// * Reset the newtwork hardware
+// *
+// * \returns 1 on success, 0 on failure
+// */
+// virtual int reset(void) const {
+// return 0;
+// }
+//
+// /**
+// * Start a connection, either TCP or UDP
+// *
+// * \returns 1 on success, 0 on failure
+// */
+// virtual int connect(connectType type) const {
+// return 0;
+// }
+//
+// /**
+// * Send data over the open connection
+// *
+// * @param data The data to send.
+// * @param dataLen The number of bytes of data to send.
+// * @param timeout The timeout time to wait in ms, default to 1500ms.
+// *
+// * \returns # of bytes sent on success, -1 on failure
+// */
+// virtual int send(uint8_t *data, int dataLen, int timeout = 1500) const {
+// return 0;
+// }
+//
+// /**
+// * Receive data over the open connection
+// *
+// * @param data Buffer to put received data into.
+// * @param dataMaxSize The maximum size of the data buffer to put received data into.
+// * @param timeout The timeout time to wait in ms, default to 1500ms.
+// *
+// * \returns # of bytes recieved on success, -1 on failure
+// */
+// virtual int receive(uint8_t *data, int dataMaxSize,int timeout = 1500) const {
+// return 0;
+// }
+//
+// /**
+// * Stop the interface, bringing down dhcp if necessary.
+// *
+// * \returns 1 on success, 0 on failure
+// */
+// virtual int disconnect(void) const {
+// return 0;
+// }
+//
+// /**
+// * Put the hardware to sleep / low power mode.
+// *
+// * \returns 1 on success, 0 on failure
+// */
+// virtual int sleep(void) const {
+// return 0;
+// }
+//
+// /**
+// * Wakeup the hardware.
+// *
+// * \returns 1 on success, 0 on failure
+// */
+// virtual int wakeup(void) const {
+// return 0;
+// }
+//
+// /**
+// * Set the current IP address.
+// *
+// * @param ip The IP Address to use.
+// *
+// * \returns 1 on success, 0 on failure
+// */
+// virtual int setIPAddress(const char *ip) const {
+// return 0;
+// }
+//
+// /**
+// * Get the current IP address.
+// *
+// * \returns a pointer to a string containing the IP address on success, 0 on failure.
+// */
+// virtual char *getIPAddress(void) const {
+// return 0;
+// }
+//
+// /**
+// * Set the current gateway address.
+// *
+// * @param gateway The Gateway to use.
+// *
+// * \returns 1 on success, 0 on failure
+// */
+// virtual int setGateway(const char *gateway) const {
+// return 0;
+// }
+//
+// /**
+// * Get the current gateway address.
+// *
+// * \returns a pointer to a string containing the gateway address on success, 0 on failure.
+// */
+// virtual char *getGateway(void) const {
+// return 0;
+// }
+//
+// /**
+// * Set the Network of the HWDevice
+// *
+// * @param netmask The networkMask to use.
+// *
+// * \returns 1 on success, 0 on failure
+// */
+// virtual int setNetworkMask(const char *netmask) const {
+// return 0;
+// };
+//
+// /**
+// * Get the current network mask.
+// *
+// * \returns a pointer to a string containing the network mask on success, 0 on failure.
+// */
+// virtual char *getNetworkMask(void) const {
+// return 0;
+// }
+//
+// /**
+// * Set the MAC Address of the HWDevice
+// *
+// * @param mac The static IP address to use
+// *
+// * \returns 1 on success, 0 on failure
+// */
+// virtual int setMACAddress(const char *mac) const {
+// return 0;
+// };
+//
+// /**
+// * Get the devices MAC address.
+// *
+// * \returns a pointer to a string containing the mac address on success, 0 on failure.
+// */
+// virtual char *getMACAddress(void) const {
+// return 0;
+// }
+//
+// /**
+// * Get the current status of the interface connection.
+// *
+// * \returns true if connected, false otherwise.
+// */
+// virtual bool isConnected(void) const {
+// return false;
+// }
+//
+//private:
+// char IPAddress[15]; // "xxx.xxx.xxx.xxx" IPV4
+// char NetworkMask[15]; // "xxx.xxx.xxx.xxx"
+// char Gateway[15]; // "xxx.xxx.xxx.xxx"
+// char MacAddress[17]; // "xx:xx:xx:xx:xx:xx"
+// bool connected;
+//
+//};
#endif // HWNAME_DRIVER_H
\ No newline at end of file
