mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-08 19:10:42 +02:00
formatting
This commit is contained in:
parent
690947ec3a
commit
0c7759d7e4
@ -2048,11 +2048,12 @@ void *start_timer(void *arg) {
|
|||||||
int colRight = top ? eiger_virtual_detPos[1] + 1 : eiger_virtual_detPos[1];
|
int colRight = top ? eiger_virtual_detPos[1] + 1 : eiger_virtual_detPos[1];
|
||||||
int ntotpixels = 256 * 256 * 4;
|
int ntotpixels = 256 * 256 * 4;
|
||||||
|
|
||||||
LOG(logDEBUG1, (" dr:%d\n bytesperpixel:%f\n tgenable:%d\n datasize:%d\n "
|
LOG(logDEBUG1,
|
||||||
|
(" dr:%d\n bytesperpixel:%f\n tgenable:%d\n datasize:%d\n "
|
||||||
"packetsize:%d\n numpackes:%d\n npixelsx:%d\n databytes:%d\n "
|
"packetsize:%d\n numpackes:%d\n npixelsx:%d\n databytes:%d\n "
|
||||||
"ntotpixels:%d\n",
|
"ntotpixels:%d\n",
|
||||||
dr, bytesPerPixel, tgEnable, datasize, packetsize,
|
dr, bytesPerPixel, tgEnable, datasize, packetsize, numPacketsPerFrame,
|
||||||
numPacketsPerFrame, npixelsx, databytes, ntotpixels));
|
npixelsx, databytes, ntotpixels));
|
||||||
|
|
||||||
// Generate data
|
// Generate data
|
||||||
char imageData[databytes * 2];
|
char imageData[databytes * 2];
|
||||||
@ -2181,7 +2182,8 @@ void *start_timer(void *arg) {
|
|||||||
usleep(eiger_virtual_transmission_delay_right);
|
usleep(eiger_virtual_transmission_delay_right);
|
||||||
sendUDPPacket(1, packetData2, packetsize);
|
sendUDPPacket(1, packetData2, packetsize);
|
||||||
}
|
}
|
||||||
LOG(logINFO, ("Sent frame: %d[%lld]\n", iframes, (long long unsigned int)(frameNr + iframes)));
|
LOG(logINFO, ("Sent frame: %d[%lld]\n", iframes,
|
||||||
|
(long long unsigned int)(frameNr + iframes)));
|
||||||
clock_gettime(CLOCK_REALTIME, &end);
|
clock_gettime(CLOCK_REALTIME, &end);
|
||||||
int64_t timeNs = ((end.tv_sec - begin.tv_sec) * 1E9 +
|
int64_t timeNs = ((end.tv_sec - begin.tv_sec) * 1E9 +
|
||||||
(end.tv_nsec - begin.tv_nsec));
|
(end.tv_nsec - begin.tv_nsec));
|
||||||
|
@ -1818,7 +1818,8 @@ int configureASICVetoReference(int chipIndex, int *gainIndices, int *values) {
|
|||||||
("Unknown gain index %d for channel %d\n", gainIndices[i], i));
|
("Unknown gain index %d for channel %d\n", gainIndices[i], i));
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
revValues[NCHAN - 1 - i] |= gainValue; // reversed list, so NCHAN - 1 - i
|
revValues[NCHAN - 1 - i] |=
|
||||||
|
gainValue; // reversed list, so NCHAN - 1 - i
|
||||||
LOG(logDEBUG2, ("Values[%d]: 0x%x\n", i, revValues[i]));
|
LOG(logDEBUG2, ("Values[%d]: 0x%x\n", i, revValues[i]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "CmdProxy.h"
|
#include "CmdProxy.h"
|
||||||
#include "bit_utils.h"
|
|
||||||
#include "TimeHelper.h"
|
#include "TimeHelper.h"
|
||||||
#include "ToString.h"
|
#include "ToString.h"
|
||||||
|
#include "bit_utils.h"
|
||||||
#include "container_utils.h"
|
#include "container_utils.h"
|
||||||
#include "logger.h"
|
#include "logger.h"
|
||||||
#include "sls_detector_defs.h"
|
#include "sls_detector_defs.h"
|
||||||
|
@ -22,9 +22,7 @@
|
|||||||
|
|
||||||
/** cosntructor & destructor */
|
/** cosntructor & destructor */
|
||||||
|
|
||||||
Implementation::Implementation(const detectorType d) {
|
Implementation::Implementation(const detectorType d) { setDetectorType(d); }
|
||||||
setDetectorType(d);
|
|
||||||
}
|
|
||||||
|
|
||||||
Implementation::~Implementation() {
|
Implementation::~Implementation() {
|
||||||
delete generalData;
|
delete generalData;
|
||||||
|
1
slsSupportLib/include/ClientSocket.h
Executable file → Normal file
1
slsSupportLib/include/ClientSocket.h
Executable file → Normal file
@ -16,6 +16,7 @@ class ClientSocket : public DataSocket {
|
|||||||
void *retval, size_t retval_size);
|
void *retval, size_t retval_size);
|
||||||
|
|
||||||
std::string readErrorMessage();
|
std::string readErrorMessage();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void readReply(int &ret, void *retval, size_t retval_size);
|
void readReply(int &ret, void *retval, size_t retval_size);
|
||||||
struct sockaddr_in serverAddr {};
|
struct sockaddr_in serverAddr {};
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
#include <bitset>
|
#include <bitset>
|
||||||
|
#include <vector>
|
||||||
namespace sls {
|
namespace sls {
|
||||||
template <typename T> std::vector<int> getSetBits(T val) {
|
template <typename T> std::vector<int> getSetBits(T val) {
|
||||||
constexpr size_t bitsPerByte = 8;
|
constexpr size_t bitsPerByte = 8;
|
||||||
|
@ -136,7 +136,8 @@ class slsDetectorDefs {
|
|||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
// For sending and receiving data
|
// For sending and receiving data
|
||||||
static_assert(sizeof(detectorType) == sizeof(int), "enum and int differ in size");
|
static_assert(sizeof(detectorType) == sizeof(int),
|
||||||
|
"enum and int differ in size");
|
||||||
#define MAX_NUM_PACKETS 512
|
#define MAX_NUM_PACKETS 512
|
||||||
using sls_bitset = std::bitset<MAX_NUM_PACKETS>;
|
using sls_bitset = std::bitset<MAX_NUM_PACKETS>;
|
||||||
using bitset_storage = uint8_t[MAX_NUM_PACKETS / 8];
|
using bitset_storage = uint8_t[MAX_NUM_PACKETS / 8];
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
#include "bit_utils.h"
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "bit_utils.h"
|
|
||||||
|
|
||||||
TEST_CASE("Get set bits from 0") {
|
TEST_CASE("Get set bits from 0") {
|
||||||
auto vec = sls::getSetBits(0);
|
auto vec = sls::getSetBits(0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user