view include/client.h @ 39:638bc1ae2500 staging

Improved readibility of the DIGITAL code in the PRU, using register names instead of aliases and expanding some of the macros, removing unused macros. Binaries were not modified
author Giulio Moro <giuliomoro@yahoo.it>
date Wed, 13 May 2015 12:18:10 +0100
parents ad5cd8dd99b3
children 4255ecbb9bec f3251851c718
line wrap: on
line source
/* UDP client in the internet domain */
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>

struct networkData{
	int *counter;
	float *variables[16];
	int numVariables;
};

void error(const char *);
int setupSockets(int receivePort, int transmitPort, char const*serverName);
int sendMessage(networkData message);
int receiveMessage(networkData message);
void closeSockets();