mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-08-06 13:52:26 +02:00
* alignedData now uses std::align_alloc * imagedata is now allocated on the heap * m3 server fix for trimbits and badchannels that are shifted by 1 * formatting * binary in * added check for proper memory allocation * commenting out the example in receiver data call back changing size as it affects users using debugging mode to print out headers * fixed warnings * commenting out the example in receiver data call back changing size as it affects users using debugging mode to print out headers * got rid of cast to uint64 * got rid of Reorder function * added sanity check to only enable for chipttestboard and xilinx * removed Gotthard stuff * update the comment about how to modify data on a data call back from the receiver * autogenerated commands and make format * changed font size in GUI * clang-format with clang-format version 17 * updated update_image_size in xilinx * version number automated for python build * mistakenly set version back to 0.0.0 * updated github workflow scripts to support automatic version numbering with environment variable * managed to load VERSION file in yaml file - simplifies things * saving changes in git workflow failed * got typo in github workflow * updatet regex pattern to support postfix * normalized version to PEP 440 specification in update_version.py * bug did not support version 0.0.0 * upgrading to c++17 from c++11 and patch command has to be found before applying patch on libzmq (#1195) * Dev/allow localhost for virtual tests (#1190) * remove the check for localhost being used in rx_hostname for python test for simulators, run rx_arping test only if hostname is not 'localhost' * fix tests for fpath: cannot set back to empty anymore (empty is default) * default rx_hostname arg = localhost, and default settings path =../../settingsdir * changed virtual tests script for better printout on exceptions * fix for catching generaltests exceptions and exiting instead of continuing * fix minor * fixed shared memeory tests to include current env and fixed prints for errors --------- Co-authored-by: Erik Fröjdh <erik.frojdh@gmail.com> * added regex pattern matching to version in toml file * Dev/gitea docker (#1194) * gitea workflows for RH8 and RH9 * using our docker images * version now supports . before postfix * rough draft of test acquire of all detectors for frames caught and file size. ctb not included yet * moved dbitoffset, dbitreorder and dbitlist to GeneralData * added error message on receiver side, throw error * removed log as error already printed * added tests to check file size and frames caught with an acquire (virtual) for every detector * minor printout removed * typo fixed * removed minor printout * incorrect counter mask tested * fix 10g adc enable mask, switched with 1g * fixed hardcoded values of nchip nchan etc from detPArameters * fixed ctb tests, need to fix in develoepr (if digital modfe not enabled, should not take into accoutn dbitlist or dbitoffset or dbitreorder * only reorder bits if some sort of digital readout mode enabled * trying to fix acquire for xilinx * fix for xilinx ctb virtual * alloweing all tests * typo * fix for slsreceiver killed but complaining for virtual tests with script * fixed bug found by @AliceMazzoleni99 that for ctb server is still shown in pgrep -f if xilinx server running, so now the pid is killed and looking for any DetectorServer_virtual instead. also reset color coding after Log * check if process running for kill -9 slsReceiver fail * removed -9 to kill with cleanup * frame synchonrizer fixes: typo of iterator for loop and zmg_msg_t list cleaned up before sending multi part zmq; test written for the frame synchronizer, test_simulator.py rewritten for more robustness and refactoring commonality between both scripts * better error messageS * minor * typo * moving the erasure of the fnum to after sending the zmg packets and also deleteing all old frames when end of acquisition * fix bug in blackfin read access to firmware registers * updates api version based on version file & converted shell script files to python * updated all makefiles * refactoring code and compiling binary * formatting * rewrote end() for StaticVector * rearranged receiver topics, differentiated btween receiver variants and added info about slsFrameSynchronizer * typo * minor aesthetics * minor * added extra fs link and fixed execute_program warning * and now with link * updating pmods * adresses review comments * dummy commit for versionAPI * formatted and updated versionAPI.h * added expat to host section * updated documentation for pip installation as well * Dev/add numpy (#1227) * added numpy dependency * added build specifications for python version and platform * updates files/variants for pmods for 9.2.0 (#1233) * tests for bool in ToString/StringTo (#1230) - Added tests for ToString/StringTo<bool> - Added overload for ToString of bool (previously went through int) * added docs for SLSDETNAME (#1228) * added docs for SLSDETNAME * clarification on hostname * added examples on module index * fixes * fixed typo * Dev/update test framesynchronizer (#1221) * raise an exception if the pull socket python script had errors at startup (for eg if pyzmq was not installed) * minor changes that got lost in the merge of automate_version_part 2 PR --------- Co-authored-by: Erik Fröjdh <erik.frojdh@gmail.com> * added workflow for python wheels * wip * formatting * wip * wip to parse vector of rois at command line * wip * first level test * can get individual rois, but not connected to command yet * rois shoudl work. left to implement tests for individual rois, create multiple datasets (1 for each roi) in the virutal data file. currently virutal dataset with roi is not implemented and a warning is given instead. wonder why since the inviduviaual roi files are clipped * all tests pased * minor * fixed rx_roi for multi modules jungfrau , tests for eiger, multi modules jungfrau in x and 2 interfaces * works for eiger as well * switched to vector instead of std::array<ROI, 2>>, which prints extra [-1, -1] when theres only 1 udp interface * wip * fix for empty roi vectors (which shouldnt be) as you cant know if its all or not in roi * wip: to map roi to virutal * fix for eiger, added python test for testig roi in different module and detector type configurations * wip, fails with master and virtual * works for complete roi * wip, works for a single roi * works for all rois * wip to fix tests * 1d fixes * rois test work on 1d as well * check master file creation as well in rx_roi tests * get rx_roi from metadata from rxr, cant reconstruct. fixed clear roi should give 1 roi min * gui shows roi now * format * updated python bindings * updated master file versions * cmd generation and formatting * minor fixes in command line and help * minor * doesnt happen anymore * comment * minor * redundant getRxROI in Detector class for multi level and module level * refactor cmd parsing (detid can be parsed directly) * refactor cmd line * refactor command line parsing of roi * modified comments about ctb and xilinx not using roi * refactoring * refactorign * refactoring wip * wip refactoring * formattin * to avoid confusion, moved default initialized, single sized declared vector of roi to be created at setDetectorType * pybind only 1 function for getRxROI * command line help * specified number of receiver error message * minor comment * refactored to take out repetitive code, need to adjust for slsMulti and slsFrameSync * wip * works, need to add tests * made Commadnlineoptions into a class * wip test * fixed tests * cleaning up properly , semaphore leaks, child process/thread throwing handled * getuid issue on github workflow * constexpr and checking if options object type is same * unnecessary capture * remove testing code, minor * fixed help, -t for multi should not be supported as it never had it * Formatting * hdf5 definitions in test when not compiled with hdf5 * typo * moved optstring and long options to the constructor * raising a SIGINT when the child thread has an exception so that the parent thread can exit all the threads and clean up gracefully * minor test typo * check status of child exiting and use that to send sigint to all the child processes from the parent * fixed validation in network_utils, added a tests to throw for port 65535 in test mode (option on for sls_use_tests), multi:parent process checks child process exit status to send sigint to others * moving set signal handler to network utils * readoutspeed in rx master file and other master file inconsistencies (#1245) readout speed added to json and h5 master files. Also fixed master file inconsistencies Sserver binaries - update server binaries because readoutspeed needs to be sent to receiver with rx_hostname command API - added const to Detector class set/getburstmode Python - updated python bindings (burstmode const and roi arguments) Cmd generation - added pragma once in Caller.in.h as Caller is included in test files m3: num channels due to #counters < 3 * workaround for m3 for messed up num channels (client always assumes all counters enabled and adds them to num channels), fix for hdf5 g2: exptime master file inconsistency - exptime didnt match because of round of when setting burst mode (sets to a different clk divider) - so updating actual time for all timers (exptime, period, subexptime etc, ) in Module class, get timer values from detector when setting it and then send to receiver to write in master file ctb image size incorrect: - write actual size into master file and not the reserved size (digital reduces depending on dbit list and dbit offset) - added a calculate ctb image size free function in generalData.h that is used there as well as for the tests. master file inconsistencies - refactored master attributes writing using templates - names changed to keep it consistent between json and hdf5 master file (Version, Pixels, Exposure Times, GateDelays, Acquisition Period, etc.) - datatypes changed to keep it simple where possible: imageSize, dynamicRange, tengiga, quad, readnrows, analog, analogsamples, digital, digitalsamples, dbitreorder, dbitoffset, transceivermask, transeiver, transceiversamples, countermask, gates =>int - replacing "toString" with arrays, objects etc for eg for scan, rois, etc. - json header always written (empty dataset or empty brackets) - hdf5 needs const char* so have to convert strings to it, but taking care that strings exist prior to push_back - master attributes (redundant string literals->error prone tests for master file - suppressed deprecated functions in rapidjson warnings just for the tests - added slsREceiverSoftware/src to allow access to receiver_defs.h to test binary/hdf5 version - refactored acquire tests by moving all the acquire tests from individual detector type files to a single one=test-Caller-acquire.cpp - set some default settings (loadBasicSettings) for a basic acquire at load config part for the test_simulator python scripts. so minimum number of settings for detector to be set for any acquire tests. - added tests to test master files for json and hdf5= test-Caller-master-attributes.cpp - added option to add '-m' markers for tests using test_simulator python script * doc: added inst on how to set persistentn NIC changes after reboot for each ethernet interface such as rx 4096, rx-usecs, adaptive-rx and gro etc. * added permanent ethtool settings also for fedora or modern rhel * troubleshooting doc: permanent changes for 10g pc tuning (#1247) * doc: added inst on how to set persistentn NIC changes after reboot for each ethernet interface such as rx 4096, rx-usecs, adaptive-rx and gro etc. * added permanent ethtool settings also for fedora or modern rhel * ifcfg scripts still work on rhel8, just not preferred * added dataformat for jungfrau * eiger basic mod * eiger doc done * added moench * done * free shm exposed in python as free function and detector function * minimum change * added quad and updated about 1gbe/10gbe * more info * remove arguments info * replacing commands with links * minor * detail explanation of eiger * fixed imagesize ctb issue (out values not transferred, setting any dbit values was not recalculatign image size in generaldata) * fixed ctb dbit clock changing period in tests as it was setting run clock instead * python accessing freed shared memory object (#1253) * added a 'isValid' member in shared memory (also updated shm version) with default true, any access to shared memory() checks also for validity. any free will set this to false and then unmap shm. Any access to shm will then check validity in python. * fixed tests for shm * added tests in python as well --------- Co-authored-by: Alice <alice.mazzoleni@psi.ch> * updated error message * made markers argument in ParseArguments a boolean instead of an int * removed relative path compared to where executable run in test script for settingsdir * fix roi test * updating versions (#1258) * updating package version, client version, server versions. Renaming server versions, using hardlinks in serverBin. Removing ctb servers in serverBin. (#1259) * fixed no interpolation mode for moench (#1262) Co-authored-by: Anna Bergamaschi <anna.bergamaschi@psi.ch> * fixed multi receiver and frames sync help throw of bad variant access (#1265) * 1000/doc c standard (#1267) * updated c++11 to c++17 * more about c++11 and updating readme * updated documentation for receiver arguments and also making receiver constructor explicit * minor fix for rxr err message * fixed doc about gcc version * 1000/release notes (#1269) * updated firmware and server version in release notes * release notes wip * updated notes(prs done) * updated release notes. wip * Release notes * minor * minor fix * 1000/doc architecture commands (#1271) * sw architecture and setup commands * 1000/shm free obsolete (#1273) * freeing obsolete shm withoua a 'isValid' should access raw pointers. Need to move this all into the shm class * fixed obsolete shm free issue * minor * ensuring the test works platform independent for size of int * removed verify, update, fixed getUser to be a free function, generated commands, python bindings yet to do * python bindings * fixed tests * minor * minor * format * userdetails refinedg * fixed caller test * updated client api version (#1277) * one doesnt need to open shared memory to call removesharedmemory, and calling hasMemoryvalid without opening will cause segfault (not used now, but could in the future) * fix test on shm * minor * added image source files from draw.io to create the images (#1280) * 1000/fix_actual_tests (#1282) - fix acquire fail in tests (adcreg test) - roi tests fail after overlapping invalid test and acquire after - print udp dest mac in server properly - fixed udp dst list get (server was not sending entry proper size to match proper struct size in client) - updated server binaries and updated hard links in serverBin - added documentation regarding gui: zmqport and zmqip in terms of gui, rx_zmqstream - removed print - probably ended there for debuggung --------- Co-authored-by: Alice <alice.mazzoleni@psi.ch> * 1000/fix_m3_tests (#1286) * testing clkdiv one must ensure the exptime delay etc all are reset to the exact values for tests * change dac max values for vth values for m3 in client side (set module * 1000/doc_cmake (#1289) * more detail documentation in installation * more detail documentation in installation * added links to api examples * reverted back that vthreshold dacs in m3 have min and max as 200 and 2400 (#1294) * update release notes and date (#1298) --------- Co-authored-by: Mazzoleni Alice Francesca <mazzol_a@pc17378.psi.ch> Co-authored-by: Erik Fröjdh <erik.frojdh@gmail.com> Co-authored-by: AliceMazzoleni99 <alice.mazzoleni@psi.ch> Co-authored-by: Martin Mueller <martin.mueller@psi.ch> Co-authored-by: froejdh_e <erik.frojdh@psi.ch> Co-authored-by: Anna Bergamaschi <anna.bergamaschi@psi.ch>
842 lines
34 KiB
C++
842 lines
34 KiB
C++
// SPDX-License-Identifier: LGPL-3.0-or-other
|
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
|
#pragma once
|
|
#include "SharedMemory.h"
|
|
#include "sls/ClientSocket.h"
|
|
#include "sls/Pattern.h"
|
|
#include "sls/StaticVector.h"
|
|
#include "sls/logger.h"
|
|
#include "sls/network_utils.h"
|
|
#include "sls/sls_detector_defs.h"
|
|
|
|
#include <array>
|
|
#include <cmath>
|
|
#include <map>
|
|
#include <vector>
|
|
|
|
namespace sls {
|
|
|
|
class ServerInterface;
|
|
|
|
#define MODULE_SHMAPIVERSION 0x190726
|
|
#define MODULE_SHMVERSION 0x250820
|
|
|
|
/**
|
|
* @short structure allocated in shared memory to store Module settings for
|
|
* IPC and cache
|
|
*/
|
|
struct sharedModule {
|
|
|
|
/* FIXED PATTERN FOR STATIC FUNCTIONS. DO NOT CHANGE, ONLY APPEND ------*/
|
|
|
|
int shmversion;
|
|
char hostname[MAX_STR_LENGTH];
|
|
slsDetectorDefs::detectorType detType;
|
|
bool isValid{true}; // false if freed to block access from python or c++ api
|
|
|
|
/** END OF FIXED PATTERN -----------------------------------------------*/
|
|
|
|
slsDetectorDefs::xy numberOfModule;
|
|
uint16_t controlPort;
|
|
uint16_t stopPort;
|
|
char settingsDir[MAX_STR_LENGTH];
|
|
/** list of the energies at which the Module has been trimmed */
|
|
StaticVector<int, MAX_TRIMEN> trimEnergies;
|
|
/** number of channels per chip */
|
|
slsDetectorDefs::xy nChan;
|
|
slsDetectorDefs::xy nChip;
|
|
int nDacs;
|
|
char rxHostname[MAX_STR_LENGTH];
|
|
uint16_t rxTCPPort;
|
|
/** if rxHostname and rxTCPPort can be connected to */
|
|
bool useReceiverFlag;
|
|
/** Listening tcp port from gui (only data) */
|
|
uint16_t zmqport;
|
|
/** Listening tcp ip address from gui (only data) **/
|
|
IpAddr zmqip;
|
|
int numUDPInterfaces;
|
|
/** to inform rxr when stopping rxr */
|
|
bool stoppedFlag;
|
|
};
|
|
|
|
class Module : public virtual slsDetectorDefs {
|
|
public:
|
|
/**************************************************
|
|
* *
|
|
* Configuration *
|
|
* *
|
|
* ************************************************/
|
|
|
|
/** creating new shared memory */
|
|
explicit Module(detectorType type, int det_id = 0, int module_index = 0);
|
|
|
|
/** opening existing shared memory */
|
|
explicit Module(int det_id = 0, int module_index = 0);
|
|
|
|
bool isFixedPatternSharedMemoryCompatible() const;
|
|
std::string getHostname() const;
|
|
|
|
/** initialChecks is enable or disable initial compatibility checks and
|
|
other server start up checks. Enabled by default. Disable only for advanced
|
|
users! */
|
|
void setHostname(const std::string &hostname, const bool initialChecks);
|
|
|
|
int64_t getFirmwareVersion() const;
|
|
int64_t getFrontEndFirmwareVersion(const fpgaPosition fpgaPosition) const;
|
|
std::string getControlServerLongVersion() const;
|
|
std::string getStopServerLongVersion() const;
|
|
void throwDeprecatedServerVersion() const;
|
|
std::string getDetectorServerVersion() const;
|
|
std::string getHardwareVersion() const;
|
|
std::string getKernelVersion() const;
|
|
int64_t getSerialNumber() const;
|
|
int getModuleId() const;
|
|
std::string getReceiverSoftwareVersion() const;
|
|
static detectorType
|
|
getTypeFromDetector(const std::string &hostname,
|
|
uint16_t cport = DEFAULT_TCP_CNTRL_PORTNO);
|
|
|
|
/** Get Detector type from shared memory */
|
|
detectorType getDetectorType() const;
|
|
void updateNumberOfChannels();
|
|
slsDetectorDefs::xy getNumberOfChannels() const;
|
|
void updateNumberOfModule(slsDetectorDefs::xy det);
|
|
detectorSettings getSettings() const;
|
|
void setSettings(detectorSettings isettings);
|
|
int getThresholdEnergy() const;
|
|
std::array<int, 3> getAllThresholdEnergy() const;
|
|
void setThresholdEnergy(int e_eV, detectorSettings isettings,
|
|
bool trimbits);
|
|
void setAllThresholdEnergy(std::array<int, 3> e_eV,
|
|
detectorSettings isettings, bool trimbits);
|
|
std::string getSettingsDir() const;
|
|
std::string setSettingsDir(const std::string &dir);
|
|
void loadTrimbits(const std::string &fname);
|
|
void saveTrimbits(const std::string &fname);
|
|
int getAllTrimbits() const;
|
|
void setAllTrimbits(int val);
|
|
std::vector<int> getTrimEn() const;
|
|
int setTrimEn(const std::vector<int> &energies = {});
|
|
bool getFlipRows() const;
|
|
void setFlipRows(bool value);
|
|
bool isMaster() const;
|
|
void setMaster(const bool master);
|
|
bool getSynchronization() const;
|
|
bool getSynchronizationFromStopServer() const;
|
|
void setSynchronization(const bool value);
|
|
std::vector<int> getBadChannels() const;
|
|
void setBadChannels(std::vector<int> list);
|
|
int getRow() const;
|
|
void setRow(const int value);
|
|
int getColumn() const;
|
|
void setColumn(const int value);
|
|
|
|
bool isVirtualDetectorServer() const;
|
|
|
|
/**************************************************
|
|
* *
|
|
* Acquisition Parameters *
|
|
* *
|
|
* ************************************************/
|
|
int64_t getNumberOfFrames() const;
|
|
void setNumberOfFrames(int64_t value);
|
|
int64_t getNumberOfTriggers() const;
|
|
void setNumberOfTriggers(int64_t value);
|
|
/** [Mythen3] gatIndex: 0-2, [Others]: -1 always */
|
|
int64_t getExptime(int gateIndex) const;
|
|
/** [Mythen3] gatIndex: -1 for all, 0-2, [Others]: -1 always */
|
|
void setExptime(int gateIndex, int64_t value);
|
|
int64_t getPeriod() const;
|
|
void setPeriod(int64_t value);
|
|
int64_t getDelayAfterTrigger() const;
|
|
void setDelayAfterTrigger(int64_t value);
|
|
int64_t getNumberOfFramesLeft() const;
|
|
int64_t getNumberOfTriggersLeft() const;
|
|
int64_t getDelayAfterTriggerLeft() const;
|
|
int64_t getPeriodLeft() const;
|
|
int getDynamicRange() const;
|
|
void setDynamicRange(int dr);
|
|
timingMode getTimingMode() const;
|
|
void setTimingMode(timingMode value);
|
|
speedLevel getReadoutSpeed() const;
|
|
void setReadoutSpeed(speedLevel value);
|
|
int getClockDivider(int clkIndex) const;
|
|
void setClockDivider(int clkIndex, int value);
|
|
int getClockPhase(int clkIndex, bool inDegrees) const;
|
|
void setClockPhase(int clkIndex, int value, bool inDegrees);
|
|
int getMaxClockPhaseShift(int clkIndex) const;
|
|
int getClockFrequency(int clkIndex) const;
|
|
void setClockFrequency(int clkIndex, int value);
|
|
int getDefaultDac(slsDetectorDefs::dacIndex index,
|
|
slsDetectorDefs::detectorSettings sett);
|
|
void setDefaultDac(slsDetectorDefs::dacIndex index, int defaultValue,
|
|
defs::detectorSettings sett);
|
|
void resetToDefaultDacs(const bool hardReset);
|
|
int getDAC(dacIndex index, bool mV) const;
|
|
void setDAC(int val, dacIndex index, bool mV);
|
|
bool getPowerChip() const;
|
|
void setPowerChip(bool on);
|
|
int getImageTestMode() const;
|
|
void setImageTestMode(const int value);
|
|
/* temperature in millidegrees */
|
|
int getADC(dacIndex index) const;
|
|
int getOnChipDAC(slsDetectorDefs::dacIndex index, int chipIndex) const;
|
|
void setOnChipDAC(slsDetectorDefs::dacIndex index, int chipIndex,
|
|
int value);
|
|
externalSignalFlag getExternalSignalFlags(int signalIndex) const;
|
|
void setExternalSignalFlags(int signalIndex, externalSignalFlag type);
|
|
bool getParallelMode() const;
|
|
void setParallelMode(const bool enable);
|
|
int getFilterResistor() const;
|
|
void setFilterResistor(int value);
|
|
defs::currentSrcParameters getCurrentSource() const;
|
|
void setCurrentSource(defs::currentSrcParameters par);
|
|
int getDBITPipeline() const;
|
|
void setDBITPipeline(int value);
|
|
int getReadNRows() const;
|
|
void setReadNRows(const int value);
|
|
|
|
/**************************************************
|
|
* *
|
|
* Acquisition *
|
|
* *
|
|
* ************************************************/
|
|
void startReceiver();
|
|
void stopReceiver();
|
|
void startAcquisition();
|
|
void startReadout();
|
|
void stopAcquisition();
|
|
void restreamStopFromReceiver();
|
|
void startAndReadAll();
|
|
runStatus getRunStatus() const;
|
|
runStatus getReceiverStatus() const;
|
|
double getReceiverProgress() const;
|
|
std::vector<int64_t> getFramesCaughtByReceiver() const;
|
|
std::vector<int64_t> getNumMissingPackets() const;
|
|
std::vector<int64_t> getReceiverCurrentFrameIndex() const;
|
|
uint64_t getNextFrameNumber() const;
|
|
void setNextFrameNumber(uint64_t value);
|
|
void sendSoftwareTrigger(const bool block);
|
|
defs::scanParameters getScan() const;
|
|
void setScan(const defs::scanParameters t);
|
|
std::string getScanErrorMessage() const;
|
|
|
|
/**************************************************
|
|
* *
|
|
* Network Configuration (Detector<->Receiver) *
|
|
* *
|
|
* ************************************************/
|
|
int getNumberofUDPInterfacesFromShm() const;
|
|
void updateNumberofUDPInterfaces();
|
|
void setNumberofUDPInterfaces(int n);
|
|
int getSelectedUDPInterface() const;
|
|
void selectUDPInterface(int n);
|
|
IpAddr getSourceUDPIP() const;
|
|
void setSourceUDPIP(const IpAddr ip);
|
|
IpAddr getSourceUDPIP2() const;
|
|
void setSourceUDPIP2(const IpAddr ip);
|
|
MacAddr getSourceUDPMAC() const;
|
|
void setSourceUDPMAC(const MacAddr mac);
|
|
MacAddr getSourceUDPMAC2() const;
|
|
void setSourceUDPMAC2(const MacAddr mac);
|
|
UdpDestination getDestinationUDPList(const uint32_t entry) const;
|
|
void setDestinationUDPList(const UdpDestination dest);
|
|
int getNumberofUDPDestinations() const;
|
|
void clearUDPDestinations();
|
|
int getFirstUDPDestination() const;
|
|
void setFirstUDPDestination(const int value);
|
|
IpAddr getDestinationUDPIP() const;
|
|
void setDestinationUDPIP(const IpAddr ip);
|
|
IpAddr getDestinationUDPIP2() const;
|
|
void setDestinationUDPIP2(const IpAddr ip);
|
|
MacAddr getDestinationUDPMAC() const;
|
|
void setDestinationUDPMAC(const MacAddr mac);
|
|
MacAddr getDestinationUDPMAC2() const;
|
|
void setDestinationUDPMAC2(const MacAddr mac);
|
|
uint16_t getDestinationUDPPort() const;
|
|
void setDestinationUDPPort(uint16_t udpport);
|
|
uint16_t getDestinationUDPPort2() const;
|
|
void setDestinationUDPPort2(uint16_t udpport);
|
|
void reconfigureUDPDestination();
|
|
void validateUDPConfiguration();
|
|
std::string printReceiverConfiguration();
|
|
bool getTenGiga() const;
|
|
void setTenGiga(bool value);
|
|
bool getTenGigaFlowControl() const;
|
|
void setTenGigaFlowControl(bool enable);
|
|
int getTransmissionDelayFrame() const;
|
|
void setTransmissionDelayFrame(int value);
|
|
int getTransmissionDelayLeft() const;
|
|
void setTransmissionDelayLeft(int value);
|
|
int getTransmissionDelayRight() const;
|
|
void setTransmissionDelayRight(int value);
|
|
|
|
/**************************************************
|
|
* *
|
|
* Receiver Config *
|
|
* *
|
|
* ************************************************/
|
|
bool getUseReceiverFlag() const;
|
|
std::string getReceiverHostname() const;
|
|
void setReceiverHostname(const std::string &hostname, const uint16_t port,
|
|
const bool initialChecks);
|
|
uint16_t getReceiverPort() const;
|
|
void setReceiverPort(uint16_t port_number);
|
|
int getReceiverFifoDepth() const;
|
|
void setReceiverFifoDepth(int n_frames);
|
|
bool getReceiverSilentMode() const;
|
|
void setReceiverSilentMode(bool enable);
|
|
frameDiscardPolicy getReceiverFramesDiscardPolicy() const;
|
|
void setReceiverFramesDiscardPolicy(frameDiscardPolicy f);
|
|
bool getPartialFramesPadding() const;
|
|
void setPartialFramesPadding(bool padding);
|
|
int getReceiverUDPSocketBufferSize() const;
|
|
int getReceiverRealUDPSocketBufferSize() const;
|
|
void setReceiverUDPSocketBufferSize(int udpsockbufsize);
|
|
bool getReceiverLock() const;
|
|
void setReceiverLock(bool lock);
|
|
IpAddr getReceiverLastClientIP() const;
|
|
std::array<pid_t, NUM_RX_THREAD_IDS> getReceiverThreadIds() const;
|
|
bool getRxArping() const;
|
|
void setRxArping(bool enable);
|
|
std::vector<defs::ROI> getRxROI() const;
|
|
void setRxROI(const std::vector<slsDetectorDefs::ROI> &portRois);
|
|
void setRxROIMetadata(const std::vector<slsDetectorDefs::ROI> &args);
|
|
std::vector<slsDetectorDefs::ROI> getRxROIMetadata() const;
|
|
|
|
/**************************************************
|
|
* *
|
|
* File *
|
|
* *
|
|
* ************************************************/
|
|
fileFormat getFileFormat() const;
|
|
void setFileFormat(fileFormat f);
|
|
std::string getFilePath() const;
|
|
void setFilePath(const std::string &path);
|
|
std::string getFileName() const;
|
|
void setFileName(const std::string &fname);
|
|
int64_t getFileIndex() const;
|
|
void setFileIndex(int64_t file_index);
|
|
void incrementFileIndex();
|
|
bool getFileWrite() const;
|
|
void setFileWrite(bool value);
|
|
bool getMasterFileWrite() const;
|
|
void setMasterFileWrite(bool value);
|
|
bool getFileOverWrite() const;
|
|
void setFileOverWrite(bool value);
|
|
int getFramesPerFile() const;
|
|
/** 0 will set frames per file to unlimited */
|
|
void setFramesPerFile(int n_frames);
|
|
|
|
/**************************************************
|
|
* *
|
|
* ZMQ Streaming Parameters (Receiver<->Client)*
|
|
* *
|
|
* ************************************************/
|
|
bool getReceiverStreaming() const;
|
|
void setReceiverStreaming(bool enable);
|
|
int getReceiverStreamingFrequency() const;
|
|
/** Option: nth frame streamed out, if 0, streamed out at a timer of 200 */
|
|
void setReceiverStreamingFrequency(int freq);
|
|
int getReceiverStreamingTimer() const;
|
|
void setReceiverStreamingTimer(int time_in_ms = 200);
|
|
int getReceiverStreamingStartingFrame() const;
|
|
void setReceiverStreamingStartingFrame(int fnum);
|
|
uint16_t getReceiverStreamingPort() const;
|
|
void setReceiverStreamingPort(uint16_t port);
|
|
uint16_t getClientStreamingPort() const;
|
|
void setClientStreamingPort(uint16_t port);
|
|
IpAddr getClientStreamingIP() const;
|
|
void setClientStreamingIP(const IpAddr ip);
|
|
int getReceiverStreamingHwm() const;
|
|
void setReceiverStreamingHwm(const int limit);
|
|
|
|
/**************************************************
|
|
* *
|
|
* Eiger Specific *
|
|
* *
|
|
* ************************************************/
|
|
int64_t getSubExptime() const;
|
|
void setSubExptime(int64_t value);
|
|
int64_t getSubDeadTime() const;
|
|
void setSubDeadTime(int64_t value);
|
|
bool getOverFlowMode() const;
|
|
void setOverFlowMode(const bool enable);
|
|
int64_t getRateCorrection() const;
|
|
void setDefaultRateCorrection();
|
|
void setRateCorrection(int64_t t = 0);
|
|
void sendReceiverRateCorrections(const std::vector<int64_t> &t);
|
|
bool getInterruptSubframe() const;
|
|
void setInterruptSubframe(const bool enable);
|
|
int64_t getMeasuredPeriod() const;
|
|
int64_t getMeasuredSubFramePeriod() const;
|
|
bool getActivate() const;
|
|
void setActivate(const bool enable);
|
|
bool getCounterBit() const;
|
|
void setCounterBit(bool cb);
|
|
void pulsePixel(int n = 0, int x = 0, int y = 0);
|
|
void pulsePixelNMove(int n = 0, int x = 0, int y = 0);
|
|
void pulseChip(int n_pulses = 0);
|
|
bool getQuad() const;
|
|
void setQuad(const bool enable);
|
|
bool getDataStream(const portPosition port) const;
|
|
void setDataStream(const portPosition port, const bool enable);
|
|
bool getTop() const;
|
|
void setTop(bool value);
|
|
|
|
/**************************************************
|
|
* *
|
|
* Jungfrau/Moench Specific *
|
|
* *
|
|
* ************************************************/
|
|
double getChipVersion() const;
|
|
int getThresholdTemperature() const;
|
|
void setThresholdTemperature(int val);
|
|
bool getTemperatureControl() const;
|
|
void setTemperatureControl(bool val);
|
|
int getTemperatureEvent() const;
|
|
void resetTemperatureEvent();
|
|
bool getAutoComparatorDisableMode() const;
|
|
void setAutoComparatorDisableMode(bool val);
|
|
int64_t getComparatorDisableTime() const;
|
|
void setComparatorDisableTime(int64_t value);
|
|
int getNumberOfAdditionalStorageCells() const;
|
|
void setNumberOfAdditionalStorageCells(int value);
|
|
int getStorageCellStart() const;
|
|
void setStorageCellStart(int pos);
|
|
int64_t getStorageCellDelay() const;
|
|
void setStorageCellDelay(int64_t value);
|
|
gainMode getGainMode() const;
|
|
void setGainMode(const gainMode mode);
|
|
int getNumberOfFilterCells() const;
|
|
void setNumberOfFilterCells(int value);
|
|
defs::pedestalParameters getPedestalMode() const;
|
|
void setPedestalMode(defs::pedestalParameters par);
|
|
defs::timingInfoDecoder getTimingInfoDecoder() const;
|
|
void setTimingInfoDecoder(const defs::timingInfoDecoder enable);
|
|
defs::collectionMode getCollectionMode() const;
|
|
void setCollectionMode(const defs::collectionMode enable);
|
|
|
|
/**************************************************
|
|
* *
|
|
* Gotthard2 Specific *
|
|
* *
|
|
* ************************************************/
|
|
int64_t getNumberOfBursts() const;
|
|
void setNumberOfBursts(int64_t value);
|
|
int64_t getBurstPeriod() const;
|
|
void setBurstPeriod(int64_t value);
|
|
int64_t getNumberOfBurstsLeft() const;
|
|
std::array<int, 2> getInjectChannel() const;
|
|
void setInjectChannel(const int offsetChannel, const int incrementChannel);
|
|
void sendVetoPhoton(const int chipIndex,
|
|
const std::vector<int> &gainIndices,
|
|
const std::vector<int> &values);
|
|
void getVetoPhoton(const int chipIndex, const std::string &fname) const;
|
|
void setVetoPhoton(const int chipIndex, const int numPhotons,
|
|
const int energy, const std::string &fname);
|
|
void setVetoReference(const int gainIndex, const int value);
|
|
void setVetoFile(const int chipIndex, const std::string &fname);
|
|
burstMode getBurstMode() const;
|
|
void setBurstMode(burstMode value);
|
|
bool getCDSGain() const;
|
|
void setCDSGain(bool value);
|
|
slsDetectorDefs::timingSourceType getTimingSource() const;
|
|
void setTimingSource(slsDetectorDefs::timingSourceType value);
|
|
bool getVeto() const;
|
|
void setVeto(bool enable);
|
|
bool getVetoStream() const;
|
|
void setVetoStream(const bool value);
|
|
slsDetectorDefs::vetoAlgorithm
|
|
getVetoAlgorithm(const slsDetectorDefs::streamingInterface interface) const;
|
|
void setVetoAlgorithm(const slsDetectorDefs::vetoAlgorithm alg,
|
|
const slsDetectorDefs::streamingInterface interface);
|
|
int getADCConfiguration(const int chipIndex, const int adcIndex) const;
|
|
void setADCConfiguration(const int chipIndex, const int adcIndex,
|
|
int value);
|
|
|
|
/**************************************************
|
|
* *
|
|
* Mythen3 Specific *
|
|
* *
|
|
* ************************************************/
|
|
uint32_t getCounterMask() const;
|
|
void setCounterMask(uint32_t countermask);
|
|
int getNumberOfGates() const;
|
|
void setNumberOfGates(int value);
|
|
std::array<time::ns, 3> getExptimeForAllGates() const;
|
|
int64_t getGateDelay(int gateIndex) const;
|
|
void setGateDelay(int gateIndex, int64_t value);
|
|
std::array<time::ns, 3> getGateDelayForAllGates() const;
|
|
int getChipStatusRegister() const;
|
|
void setGainCaps(int caps);
|
|
int getGainCaps();
|
|
defs::polarity getPolarity() const;
|
|
void setPolarity(const defs::polarity enable);
|
|
bool getInterpolation() const;
|
|
void setInterpolation(const bool enable);
|
|
bool getPumpProbe() const;
|
|
void setPumpProbe(const bool enable);
|
|
bool getAnalogPulsing() const;
|
|
void setAnalogPulsing(const bool enable);
|
|
bool getDigitalPulsing() const;
|
|
void setDigitalPulsing(const bool enable);
|
|
|
|
/**************************************************
|
|
* *
|
|
* CTB Specific *
|
|
* *
|
|
* ************************************************/
|
|
int getNumberOfAnalogSamples() const;
|
|
void setNumberOfAnalogSamples(int value);
|
|
uint32_t getADCEnableMask() const;
|
|
void setADCEnableMask(uint32_t mask);
|
|
uint32_t getTenGigaADCEnableMask() const;
|
|
void setTenGigaADCEnableMask(uint32_t mask);
|
|
uint32_t getTransceiverEnableMask() const;
|
|
void setTransceiverEnableMask(uint32_t mask);
|
|
int getNumberOfDigitalSamples() const;
|
|
void setNumberOfDigitalSamples(int value);
|
|
int getNumberOfTransceiverSamples() const;
|
|
void setNumberOfTransceiverSamples(int value);
|
|
readoutMode getReadoutMode() const;
|
|
void setReadoutMode(const readoutMode mode);
|
|
int getExternalSamplingSource();
|
|
int setExternalSamplingSource(int value);
|
|
bool getExternalSampling() const;
|
|
void setExternalSampling(bool value);
|
|
std::vector<int> getReceiverDbitList() const;
|
|
void setReceiverDbitList(std::vector<int> list);
|
|
int getReceiverDbitOffset() const;
|
|
void setReceiverDbitOffset(int value);
|
|
bool getReceiverDbitReorder() const;
|
|
void setReceiverDbitReorder(bool value);
|
|
void setDigitalIODelay(uint64_t pinMask, int delay);
|
|
bool getLEDEnable() const;
|
|
void setLEDEnable(bool enable);
|
|
|
|
/**************************************************
|
|
* *
|
|
* Xilinx Ctb Specific *
|
|
* *
|
|
* ************************************************/
|
|
void configureTransceiver();
|
|
|
|
/**************************************************
|
|
* *
|
|
* Pattern *
|
|
* *
|
|
* ************************************************/
|
|
std::string getPatterFileName() const;
|
|
void setPattern(const Pattern &pat, const std::string &fname);
|
|
Pattern getPattern();
|
|
void loadDefaultPattern();
|
|
uint64_t getPatternIOControl() const;
|
|
void setPatternIOControl(uint64_t word);
|
|
uint64_t getPatternWord(int addr) const;
|
|
void setPatternWord(int addr, uint64_t word);
|
|
std::array<int, 2> getPatternLoopAddresses(int level) const;
|
|
void setPatternLoopAddresses(int level, int start, int stop);
|
|
int getPatternLoopCycles(int level) const;
|
|
void setPatternLoopCycles(int level, int n);
|
|
int getPatternWaitAddr(int level) const;
|
|
void setPatternWaitAddr(int level, int addr);
|
|
uint64_t getPatternWaitClocks(int level) const;
|
|
void setPatternWaitClocks(int level, uint64_t t);
|
|
uint64_t getPatternWaitInterval(int level) const;
|
|
void setPatternWaitInterval(int level, uint64_t t);
|
|
uint64_t getPatternMask() const;
|
|
void setPatternMask(uint64_t mask);
|
|
uint64_t getPatternBitMask() const;
|
|
void setPatternBitMask(uint64_t mask);
|
|
void startPattern();
|
|
|
|
/**************************************************
|
|
* *
|
|
* Json Header specific *
|
|
* *
|
|
* ************************************************/
|
|
std::map<std::string, std::string> getAdditionalJsonHeader() const;
|
|
void setAdditionalJsonHeader(
|
|
const std::map<std::string, std::string> &jsonHeader);
|
|
std::string getAdditionalJsonParameter(const std::string &key) const;
|
|
void setAdditionalJsonParameter(const std::string &key,
|
|
const std::string &value);
|
|
|
|
/**************************************************
|
|
* *
|
|
* Advanced *
|
|
* *
|
|
* ************************************************/
|
|
int getADCPipeline() const;
|
|
void setADCPipeline(int value);
|
|
void programFPGA(std::vector<char> buffer,
|
|
const bool forceDeleteNormalFile);
|
|
void resetFPGA();
|
|
void updateDetectorServer(std::vector<char> buffer,
|
|
const std::string &serverName);
|
|
void updateKernel(std::vector<char> buffer);
|
|
void rebootController();
|
|
bool getUpdateMode() const;
|
|
void setUpdateMode(const bool updatemode);
|
|
uint32_t readRegister(uint32_t addr) const;
|
|
void writeRegister(uint32_t addr, uint32_t val, bool validate);
|
|
void setBit(uint32_t addr, int n, bool validate);
|
|
void clearBit(uint32_t addr, int n, bool validate);
|
|
int getBit(uint32_t addr, int n);
|
|
void executeFirmwareTest();
|
|
void executeBusTest();
|
|
void writeAdcRegister(uint32_t addr, uint32_t val);
|
|
uint32_t getADCInvert() const;
|
|
void setADCInvert(uint32_t value);
|
|
|
|
/**************************************************
|
|
* *
|
|
* Insignificant *
|
|
* *
|
|
* ************************************************/
|
|
uint16_t getControlPort() const;
|
|
void setControlPort(uint16_t port_number);
|
|
uint16_t getStopPort() const;
|
|
void setStopPort(uint16_t port_number);
|
|
bool getLockDetector() const;
|
|
void setLockDetector(bool lock);
|
|
IpAddr getLastClientIP() const;
|
|
std::string executeCommand(const std::string &cmd);
|
|
int64_t getNumberOfFramesFromStart() const;
|
|
int64_t getActualTime() const;
|
|
int64_t getMeasurementTime() const;
|
|
|
|
private:
|
|
std::string getReceiverLongVersion() const;
|
|
|
|
void checkArgs(const void *args, size_t args_size, void *retval,
|
|
size_t retval_size) const;
|
|
|
|
/**
|
|
* Send function parameters to detector (control server)
|
|
* @param fnum function enum
|
|
* @param args argument pointer
|
|
* @param args_size size of argument
|
|
* @param retval return pointers
|
|
* @param retval_size size of return value
|
|
*/
|
|
void sendToDetector(int fnum, const void *args, size_t args_size,
|
|
void *retval, size_t retval_size);
|
|
|
|
void sendToDetector(int fnum, const void *args, size_t args_size,
|
|
void *retval, size_t retval_size) const;
|
|
|
|
template <typename Arg, typename Ret>
|
|
void sendToDetector(int fnum, const Arg &args, Ret &retval);
|
|
|
|
template <typename Arg, typename Ret>
|
|
void sendToDetector(int fnum, const Arg &args, Ret &retval) const;
|
|
|
|
template <typename Arg>
|
|
void sendToDetector(int fnum, const Arg &args, std::nullptr_t);
|
|
|
|
template <typename Arg>
|
|
void sendToDetector(int fnum, const Arg &args, std::nullptr_t) const;
|
|
|
|
template <typename Ret>
|
|
void sendToDetector(int fnum, std::nullptr_t, Ret &retval);
|
|
|
|
template <typename Ret>
|
|
void sendToDetector(int fnum, std::nullptr_t, Ret &retval) const;
|
|
|
|
void sendToDetector(int fnum);
|
|
void sendToDetector(int fnum) const;
|
|
|
|
template <typename Ret> Ret sendToDetector(int fnum);
|
|
template <typename Ret> Ret sendToDetector(int fnum) const;
|
|
|
|
template <typename Ret, typename Arg>
|
|
Ret sendToDetector(int fnum, const Arg &args);
|
|
|
|
template <typename Ret, typename Arg>
|
|
Ret sendToDetector(int fnum, const Arg &args) const;
|
|
|
|
/** Send function parameters to detector (stop server) */
|
|
void sendToDetectorStop(int fnum, const void *args, size_t args_size,
|
|
void *retval, size_t retval_size);
|
|
|
|
void sendToDetectorStop(int fnum, const void *args, size_t args_size,
|
|
void *retval, size_t retval_size) const;
|
|
|
|
template <typename Arg, typename Ret>
|
|
void sendToDetectorStop(int fnum, const Arg &args, Ret &retval);
|
|
|
|
template <typename Arg, typename Ret>
|
|
void sendToDetectorStop(int fnum, const Arg &args, Ret &retval) const;
|
|
|
|
template <typename Arg>
|
|
void sendToDetectorStop(int fnum, const Arg &args, std::nullptr_t);
|
|
|
|
template <typename Arg>
|
|
void sendToDetectorStop(int fnum, const Arg &args, std::nullptr_t) const;
|
|
|
|
template <typename Ret>
|
|
void sendToDetectorStop(int fnum, std::nullptr_t, Ret &retval);
|
|
|
|
template <typename Ret>
|
|
void sendToDetectorStop(int fnum, std::nullptr_t, Ret &retval) const;
|
|
|
|
void sendToDetectorStop(int fnum);
|
|
|
|
void sendToDetectorStop(int fnum) const;
|
|
|
|
template <typename Ret> Ret sendToDetectorStop(int fnum);
|
|
|
|
template <typename Ret> Ret sendToDetectorStop(int fnum) const;
|
|
|
|
template <typename Ret, typename Arg>
|
|
Ret sendToDetectorStop(int fnum, const Arg &args);
|
|
|
|
template <typename Ret, typename Arg>
|
|
Ret sendToDetectorStop(int fnum, const Arg &args) const;
|
|
|
|
/** Send function parameters to receiver */
|
|
void sendToReceiver(int fnum, const void *args, size_t args_size,
|
|
void *retval, size_t retval_size);
|
|
|
|
void sendToReceiver(int fnum, const void *args, size_t args_size,
|
|
void *retval, size_t retval_size) const;
|
|
|
|
template <typename Arg, typename Ret>
|
|
void sendToReceiver(int fnum, const Arg &args, Ret &retval);
|
|
|
|
template <typename Arg, typename Ret>
|
|
void sendToReceiver(int fnum, const Arg &args, Ret &retval) const;
|
|
|
|
template <typename Arg>
|
|
void sendToReceiver(int fnum, const Arg &args, std::nullptr_t);
|
|
|
|
template <typename Arg>
|
|
void sendToReceiver(int fnum, const Arg &args, std::nullptr_t) const;
|
|
|
|
template <typename Ret>
|
|
void sendToReceiver(int fnum, std::nullptr_t, Ret &retval);
|
|
|
|
template <typename Ret>
|
|
void sendToReceiver(int fnum, std::nullptr_t, Ret &retval) const;
|
|
|
|
template <typename Ret> Ret sendToReceiver(int fnum);
|
|
|
|
template <typename Ret> Ret sendToReceiver(int fnum) const;
|
|
|
|
void sendToReceiver(int fnum);
|
|
|
|
void sendToReceiver(int fnum) const;
|
|
|
|
template <typename Ret, typename Arg>
|
|
Ret sendToReceiver(int fnum, const Arg &args);
|
|
|
|
template <typename Ret, typename Arg>
|
|
Ret sendToReceiver(int fnum, const Arg &args) const;
|
|
|
|
void createSharedMemory(detectorType type, int det_id);
|
|
void openSharedMemory(int det_id);
|
|
|
|
/** Initialize module structure to defaults,
|
|
Called when new shared memory is created */
|
|
void initializeModuleStructure(detectorType type);
|
|
|
|
void initialDetectorServerChecks();
|
|
const std::string getDetectorAPI() const;
|
|
void checkDetectorVersionCompatibility();
|
|
void checkReceiverVersionCompatibility();
|
|
void setModule(sls_detector_module &module, bool trimbits = true);
|
|
sls_detector_module getModule();
|
|
void sendModule(sls_detector_module *myMod, ClientSocket &client);
|
|
void receiveModule(sls_detector_module *myMod, ClientSocket &client);
|
|
void updateClientStreamingIP();
|
|
|
|
void updateRateCorrection();
|
|
/** Template function to do linear interpolation between two points (Eiger
|
|
only) */
|
|
template <typename E, typename V>
|
|
V linearInterpolation(const E x, const E x1, const E x2, const V y1,
|
|
const V y2) {
|
|
double k = static_cast<double>(y2 - y1) / (x2 - x1);
|
|
double m = y1 - k * x1;
|
|
int y = round(k * x + m);
|
|
return static_cast<V>(y);
|
|
}
|
|
|
|
/**
|
|
* interpolates dacs and trimbits between 2 trim files
|
|
* @param a first module structure
|
|
* @param b second module structure
|
|
* @param energy energy to trim at
|
|
* @param e1 reference trim value
|
|
* @param e2 reference trim value
|
|
* @param trimbits 1 to include trimbits, 0 to exclude (used for eiger)
|
|
* @returns the pointer to the module structure with interpolated values or
|
|
* NULL if error
|
|
*/
|
|
sls_detector_module interpolateTrim(sls_detector_module *a,
|
|
sls_detector_module *b,
|
|
const int energy, const int e1,
|
|
const int e2, bool trimbits = true);
|
|
|
|
std::string getTrimbitFilename(detectorSettings settings, int e_eV);
|
|
sls_detector_module readSettingsFile(const std::string &fname,
|
|
bool trimbits = true);
|
|
void saveSettingsFile(sls_detector_module &myMod, const std::string &fname);
|
|
void sendProgram(bool blackfin, std::vector<char> buffer,
|
|
const int functionEnum, const std::string &functionType,
|
|
const std::string serverName = "",
|
|
const bool forceDeleteNormalFile = false);
|
|
void simulatingActivityinDetector(const std::string &functionType,
|
|
const int timeRequired);
|
|
|
|
const int moduleIndex;
|
|
mutable SharedMemory<sharedModule> shm{0, 0};
|
|
static const int BLACKFIN_ERASE_FLASH_TIME = 65;
|
|
static const int BLACKFIN_WRITE_TO_FLASH_TIME = 30;
|
|
static const int NIOS_ERASE_FLASH_TIME_FPGA = 10;
|
|
static const int NIOS_WRITE_TO_FLASH_TIME_FPGA = 45;
|
|
static const int NIOS_ERASE_FLASH_TIME_KERNEL = 9;
|
|
static const int NIOS_WRITE_TO_FLASH_TIME_KERNEL = 40;
|
|
|
|
enum mythen3_DacIndex {
|
|
M_VCASSH,
|
|
M_VTH2,
|
|
M_VRSHAPER,
|
|
M_VRSHAPER_N,
|
|
M_VIPRE_OUT,
|
|
M_VTH3,
|
|
M_VTH1,
|
|
M_VICIN,
|
|
M_VCAS,
|
|
M_VRPREAMP,
|
|
M_VCAL_N,
|
|
M_VIPRE,
|
|
M_VISHAPER,
|
|
M_VCAL_P,
|
|
M_VTRIM,
|
|
M_VDCSH
|
|
};
|
|
|
|
enum eiger_DacIndex {
|
|
E_SVP,
|
|
E_VTR,
|
|
E_VRF,
|
|
E_VRS,
|
|
E_SVN,
|
|
E_VTGSTV,
|
|
E_VCMP_LL,
|
|
E_VCMP_LR,
|
|
E_CAL,
|
|
E_VCMP_RL,
|
|
E_RXB_RB,
|
|
E_RXB_LB,
|
|
E_VCMP_RR,
|
|
E_VCP,
|
|
E_VCN,
|
|
E_VIS
|
|
};
|
|
};
|
|
|
|
} // namespace sls
|