Mercurial > hg > beaglert
annotate include/client.h @ 45:579c86316008 newapi
Major API overhaul. Moved to a single data structure for handling render functions. Functionally, generally similar except for scheduling within PRU loop function, which now uses interrupts from the PRU rather than polling. This requires an updated kernel.
author | andrewm |
---|---|
date | Thu, 28 May 2015 14:35:55 -0400 |
parents | ad5cd8dd99b3 |
children | 4255ecbb9bec f3251851c718 |
rev | line source |
---|---|
giuliomoro@24 | 1 /* UDP client in the internet domain */ |
giuliomoro@24 | 2 #include <sys/types.h> |
giuliomoro@24 | 3 #include <sys/socket.h> |
giuliomoro@24 | 4 #include <netinet/in.h> |
giuliomoro@24 | 5 #include <arpa/inet.h> |
giuliomoro@24 | 6 #include <netdb.h> |
giuliomoro@24 | 7 #include <stdio.h> |
giuliomoro@24 | 8 #include <stdlib.h> |
giuliomoro@24 | 9 #include <unistd.h> |
giuliomoro@24 | 10 #include <string.h> |
giuliomoro@24 | 11 |
giuliomoro@24 | 12 struct networkData{ |
giuliomoro@24 | 13 int *counter; |
giuliomoro@24 | 14 float *variables[16]; |
giuliomoro@24 | 15 int numVariables; |
giuliomoro@24 | 16 }; |
giuliomoro@24 | 17 |
giuliomoro@24 | 18 void error(const char *); |
giuliomoro@24 | 19 int setupSockets(int receivePort, int transmitPort, char const*serverName); |
giuliomoro@24 | 20 int sendMessage(networkData message); |
giuliomoro@24 | 21 int receiveMessage(networkData message); |
giuliomoro@24 | 22 void closeSockets(); |