mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
binaries in
This commit is contained in:
@ -5,7 +5,6 @@ set(SOURCES
|
||||
src/CmdProxy.cpp
|
||||
src/CmdParser.cpp
|
||||
src/Pattern.cpp
|
||||
../slsSupportLib/opensslMd5/md5.c
|
||||
)
|
||||
|
||||
add_library(slsDetectorObject OBJECT
|
||||
@ -14,7 +13,6 @@ add_library(slsDetectorObject OBJECT
|
||||
|
||||
target_include_directories(slsDetectorObject PUBLIC
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../slsSupportLib/opensslMd5>"
|
||||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
|
||||
)
|
||||
|
||||
@ -36,7 +34,6 @@ set(PUBLICHEADERS
|
||||
include/sls/Detector.h
|
||||
include/sls/Result.h
|
||||
include/sls/Pattern.h
|
||||
../slsSupportLib/opensslMd5/md5.h
|
||||
)
|
||||
|
||||
#Shared library
|
||||
|
@ -1,11 +1,11 @@
|
||||
#include "Module.h"
|
||||
#include "SharedMemory.h"
|
||||
#include "md5.h"
|
||||
#include "sls/ClientSocket.h"
|
||||
#include "sls/ToString.h"
|
||||
#include "sls/bit_utils.h"
|
||||
#include "sls/container_utils.h"
|
||||
#include "sls/file_utils.h"
|
||||
#include "sls/md5_helper.h"
|
||||
#include "sls/network_utils.h"
|
||||
#include "sls/sls_detector_exceptions.h"
|
||||
#include "sls/sls_detector_funcs.h"
|
||||
@ -3406,18 +3406,6 @@ sls_detector_module Module::readSettingsFile(const std::string &fname,
|
||||
return myMod;
|
||||
}
|
||||
|
||||
std::string Module::calculateChecksum(char *buffer, ssize_t bytes) {
|
||||
MD5_CTX c;
|
||||
MD5_Init(&c);
|
||||
MD5_Update(&c, buffer, bytes);
|
||||
unsigned char out[MD5_DIGEST_LENGTH];
|
||||
MD5_Final(out, &c);
|
||||
std::ostringstream oss;
|
||||
for (int i = 0; i != MD5_DIGEST_LENGTH; ++i)
|
||||
oss << std::hex << std::setw(2) << std::setfill('0') << +out[i];
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
void Module::programFPGAviaBlackfin(std::vector<char> buffer) {
|
||||
// send program from memory to detector
|
||||
LOG(logINFO) << "Sending programming binary (from pof) to module "
|
||||
@ -3428,7 +3416,7 @@ void Module::programFPGAviaBlackfin(std::vector<char> buffer) {
|
||||
client.Send(filesize);
|
||||
|
||||
// checksum
|
||||
std::string checksum = calculateChecksum(buffer.data(), filesize);
|
||||
std::string checksum = sls::md5_calculate_checksum(buffer.data(), filesize);
|
||||
LOG(logDEBUG1) << "Checksum:" << checksum;
|
||||
char cChecksum[MAX_STR_LENGTH];
|
||||
memset(cChecksum, 0, MAX_STR_LENGTH);
|
||||
@ -3544,7 +3532,7 @@ void Module::programFPGAviaNios(std::vector<char> buffer) {
|
||||
client.Send(filesize);
|
||||
|
||||
// checksum
|
||||
std::string checksum = calculateChecksum(buffer.data(), filesize);
|
||||
std::string checksum = sls::md5_calculate_checksum(buffer.data(), filesize);
|
||||
LOG(logDEBUG1) << "Checksum:" << checksum;
|
||||
char cChecksum[MAX_STR_LENGTH];
|
||||
memset(cChecksum, 0, MAX_STR_LENGTH);
|
||||
|
@ -743,7 +743,6 @@ class Module : public virtual slsDetectorDefs {
|
||||
std::string getTrimbitFilename(detectorSettings settings, int e_eV);
|
||||
sls_detector_module readSettingsFile(const std::string &fname,
|
||||
bool trimbits = true);
|
||||
std::string calculateChecksum(char *buffer, ssize_t bytes);
|
||||
void programFPGAviaBlackfin(std::vector<char> buffer);
|
||||
void programFPGAviaNios(std::vector<char> buffer);
|
||||
|
||||
|
Reference in New Issue
Block a user