Example program with HTTPServer and sensor data streaming over TCPSockets, using Donatien Garnier's Net APIs and services code on top of LWIP. Files StreamServer.h and .cpp encapsulate streaming over TCPSockets. Broadcast is done by sendToAll(), and all incoming data is echoed back to the client. Echo code can be replaced with some remote control of the streaming interface. See main() that shows how to periodically send some data to all subscribed clients. To subscribe, a client should open a socket at <mbed_ip> port 123. I used few lines in TCL code to set up a quick sink for the data. HTTP files are served on port 80 concurrently to the streaming.
autoip.h File Reference
AutoIP Automatic LinkLocal IP Configuration. More...
Go to the source code of this file.
Functions | |
void | autoip_init (void) |
Init srand, has to be called before entering mainloop. | |
void | autoip_set_struct (struct netif *netif, struct autoip *autoip) |
Set a struct autoip allocated by the application to work with. | |
err_t | autoip_start (struct netif *netif) |
Start AutoIP client. | |
err_t | autoip_stop (struct netif *netif) |
Stop AutoIP client. | |
void | autoip_arp_reply (struct netif *netif, struct etharp_hdr *hdr) |
Handles every incoming ARP Packet, called by etharp_arp_input. | |
void | autoip_tmr (void) |
Has to be called in loop every AUTOIP_TMR_INTERVAL milliseconds. | |
void | autoip_network_changed (struct netif *netif) |
Handle a possible change in the network configuration. |
Detailed Description
AutoIP Automatic LinkLocal IP Configuration.
Definition in file autoip.h.
Function Documentation
void autoip_arp_reply | ( | struct netif * | netif, |
struct etharp_hdr * | hdr | ||
) |
void autoip_init | ( | void | ) |
void autoip_network_changed | ( | struct netif * | netif ) |
void autoip_set_struct | ( | struct netif * | netif, |
struct autoip * | autoip | ||
) |
Set a struct autoip allocated by the application to work with.
Set a struct autoip allocated by the application to work with.
Using this prevents autoip_start to allocate it using mem_malloc.
- Parameters:
-
netif the netif for which to set the struct autoip dhcp (uninitialised) dhcp struct allocated by the application
err_t autoip_start | ( | struct netif * | netif ) |
err_t autoip_stop | ( | struct netif * | netif ) |
Generated on Tue Jul 12 2022 21:10:26 by 1.7.2