NetworkSocketAPI
Dependents: HelloWizFi250Interface
Fork of NetworkSocketAPI by
Diff: NetworkInterface.h
- Revision:
- 63:531f4c27f360
- Parent:
- 60:0360cb987da3
- Child:
- 66:c84a4c76cb94
--- a/NetworkInterface.h Wed Mar 02 16:52:25 2016 +0000 +++ b/NetworkInterface.h Wed Mar 09 05:51:38 2016 +0000 @@ -20,27 +20,27 @@ #include "SocketInterface.h" #include "stdint.h" - /** Maximum storage needed for IP address and MAC addresses */ #define NS_IP_SIZE 16 #define NS_MAC_SIZE 18 -/** Inexhaustive enum of standardized error codes +/** + * @enum ns_error_t + * @brief enum of standardized error codes */ enum ns_error_t { - NS_ERROR_TIMEOUT = -3001, - NS_ERROR_NO_CONNECTION = -3002, - NS_ERROR_NO_SOCKET = -3003, - NS_ERROR_NO_ADDRESS = -3004, - NS_ERROR_NO_MEMORY = -3005, - NS_ERROR_DNS_FAILURE = -3006, - NS_ERROR_DHCP_FAILURE = -3007, - NS_ERROR_AUTH_FAILURE = -3008, - NS_ERROR_DEVICE_ERROR = -3009 + NS_ERROR_TIMEOUT = -3001, /*!< operation took longer than allowed */ + NS_ERROR_NO_CONNECTION = -3002, /*!< not connected to a network */ + NS_ERROR_NO_SOCKET = -3003, /*!< socket not available for use */ + NS_ERROR_NO_ADDRESS = -3004, /*!< IP address is not known */ + NS_ERROR_NO_MEMORY = -3005, /*!< memory resource not available */ + NS_ERROR_DNS_FAILURE = -3006, /*!< DNS failed to complete successfully */ + NS_ERROR_DHCP_FAILURE = -3007, /*!< DHCP failed to complete successfully */ + NS_ERROR_AUTH_FAILURE = -3008, /*!< connection to access point faield */ + NS_ERROR_DEVICE_ERROR = -3009 /*!< failure interfacing with the network procesor */ }; - /** NetworkInterface class * Common interface that is shared between all hardware that * can connect to a network over IP. @@ -50,7 +50,6 @@ public: virtual ~NetworkInterface() {}; - /** Get the IP address * @return IP address of the interface or 0 if not yet connected */ @@ -66,7 +65,6 @@ */ virtual bool isConnected(); - /** Looks up the specified host's IP address * @param name URL of host * @param ip Buffer to hold IP address, must be at least SOCK_IP_SIZE @@ -74,7 +72,6 @@ */ virtual int32_t getHostByName(const char *name, char *ip); - protected: friend class Socket;