Subversion Repositories f9daq

Rev

Blame | Last modification | View Log | RSS feed

/*
 * server.h
 *
 *  Created on: 18. dec. 2018
 *      Author: Domen
 */


#ifndef SRC_SERVER_H_
#define SRC_SERVER_H_


#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <math.h>
//#include <sys/mman.h> // X
#include <sys/socket.h> // za uporabo funkcij za TCP/IP povezavo
#include <netinet/in.h> //neke type definira
#include <arpa/inet.h> //definira type za net, funkcija htonl spada sem
#include "data_handling.h"


#define START_MASK                      0x00000001
#define RESET_MASK                      0x00000002
#define HW_CONFIG_MASK          0x00000004
#define SEND_DATA_MASK          0x00000008
#define DISCONNECT_MASK         0x00000010
#define THRESHOLD_MASK          0x0007FF00
#define ACQ_WINDOW_MASK         0x07F80000
#define SW_TRIGGER_MASK     0xF8000000



/*------------------PUBLIC FUNCTIONS PROTOTYPES--------------------------*/
void Server_comm(int *server_info, HW_system *strct, int status);
int Server_init(int* server_info);








#endif /* SRC_SERVER_H_ */