#define ALTRO_ZSTHR 0x08 #define ALTRO_BCTHR 0x09 #define ALTRO_TRCFG 0x0A #define ALTRO_DPCFG 0x0B #define ALTRO_BFNPT 0x0C #define ALTRO_PMADD 0x0D #define ALTRO_ERSTR 0x10 #define ALTRO_TRCNT 0x12 #define ALTRO_VFPED 0x13 #define SALTRO_PMADD 0x0D #define SALTRO_PMDTA 0x14 #define LOCAL_IP "192.168.4.11" #define SRU_IP "192.168.4.4" typedef struct { char controlip[64]; int controlport; struct sockaddr_in si_sru; int scsocket; // socket for slow control int listenport; char readoutip[64]; unsigned int readoutipnb; int status; // status from configfile int linkup; // it it answered ping int active; // status & linkup is set and FMVER could be read } SRUSERVER; typedef struct { struct sockaddr_in si_controlme; int controlsocket; // socket for control int listenport; // port for listen on control int nbrdpackets; // Number of packets expected back SRUSERVER sruserver; } SRU; int scSruConnect(SRU *srus); int saltroWriteRegister(int handle,SRUSERVER *srv,int broadcast, int node, int chip, int channel, int reg, unsigned int value); int saltroReadRegister(int handle, SRUSERVER *srv, int node, int chip, int channel, int reg, unsigned int *value);