KDDI Fx0 hackathon / NySNICInterface

Fork of NySNICInterface by Ryo Iizuka

Committer:
kishino
Date:
Thu Mar 06 11:13:00 2014 +0000
Revision:
0:61c402886fbb
Child:
2:0ba43344c814
The common method which creates a UART command request was created.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
kishino 0:61c402886fbb 1 #ifndef _YD_WIFIINTERFACE_H_
kishino 0:61c402886fbb 2 #define _YD_WIFIINTERFACE_H_
kishino 0:61c402886fbb 3
kishino 0:61c402886fbb 4 #include "YDwifi.h"
kishino 0:61c402886fbb 5
kishino 0:61c402886fbb 6 class C_YDwifiInterface: public C_YDwifi {
kishino 0:61c402886fbb 7 public:
kishino 0:61c402886fbb 8
kishino 0:61c402886fbb 9 /**
kishino 0:61c402886fbb 10 * Constructor
kishino 0:61c402886fbb 11 *
kishino 0:61c402886fbb 12 * \param tx mbed pin to use for tx line of Serial interface
kishino 0:61c402886fbb 13 * \param rx mbed pin to use for rx line of Serial interface
kishino 0:61c402886fbb 14 * \param cts mbed pin to use for cts line of Serial interface
kishino 0:61c402886fbb 15 * \param rts mbed pin to use for rts line of Serial interface
kishino 0:61c402886fbb 16 * \param reset reset pin of the wifi module
kishino 0:61c402886fbb 17 * \param alarm alarm pin of the wifi module (default: NC)
kishino 0:61c402886fbb 18 * \param baud baud rate of Serial interface (default: 9600)
kishino 0:61c402886fbb 19 */
kishino 0:61c402886fbb 20 C_YDwifiInterface(PinName tx, PinName rx, PinName cts, PinName rts, PinName reset, PinName alarm = NC, int baud = 9600);
kishino 0:61c402886fbb 21
kishino 0:61c402886fbb 22 /** Initialize the interface with DHCP.
kishino 0:61c402886fbb 23 * Initialize the interface and configure it to use DHCP (no connection at this point).
kishino 0:61c402886fbb 24 * \return 0 on success, a negative number on failure
kishino 0:61c402886fbb 25 */
kishino 0:61c402886fbb 26 int init();
kishino 0:61c402886fbb 27
kishino 0:61c402886fbb 28 #if 0
kishino 0:61c402886fbb 29 /** Connect
kishino 0:61c402886fbb 30 * Bring the interface up, start DHCP if needed.
kishino 0:61c402886fbb 31 * \param sec the Wi-Fi security type
kishino 0:61c402886fbb 32 * \param ssid the Wi-Fi SSID
kishino 0:61c402886fbb 33 * \param phrase the Wi-Fi passphrase or security key
kishino 0:61c402886fbb 34 * \param mode the Wi-Fi mode
kishino 0:61c402886fbb 35 * \return 0 on success, a negative number on failure
kishino 0:61c402886fbb 36 */
kishino 0:61c402886fbb 37 int connect(Security sec, const char* ssid, const char* phrase, WiFiMode mode = WM_INFRASTRUCTURE);
kishino 0:61c402886fbb 38
kishino 0:61c402886fbb 39 /** Disconnect
kishino 0:61c402886fbb 40 * Bring the interface down
kishino 0:61c402886fbb 41 * \return 0 on success, a negative number on failure
kishino 0:61c402886fbb 42 */
kishino 0:61c402886fbb 43 int disconnect();
kishino 0:61c402886fbb 44
kishino 0:61c402886fbb 45 /** Get the MAC address of your Ethernet interface
kishino 0:61c402886fbb 46 * \return a pointer to a string containing the MAC address
kishino 0:61c402886fbb 47 */
kishino 0:61c402886fbb 48 char* getMACAddress();
kishino 0:61c402886fbb 49
kishino 0:61c402886fbb 50 /** Get the IP address of your Ethernet interface
kishino 0:61c402886fbb 51 * \return a pointer to a string containing the IP address
kishino 0:61c402886fbb 52 */
kishino 0:61c402886fbb 53 char* getIPAddress();
kishino 0:61c402886fbb 54
kishino 0:61c402886fbb 55 /** Get the Gateway address of your Ethernet interface
kishino 0:61c402886fbb 56 * \return a pointer to a string containing the Gateway address
kishino 0:61c402886fbb 57 */
kishino 0:61c402886fbb 58 char* getGateway();
kishino 0:61c402886fbb 59
kishino 0:61c402886fbb 60 /** Get the Network mask of your Ethernet interface
kishino 0:61c402886fbb 61 * \return a pointer to a string containing the Network mask
kishino 0:61c402886fbb 62 */
kishino 0:61c402886fbb 63 char* getNetworkMask();
kishino 0:61c402886fbb 64 #endif
kishino 0:61c402886fbb 65 };
kishino 0:61c402886fbb 66
kishino 0:61c402886fbb 67 #endif /* _YD_WIFIINTERFACE_H_ */