-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #369 from GSI-CS-CO/dmunipz_dietrich_2024-jul-16
Dmunipz dietrich 2024 jul 16
- Loading branch information
Showing
73 changed files
with
1,855 additions
and
293 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ | |
* For all questions and ideas contact: [email protected] | ||
* Last update: 23-April-2019 | ||
********************************************************************************************/ | ||
#define B2BCBU_FW_VERSION 0x000700 // make this consistent with makefile | ||
#define B2BCBU_FW_VERSION 0x000702 // make this consistent with makefile | ||
|
||
// standard includes | ||
#include <stdio.h> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ | |
* For all questions and ideas contact: [email protected] | ||
* Last update: 19-November-2020 | ||
********************************************************************************************/ | ||
#define B2BPM_FW_VERSION 0x000700 // make this consistent with makefile | ||
#define B2BPM_FW_VERSION 0x000702 // make this consistent with makefile | ||
|
||
// standard includes | ||
#include <stdio.h> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* | ||
* created : 2021 | ||
* author : Dietrich Beck, GSI-Darmstadt | ||
* version : 24-Feb-2023 | ||
* version : 23-Nov-2023 | ||
* | ||
* firmware required for measuring the h=1 phase for ring machine | ||
* | ||
|
@@ -38,7 +38,7 @@ | |
* For all questions and ideas contact: [email protected] | ||
* Last update: 15-April-2019 | ||
********************************************************************************************/ | ||
#define B2BPMSTUB_FW_VERSION 0x000700 // make this consistent with makefile | ||
#define B2BPMSTUB_FW_VERSION 0x000703 // make this consistent with makefile | ||
|
||
//standard includes | ||
#include <stdio.h> | ||
|
@@ -386,7 +386,7 @@ uint32_t doActionOperation(uint64_t *tAct, // actual time | |
// send command: transmit measured phase value to the network | ||
sendEvtId = fwlib_buildEvtidV1(recGid, sendEvtNo, 0, recSid, recBpid, flagPMError); | ||
sendParam = tH1_125ps; | ||
sendDeadline = recDeadline + (uint64_t)COMMON_AHEADT; | ||
sendDeadline = getSysTime() + (uint64_t)B2B_AHEADT; // use a more aggressive deadline < COMMON_AHEADT | ||
fwlib_ebmWriteTM(sendDeadline, sendEvtId, sendParam, 0, 0); | ||
|
||
// send the confidence value of the phase fit to ECA (for monitoring purposes) | ||
|
@@ -475,7 +475,7 @@ uint32_t doActionOperation(uint64_t *tAct, // actual time | |
if (flagMatchDone) tmp.f = (float)dtMatch_as / 1000000000.0; // convert to float [ns] | ||
else tmp.data = 0x7fffffff; // mark as invalid | ||
sendParam |= (uint64_t)(tmp.data & 0xffffffff); // low word; match diagnostic | ||
sendDeadline = recDeadline + (uint64_t)COMMON_AHEADT; | ||
sendDeadline = getSysTime() + (uint64_t)COMMON_AHEADT; // use the more conservativ deadline | ||
fwlib_ebmWriteTM(sendDeadline, sendEvtId, sendParam, 0, 0); | ||
|
||
// send the confidence value of the phase fit to ECA (for monitoring purposes) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* | ||
* created : 2019 | ||
* author : Dietrich Beck, GSI-Darmstadt | ||
* version : 05-Oct-2023 | ||
* version : 15-Nov-2023 | ||
* | ||
* firmware required for measuring the h=1 phase for ring machine | ||
* | ||
|
@@ -42,7 +42,7 @@ | |
* For all questions and ideas contact: [email protected] | ||
* Last update: 15-April-2019 | ||
********************************************************************************************/ | ||
#define B2BPM_FW_VERSION 0x000700 // make this consistent with makefile | ||
#define B2BPM_FW_VERSION 0x000702 // make this consistent with makefile | ||
|
||
// standard includes | ||
#include <stdio.h> | ||
|
@@ -536,7 +536,7 @@ uint32_t doActionOperation(uint64_t *tAct, // actual time | |
sendParam = tH1_t.ns; | ||
sendTEF = (uint32_t)( (int16_t)(tH1_t.ps) & 0xffff); | ||
sendTEF |= (uint32_t)((uint16_t)(tH1_t.dps) & 0xffff) << 16; | ||
sendDeadline = recDeadline + (uint64_t)COMMON_AHEADT; | ||
sendDeadline = getSysTime() + (uint64_t)B2B_AHEADT; // use a more aggressive deadline < COMMON_AHEADT | ||
fwlib_ebmWriteTM(sendDeadline, sendEvtId, sendParam, sendTEF, 0); | ||
//t2 = getSysTime(); | ||
// send something to ECA (for monitoring purposes) chk do something useful here | ||
|
@@ -637,7 +637,7 @@ uint32_t doActionOperation(uint64_t *tAct, // actual time | |
//tmp1 = (int32_t)(dtMatch_as / 1000000); pp_printf("match3 [ps] %08d\n", tmp1); //pp_printf("match3 [hex float ns] %08x\n", tmp.data); | ||
|
||
sendParam |= (uint64_t)(tmp.data & 0xffffffff); // low word; match diagnostic | ||
sendDeadline = recDeadline + (uint64_t)COMMON_AHEADT; | ||
sendDeadline = getSysTime() + (uint64_t)COMMON_AHEADT; // use a more conservative deadline | ||
fwlib_ebmWriteTM(sendDeadline, sendEvtId, sendParam, 0, 0); | ||
|
||
// send something to ECA (for monitoring purposes) chk do something useful here | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# this is a hack for sl7 | ||
export DIM_DNS_NODE=asl105 | ||
|
||
b2b-serv-sys dev/wbm0 -s int_yr-pm & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ | |
* For all questions and ideas contact: [email protected] | ||
* Last update: 15-April-2019 | ||
*********************************************************************************************/ | ||
#define B2B_ANALYZER_VERSION 0x000700 | ||
#define B2B_ANALYZER_VERSION 0x000702 | ||
|
||
// standard includes | ||
#include <unistd.h> // getopt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* | ||
* created : 2021 | ||
* author : Dietrich Beck, GSI-Darmstadt | ||
* version : 17-Oct-2023 | ||
* version : 19-Jan-2024 | ||
* | ||
* archives set and get values to data files | ||
* | ||
|
@@ -34,7 +34,7 @@ | |
* For all questions and ideas contact: [email protected] | ||
* Last update: 15-April-2019 | ||
*********************************************************************************************/ | ||
#define B2B_ARCHIVER_VERSION 0x000700 | ||
#define B2B_ARCHIVER_VERSION 0x000703 | ||
|
||
// standard includes | ||
#include <unistd.h> // getopt | ||
|
@@ -62,17 +62,22 @@ const char* program; | |
|
||
uint32_t no_link_32 = 0xdeadbeef; | ||
uint64_t no_link_64 = 0xdeadbeefce420651; | ||
double no_link_dbl = NAN; | ||
char no_link_str[] = "NO_LINK"; | ||
char nan_str[] = "nan"; | ||
|
||
setval_t dicSetval[B2B_NSID]; | ||
getval_t dicGetval[B2B_NSID]; | ||
diagval_t dicDiagval[B2B_NSID]; | ||
double dicKickLenExt[B2B_NSID]; // hackish, should be integrated into s.th. like getval | ||
double dicKickCompLvlExt[B2B_NSID]; // hackish, should be integrated into s.th. like getval | ||
char dicPName[B2B_NSID][DIMMAXSIZE]; | ||
|
||
uint32_t dicSetvalId[B2B_NSID]; | ||
uint32_t dicGetvalId[B2B_NSID]; | ||
uint32_t dicDiagvalId[B2B_NSID]; | ||
uint32_t dicKickLenExtId[B2B_NSID]; | ||
uint32_t dicKickCompLvlExtId[B2B_NSID]; | ||
uint32_t dicPNameId[B2B_NSID]; | ||
|
||
// global variables | ||
|
@@ -104,7 +109,7 @@ static void help(void) { | |
// header String for file | ||
char * headerString() | ||
{ | ||
return "patternName; time_CBS_UTC; sid; mode; ext_T [as]; ext_h; ext_cTrig; inj_T; inj_h; inj_cTrig; cPhase; ext_phase; ext_phaseFract; ext_phaseErr; ext_maxsysErr; ext_dKickMon; ext_dKickProb; ext_diagPhase; ext_diag_Match; inj_phase; inj_phaseFract; inj_phaseErr; inj_maxsysErr; inj_dKickMon; inj_dKickProb; inj_diagPhase; inj_diagMatch; received PME; PMI; PRE; PRI; KTE; KTI; KDE; KDI; PDE; PDI; error PME; PMI; PRE; PRI; KTE; KTI; KDE; KDI; PDE; PDI; late PME; PMI; PRE; PRI; KTE; KTI; KDE; KDI; PDE; PDI; fin-CBS; prr-CBS; t0E-CBS; t0I-CBS; kte-CBS; kti-CBS; ext_nueGet; ext_dNueGet; inj_nueGet; inj_dNueGet"; | ||
return "patternName; time_CBS_UTC; sid; mode; ext_T [as]; ext_h; ext_cTrig; inj_T; inj_h; inj_cTrig; cPhase; ext_phase; ext_phaseFract; ext_phaseErr; ext_maxsysErr; ext_dKickMon; ext_kickCompLvl; ext_dkickProb; ext_kickLen; ext_diagPhase; ext_diag_Match; inj_phase; inj_phaseFract; inj_phaseErr; inj_maxsysErr; inj_dKickMon; inj_dKickProb; inj_diagPhase; inj_diagMatch; received PME; PMI; PRE; PRI; KTE; KTI; KDE; KDI; PDE; PDI; error PME; PMI; PRE; PRI; KTE; KTI; KDE; KDI; PDE; PDI; late PME; PMI; PRE; PRI; KTE; KTI; KDE; KDI; PDE; PDI; fin-CBS; prr-CBS; t0E-CBS; t0I-CBS; kte-CBS; kti-CBS; ext_nueGet; ext_dNueGet; inj_nueGet; inj_dNueGet"; | ||
} // headerString | ||
|
||
// receive get values | ||
|
@@ -160,8 +165,10 @@ void recGetvalue(long *tag, diagval_t *address, int *size) | |
new += sprintf(new, "; %7.3f" , dicGetval[sid].ext_phaseFract); | ||
new += sprintf(new, "; %7.3f" , dicGetval[sid].ext_phaseErr); | ||
new += sprintf(new, "; %5.3f" , dicGetval[sid].ext_phaseSysmaxErr); | ||
new += sprintf(new, "; %f" , dicGetval[sid].ext_dKickMon); | ||
new += sprintf(new, "; %f" , dicGetval[sid].ext_dKickProb); | ||
new += sprintf(new, "; %7.1f" , dicGetval[sid].ext_dKickMon); | ||
new += sprintf(new, "; %7.3f" , dicKickCompLvlExt[sid]); | ||
new += sprintf(new, "; %7.1f" , dicGetval[sid].ext_dKickProb); | ||
new += sprintf(new, "; %7.1f" , dicKickLenExt[sid]); | ||
|
||
if (isnan(dicGetval[sid].ext_diagPhase) || (dicSetval[sid].ext_T == -1)) new += sprintf(new, "; %s" , nan_str); | ||
else { | ||
|
@@ -182,8 +189,8 @@ void recGetvalue(long *tag, diagval_t *address, int *size) | |
new += sprintf(new, "; %7.3f" , dicGetval[sid].inj_phaseFract); | ||
new += sprintf(new, "; %7.3f" , dicGetval[sid].inj_phaseErr); | ||
new += sprintf(new, "; %5.3f" , dicGetval[sid].inj_phaseSysmaxErr); | ||
new += sprintf(new, "; %f" , dicGetval[sid].inj_dKickMon); | ||
new += sprintf(new, "; %f" , dicGetval[sid].inj_dKickProb); | ||
new += sprintf(new, "; %7.1f" , dicGetval[sid].inj_dKickMon); | ||
new += sprintf(new, "; %7.1f" , dicGetval[sid].inj_dKickProb); | ||
|
||
if (isnan(dicGetval[sid].inj_diagPhase) || (dicSetval[sid].inj_T == -1)) new += sprintf(new, "; %s" , nan_str); | ||
else { | ||
|
@@ -251,6 +258,12 @@ void dicSubscribeServices(char *prefix) | |
sprintf(name, "%s-cal_diag_sid%02d", prefix, i); | ||
dicDiagvalId[i] = dic_info_service_stamped(name, MONITORED, 0, &(dicDiagval[i]), sizeof(diagval_t), 0, 0, &no_link_32, sizeof(uint32_t)); | ||
|
||
sprintf(name, "%s-kdde_sid%02d_len", prefix, i); | ||
dicKickLenExtId[i] = dic_info_service_stamped(name, MONITORED, 0, &(dicKickLenExt[i]), sizeof(double), 0 , 0, &no_link_dbl, sizeof(double)); | ||
|
||
sprintf(name, "%s-kse_setlevel", prefix); | ||
dicKickCompLvlExtId[i] = dic_info_service_stamped(name, MONITORED, 0, &(dicKickCompLvlExt[i]), sizeof(double), 0 , 0, &no_link_dbl, sizeof(double)); | ||
|
||
sleep (2); // data is taken upon callback of set-values; wait a bit until the other services have connected to their servers | ||
|
||
sprintf(name, "%s-raw_sid%02d_getval", prefix, i); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ | |
* For all questions and ideas contact: [email protected] | ||
* Last update: 15-April-2019 | ||
*********************************************************************************************/ | ||
#define B2B_CLIENT_SYS_VERSION 0x000700 | ||
#define B2B_CLIENT_SYS_VERSION 0x000702 | ||
|
||
// standard includes | ||
#include <unistd.h> // getopt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ | |
* For all questions and ideas contact: [email protected] | ||
* Last update: 15-April-2019 | ||
*********************************************************************************************/ | ||
#define B2B_JITTER_CHECK_VERSION 0x000700 | ||
#define B2B_JITTER_CHECK_VERSION 0x000702 | ||
|
||
#define __STDC_FORMAT_MACROS | ||
#define __STDC_CONSTANT_MACROS | ||
|
@@ -503,7 +503,7 @@ int main(int argc, char** argv) | |
evtPrefix |= ioPrefix; | ||
snoopID = evtPrefix + 0x1; // last bit is set: rising edge | ||
//printf("id %llx\n", snoopID); | ||
condition = SoftwareCondition_Proxy::create(sink->NewCondition(false, snoopID, 0xffffffffffffffff, 17)); | ||
condition = SoftwareCondition_Proxy::create(sink->NewCondition(false, snoopID, 0xffffffffffffffff, 0)); | ||
condition->setAcceptLate(true); | ||
condition->setAcceptEarly(true); | ||
condition->setAcceptConflict(true); | ||
|
Oops, something went wrong.