#include "sls_receiver_defs.h"
#include "slsReceiverUsers.h"
#include <iostream>
#include <string.h>
#include <signal.h>
#include <cstdlib>
#include <sys/types.h>
#include <sys/wait.h>
#include <string>
Go to the source code of this file.
Defines | |
#define | NUM_RECEIVERS 1 |
#define | START_TCP_PORT 1954 |
#define | PRINT_IN_COLOR(c, f,...) printf ("\033[%dm" f RESET, 30 + c+1, ##__VA_ARGS__) |
Functions | |
void | sigChildExitedHandler (int sig) |
void | sigInterruptHandler (int p) |
int | StartAcq (char *filepath, char *filename, uint64_t fileindex, uint32_t datasize, void *p) |
void | AcquisitionFinished (uint64_t frames, void *p) |
void | GetData (uint64_t frameNumber, uint32_t expLength, uint32_t packetNumber, uint64_t bunchId, uint64_t timestamp, uint16_t modId, uint16_t xCoord, uint16_t yCoord, uint16_t zCoord, uint32_t debug, uint16_t roundRNumber, uint8_t detType, uint8_t version, char *datapointer, uint32_t datasize, void *p) |
int | main (int argc, char *argv[]) |
Variables | |
pid_t | childPid [NUM_RECEIVERS] |
bool | keeprunning |
int | numrunning |
#define NUM_RECEIVERS 1 |
Definition at line 21 of file mainReceiver.cpp.
#define PRINT_IN_COLOR | ( | c, | |||
f, | |||||
... | ) | printf ("\033[%dm" f RESET, 30 + c+1, ##__VA_ARGS__) |
Definition at line 23 of file mainReceiver.cpp.
#define START_TCP_PORT 1954 |
Definition at line 22 of file mainReceiver.cpp.
void AcquisitionFinished | ( | uint64_t | frames, | |
void * | p | |||
) |
Definition at line 52 of file mainReceiver.cpp.
void GetData | ( | uint64_t | frameNumber, | |
uint32_t | expLength, | |||
uint32_t | packetNumber, | |||
uint64_t | bunchId, | |||
uint64_t | timestamp, | |||
uint16_t | modId, | |||
uint16_t | xCoord, | |||
uint16_t | yCoord, | |||
uint16_t | zCoord, | |||
uint32_t | debug, | |||
uint16_t | roundRNumber, | |||
uint8_t | detType, | |||
uint8_t | version, | |||
char * | datapointer, | |||
uint32_t | datasize, | |||
void * | p | |||
) |
Definition at line 57 of file mainReceiver.cpp.
int main | ( | int | argc, | |
char * | argv[] | |||
) |
Call back for start acquisition callback arguments are filepath filename fileindex datasize
return value is insignificant at the moment we write depending on file write enable users get data to write depending on call backs registered
Call back for acquisition finished callback argument is total frames caught
Call back for raw data args to raw data ready callback are frameNumber is the frame number expLength is the subframe number (32 bit eiger) or real time exposure time in 100ns (others) packetNumber is the packet number bunchId is the bunch id from beamline timestamp is the time stamp with 10 MHz clock modId is the unique module id (unique even for left, right, top, bottom) xCoord is the x coordinate in the complete detector system yCoord is the y coordinate in the complete detector system zCoord is the z coordinate in the complete detector system debug is for debugging purposes roundRNumber is the round robin set number detType is the detector type see :: detectorType version is the version number of this structure format dataPointer is the pointer to the data dataSize in bytes is the size of the data in bytes
Definition at line 74 of file mainReceiver.cpp.
void sigChildExitedHandler | ( | int | sig | ) |
Definition at line 32 of file mainReceiver.cpp.
void sigInterruptHandler | ( | int | p | ) |
Definition at line 39 of file mainReceiver.cpp.
int StartAcq | ( | char * | filepath, | |
char * | filename, | |||
uint64_t | fileindex, | |||
uint32_t | datasize, | |||
void * | p | |||
) |
Definition at line 43 of file mainReceiver.cpp.
pid_t childPid[NUM_RECEIVERS] |
Definition at line 26 of file mainReceiver.cpp.
bool keeprunning |
Definition at line 27 of file mainReceiver.cpp.
int numrunning |
Definition at line 28 of file mainReceiver.cpp.