mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-06 10:00:40 +02:00
changes including warnings and zmq
This commit is contained in:
parent
49b4ae2f56
commit
a1fc93b398
@ -164,7 +164,7 @@ public:
|
||||
* Print all variables
|
||||
*/
|
||||
virtual void Print() const {
|
||||
string temp = slsReceiverDefs::getDetectorType(myDetectorType);
|
||||
std::string temp = slsReceiverDefs::getDetectorType(myDetectorType);
|
||||
printf("\n\nDetector Data Variables:\n");
|
||||
printf( "myDetectorType:%s\n"
|
||||
"Pixels X: %d\n"
|
||||
|
@ -197,6 +197,31 @@ public:
|
||||
uint8_t detType, uint8_t version) {
|
||||
|
||||
char buf[MAX_STR_LENGTH] = "";
|
||||
/** Json Header Format */
|
||||
const char* jsonHeaderFormat =
|
||||
"{"
|
||||
"\"jsonversion\":%u, "
|
||||
"\"bitmode\":%d, "
|
||||
"\"shape\":[%d, %d], "
|
||||
"\"acqIndex\":%llu, "
|
||||
"\"fIndex\":%llu, "
|
||||
"\"fname\":\"%s\", "
|
||||
"\"data\": %d, "
|
||||
|
||||
"\"frameNumber\":%llu, "
|
||||
"\"expLength\":%u, "
|
||||
"\"packetNumber\":%u, "
|
||||
"\"bunchId\":%llu, "
|
||||
"\"timestamp\":%llu, "
|
||||
"\"modId\":%u, "
|
||||
"\"xCoord\":%u, "
|
||||
"\"yCoord\":%u, "
|
||||
"\"zCoord\":%u, "
|
||||
"\"debug\":%u, "
|
||||
"\"roundRNumber\":%u, "
|
||||
"\"detType\":%u, "
|
||||
"\"version\":%u"
|
||||
"}\n\0";
|
||||
int length = sprintf(buf, jsonHeaderFormat,
|
||||
jsonversion, dynamicrange, npixelsx, npixelsy,
|
||||
acqIndex, fIndex, fname, dummy?1:0,
|
||||
@ -435,30 +460,4 @@ private:
|
||||
/** Server Address */
|
||||
char serverAddress[1000];
|
||||
|
||||
/** Json Header Format */
|
||||
static const char* jsonHeaderFormat =
|
||||
"{"
|
||||
"\"jsonversion\":%u, "
|
||||
"\"bitmode\":%d, "
|
||||
"\"shape\":[%d, %d], "
|
||||
"\"acqIndex\":%llu, "
|
||||
"\"fIndex\":%llu, "
|
||||
"\"fname\":\"%s\", "
|
||||
"\"data\": %d, "
|
||||
|
||||
"\"frameNumber\":%llu, "
|
||||
"\"expLength\":%u, "
|
||||
"\"packetNumber\":%u, "
|
||||
"\"bunchId\":%llu, "
|
||||
"\"timestamp\":%llu, "
|
||||
"\"modId\":%u, "
|
||||
"\"xCoord\":%u, "
|
||||
"\"yCoord\":%u, "
|
||||
"\"zCoord\":%u, "
|
||||
"\"debug\":%u, "
|
||||
"\"roundRNumber\":%u, "
|
||||
"\"detType\":%u, "
|
||||
"\"version\":%u"
|
||||
"}\n\0";
|
||||
|
||||
};
|
||||
|
@ -71,7 +71,7 @@ using namespace std;
|
||||
#define DEFAULT_BACKLOG 5
|
||||
#define DEFAULT_UDP_PORTNO 50001
|
||||
#define DEFAULT_GUI_PORTNO 65000
|
||||
#define DEFAULT_ZMQ_PORTNO 70001
|
||||
//#define DEFAULT_ZMQ_PORTNO defined in zmqSocket.h (40001)
|
||||
|
||||
class genericSocket{
|
||||
|
||||
|
@ -295,7 +295,6 @@ int DataStreamer::SendHeader(sls_detector_header* header, bool dummy) {
|
||||
|
||||
uint64_t frameIndex = header->frameNumber - firstMeasurementIndex;
|
||||
uint64_t acquisitionIndex = header->frameNumber - firstAcquisitionIndex;
|
||||
uint32_t subframeIndex = header->expLength;
|
||||
|
||||
return zmqSocket->SendHeaderData(SLS_DETECTOR_JSON_HEADER_VERSION, *dynamicRange,
|
||||
generalData->nPixelsX_Streamer, generalData->nPixelsY_Streamer,
|
||||
|
Loading…
x
Reference in New Issue
Block a user