Moved dacs to it's own command for command line. 
Co-authored-by: Erik Frojdh <erik.frojdh@gmail.com>
This commit is contained in:
Dhanya Thattil
2020-09-24 17:16:34 +02:00
committed by GitHub
parent c862f1df81
commit 2c1fddee84
21 changed files with 545 additions and 420 deletions

View File

@ -267,6 +267,9 @@ int64_t getNumTriggersLeft();
int64_t getDelayAfterTriggerLeft();
int64_t getPeriodLeft();
#endif
#ifdef GOTTHARD2D
int64_t getNumBurstsLeft();
#endif
#ifdef GOTTHARDD
int64_t getExpTimeLeft();
#endif

View File

@ -238,4 +238,5 @@ int set_adc_config(int);
int get_bad_channels(int);
int set_bad_channels(int);
int reconfigure_udp(int);
int validate_udp_configuration(int);
int validate_udp_configuration(int);
int get_bursts_left(int);

View File

@ -357,6 +357,7 @@ void function_table() {
flist[F_SET_BAD_CHANNELS] = &set_bad_channels;
flist[F_RECONFIGURE_UDP] = &reconfigure_udp;
flist[F_VALIDATE_UDP_CONFIG] = &validate_udp_configuration;
flist[F_GET_BURSTS_LEFT] = &get_bursts_left;
// check
if (NUM_DET_FUNCTIONS >= RECEIVER_ENUM_START) {
@ -8067,4 +8068,19 @@ int validate_udp_configuration(int file_des) {
}
return Server_SendResult(file_des, INT32, NULL, 0);
}
int get_bursts_left(int file_des) {
ret = OK;
memset(mess, 0, sizeof(mess));
int64_t retval = -1;
#ifndef GOTTHARD2D
functionNotImplemented();
#else
// get only
retval = getNumBurstsLeft();
LOG(logDEBUG1, ("retval num bursts left %lld\n", (long long int)retval));
#endif
return Server_SendResult(file_des, INT64, &retval, sizeof(retval));
}