@@ -28,110 +28,129 @@ class MbedSocketClass {
2828 void config (IPAddress local_ip);
2929
3030 /* Change Ip configuration settings disabling the dhcp client
31- *
32- * param local_ip: Static ip configuration as string
33- */
31+ *
32+ * param local_ip: Static ip configuration as string
33+ */
3434 void config (const char * local_ip);
3535
3636 /* Change Ip configuration settings disabling the dhcp client
37- *
38- * param local_ip: Static ip configuration
39- * param dns_server: IP configuration for DNS server 1
40- */
37+ *
38+ * param local_ip: Static ip configuration
39+ * param dns_server: IP configuration for DNS server 1
40+ */
4141 void config (IPAddress local_ip, IPAddress dns_server);
4242
4343 /* Change Ip configuration settings disabling the dhcp client
44- *
45- * param local_ip: Static ip configuration
46- * param dns_server: IP configuration for DNS server 1
47- * param gateway : Static gateway configuration
48- */
44+ *
45+ * param local_ip: Static ip configuration
46+ * param dns_server: IP configuration for DNS server 1
47+ * param gateway : Static gateway configuration
48+ */
4949 void config (IPAddress local_ip, IPAddress dns_server, IPAddress gateway);
5050
5151 /* Change Ip configuration settings disabling the dhcp client
52- *
53- * param local_ip: Static ip configuration
54- * param dns_server: IP configuration for DNS server 1
55- * param gateway: Static gateway configuration
56- * param subnet: Static Subnet mask
57- */
52+ *
53+ * param local_ip: Static ip configuration
54+ * param dns_server: IP configuration for DNS server 1
55+ * param gateway: Static gateway configuration
56+ * param subnet: Static Subnet mask
57+ */
5858 void config (IPAddress local_ip, IPAddress dns_server, IPAddress gateway, IPAddress subnet);
5959
6060 // When using DHCP the hostname provided will be used.
6161 int setHostname (const char * hostname);
6262
6363 /* Change DNS Ip configuration
64- *
65- * param dns_server1: ip configuration for DNS server 1
66- */
64+ *
65+ * param dns_server1: ip configuration for DNS server 1
66+ */
6767 void setDNS (IPAddress dns_server1);
6868
6969 /* Change DNS Ip configuration
70- *
71- * param dns_server1: ip configuration for DNS server 1
72- * param dns_server2: ip configuration for DNS server 2
73- *
74- */
70+ *
71+ * param dns_server1: ip configuration for DNS server 1
72+ * param dns_server2: ip configuration for DNS server 2
73+ *
74+ */
7575 void setDNS (IPAddress dns_server1, IPAddress dns_server2);
7676
7777 /*
78- * Get the interface IP address.
79- *
80- * return: Ip address value
81- */
78+ * Get the interface IP address.
79+ *
80+ * return: Ip address value
81+ */
8282 IPAddress localIP ();
8383
8484 /*
85- * Get the interface subnet mask address.
86- *
87- * return: subnet mask address value
88- */
85+ * Get the interface subnet mask address.
86+ *
87+ * return: subnet mask address value
88+ */
8989 IPAddress subnetMask ();
9090
9191 /*
92- * Get the gateway ip address.
93- *
94- * return: gateway ip address value
95- */
92+ * Get the gateway ip address.
93+ *
94+ * return: gateway ip address value
95+ */
9696 IPAddress gatewayIP ();
9797
9898 /*
99- * Get the DNS Server ip address.
100- *
101- * return: DNS Server ip address value
102- */
99+ * Get the DNS Server ip address.
100+ *
101+ * return: DNS Server ip address value
102+ */
103103 IPAddress dnsServerIP ();
104104
105105 /*
106- * Get the DNS Server ip address.
107- *
108- * return: DNS Server ip address value
109- */
106+ * Get the DNS Server ip address.
107+ *
108+ * return: DNS Server ip address value
109+ */
110110 IPAddress dnsIP (int n = 0 );
111111
112112 virtual NetworkInterface* getNetwork () = 0;
113-
113+
114114 /*
115- * Download a file from an HTTP endpoint and save it in the provided `target` location on the fs
116- * The parameter cbk can be used to perform actions on the buffer before saving on the fs
117- *
118- * return: on success the size of the downloaded file, on error -status code
119- */
115+ * Download a file from an HTTP endpoint and save it in the provided `target` location on the fs
116+ * The parameter cbk can be used to perform actions on the buffer before saving on the fs
117+ *
118+ * return: on success the size of the downloaded file, on error -status code
119+ */
120120 int download (
121121 const char * url, const char * target, bool const is_https = false );
122122 /*
123- * Download a file from an HTTP endpoint and handle the body of the request on a callback
124- * passed as an argument
125- *
126- * return: on success the size of the downloaded file, on error -status code
127- */
123+ * Download a file from an HTTP endpoint and handle the body of the request on a callback
124+ * passed as an argument
125+ *
126+ * return: on success the size of the downloaded file, on error -status code
127+ */
128128 int download (
129129 const char * url, bool const is_https = false ,
130130 mbed::Callback<void (const char *, uint32_t )> cbk = nullptr);
131131
132132 int hostByName (const char * aHostname, IPAddress& aResult);
133133
134+ /*
135+ * Get the interface MAC address.
136+ *
137+ * Network interface should be ready to get a valid mac address.
138+ * Call WiFi.begin("",""); or Ethernet.begin(); before issuing a mac address
139+ * request, otherwhise returned value will be ff:ff:ff:ff:ff:ff
140+ *
141+ * return: pointer to uint8_t array with length WL_MAC_ADDR_LENGTH
142+ */
134143 uint8_t * macAddress (uint8_t * mac);
144+
145+ /*
146+ * Get the interface MAC address String.
147+ *
148+ * Network interface should be ready to get a valid MAC address.
149+ * Call WiFi.begin("",""); or Ethernet.begin(); before issuing a mac address
150+ * request, otherwhise returned value will be ff:ff:ff:ff:ff:ff
151+ *
152+ * return: MAC Address String
153+ */
135154 String macAddress ();
136155
137156 void setFeedWatchdogFunc (voidFuncPtr func);
0 commit comments