Commit 0c44752f authored by Matteo Quintiliani's avatar Matteo Quintiliani

Added parameter mschan


git-svn-id: file:///home/quintiliani/svncopy/nmxptool/trunk@943 3cd66e75-5955-46cb-a940-c26e5fc5497d
parent cbee18e0
......@@ -81,6 +81,14 @@ ChannelFile /home/ew/naqs1a.list.txt # List of channel patterns like 'Channe
# Related to 'MaxDataToRetrieve', it enables request of recent packets.
# It is equivalent to the option -F. Related to 'MaxDataToRetrieve'.
#mschan 250/9 # mSECs/nC
# mSECs are the milliseconds to wait before next request,
# nC is the number of channels to request at a time.
# This kind of request management makes data buffering
# on NaqsServer side more efficient. (Default 280/9).
# Condition: Total number channels * (mSECs/nC) < 15 sec.
# Related to -F and -b. 0/0 for disabling.
# DO NOT USE parameters 'Channel' and 'ChannelFile' together.
# 'ChannelFile' is preferable. At restart you can retrieve data
# of the past from DataServer. See 'MaxDataToRetrieve'.
......
......@@ -284,6 +284,8 @@ int nmxptool_ew_proc_configfile (char * configfile, NMXPTOOL_PARAMS *params) {
int nfiles;
int success;
char *sep = NULL;
/* Some important initial values or defaults */
ringName[0] = '\0';
myModName[0] = '\0';
......@@ -441,6 +443,23 @@ int nmxptool_ew_proc_configfile (char * configfile, NMXPTOOL_PARAMS *params) {
}
}
else if (k_its ("mschan")) {
if ( (str = k_str ()) ) {
sep = strstr(str, "/");
if(sep) {
sep[0] = 0;
sep++;
params->usec = atoi(str) * 1000;
params->n_channel = atoi(sep);
nmxp_log(NMXP_LOG_WARN, NMXP_LOG_D_ANY,
"Channels %d usec %d!\n", params->n_channel, params->usec);
} else {
nmxp_log(NMXP_LOG_ERR, NMXP_LOG_D_ANY,
"Syntax error in parameter 'mschan' %s!\n", NMXP_LOG_STR(str));
return EW_FAILURE;
}
}
}
else if (k_its ("ChannelFile")) {
if ( (str = k_str ()) ) {
......@@ -465,7 +484,6 @@ int nmxptool_ew_proc_configfile (char * configfile, NMXPTOOL_PARAMS *params) {
}
/* Unknown command */
else {
fprintf (stderr, "%s: <%s> Unknown command in <%s>.\n", PACKAGE_NAME,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment