some swapping functions for big and little endian for eiger

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@602 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d
2013-06-13 13:28:12 +00:00
parent 6c6a7c2679
commit 58824d6d72
6 changed files with 84 additions and 10 deletions

View File

@ -14,18 +14,39 @@
#include "sls_detector_defs.h"
char lastClientIP[INET_ADDRSTRLEN];
char thisClientIP[INET_ADDRSTRLEN];
int lockStatus;
int differentClients;
typedef enum{
INT16,
INT32,
INT64,
OTHER
}intType;
int bindSocket(unsigned short int port_number);
int acceptConnection(int socketDescriptor);
void closeConnection(int file_Des);
void exitServer(int socketDescriptor);
void swapData(void* val,int length,intType itype);
void swap16(int16_t* val,int length);
void swap32(int32_t* val,int length);
void swap64(int64_t* val,int length);
int sendData(int file_des, void* buf,int length, intType itype);
int receiveData(int file_des, void* buf,int length, intType itype);
int sendDataOnly(int file_des, void* buf,int length);
int receiveDataOnly(int file_des, void* buf,int length);
int getServerError(int socketDescriptor);
int sendChannel(int file_des, sls_detector_channel *myChan);
int sendChip(int file_des, sls_detector_chip *myChip);