TUM/E12
Benjamin.Sailer@ph.tum.de
Version: 0.1
-Date: 2000-09-09
+Date: 2000-09-10
Param libraries
===============
#include "test1.h"
int test1(const char *testid, const Param *param) {
- char *name = "crate_id";
- char *idx = "herakles";
+ char *name = "tname";
+ char *idx = "tstring";
char result[PARAM_MAX_VALUE_LEN];
int rows;
int retVal;
printf("%s : Param_getString: Lowercase input on correct statements.\n", testid);
retVal = Param_getString(param, name, idx, &rows, result);
- if ((rows == 1) && result && (strcmp(result, "test0") == 0) && (retVal == 0)) {
+ if ((rows == 1) && result && (strcmp(result, "test100") == 0) && (retVal == 0)) {
myRetVal = 0;
printf("%s : Passed.\n", testid);
} else {
#include "test10.h"
int test10(const char *testid, const Param *param) {
- char *name = "race0";
+ char *name = "tname";
char *idx = "bla";
unsigned long int result;
int rows;
#include "test11.h"
int test11(const char *testid, const Param *param) {
- char *name = "race0";
- char *idx = "se_id";
+ char *name = "tname";
+ char *idx = "tint";
char result[PARAM_MAX_VALUE_LEN];
int rows;
int retVal;
#include "test12.h"
int test12(const char *testid, const Param *param) {
- char *name = "crate_id";
- char *idx = "herakles";
+ char *name = "tname";
+ char *idx = "tstring";
unsigned long int result;
int rows;
int retVal;
#include "test13.h"
int test13(const char *testid, const Param *param) {
- char *name = "race0";
- char *idx = "blub";
+ char *name = "tname";
+ char *idx = "bla";
char *result[NUM1];
int rows;
int retVal;
#include "test14.h"
int test14(const char *testid, const Param *param) {
- char *name = "tof_tdc0";
- char *idx = "blub";
+ char *name = "tname";
+ char *idx = "bla";
unsigned long int result[NUM2];
int rows;
int retVal;
#include "test15.h"
int test15(const char *testid, const Param *param) {
- char *name = "race0";
- char *idx = "fefpgafile";
+ char *name = "tname";
+ char *idx = "tstringa";
char *result[NUM3];
int rows;
int retVal;
retVal = Param_getStringArray(param, name, idx, NUM3, &rows, result);
if ((rows == NUM1) &&
- result[0] && (strcmp(result[0], "daq_cas/vme/race/conf/5frontend.rbt") == 0) &&
- result[1] && (strcmp(result[1], "daq_cas/vme/race/conf/5frontend.rbt") == 0) &&
- result[2] && (strcmp(result[2], "daq_cas/vme/race/conf/5frontend.rbt") == 0) &&
- result[3] && (strcmp(result[3], "daq_cas/vme/race/conf/5frontend.rbt") == 0) &&
- result[4] && (strcmp(result[4], "daq_cas/vme/race/conf/4frontend.rbt") == 0) &&
- result[5] && (strcmp(result[5], "daq_cas/vme/race/conf/4frontend.rbt") == 0) &&
- result[6] && (strcmp(result[6], "daq_cas/vme/race/conf/4frontend.rbt") == 0) &&
- result[7] && (strcmp(result[7], "daq_cas/vme/race/conf/5frontend.rbt") == 0) &&
+ result[0] && (strcmp(result[0], "test1") == 0) &&
+ result[1] && (strcmp(result[1], "test0") == 0) &&
+ result[2] && (strcmp(result[2], "test3") == 0) &&
+ result[3] && (strcmp(result[3], "test2") == 0) &&
+ result[4] && (strcmp(result[4], "test5") == 0) &&
+ result[5] && (strcmp(result[5], "test4") == 0) &&
+ result[6] && (strcmp(result[6], "test7") == 0) &&
+ result[7] && (strcmp(result[7], "test6") == 0) &&
(retVal == 0)) {
myRetVal = 0;
printf("%s : Passed.\n", testid);
#include "test16.h"
int test16(const char *testid, const Param *param) {
- char *name = "tof_tdc0";
- char *idx = "threshold";
+ char *name = "tname";
+ char *idx = "tinta";
unsigned long int result[NUM4];
int rows;
int resultsum = 1;
#include "test17.h"
int test17(const char *testid, const Param *param) {
- char *name = "race0";
- char *idx = "fefpgafile";
+ char *name = "tname";
+ char *idx = "tstringa";
char *result[NUM5];
int rows;
int retVal;
retVal = Param_getStringArray(param, name, idx, NUM5, &rows, result);
if ((rows == NUM5) &&
- result[0] && (strcmp(result[0], "daq_cas/vme/race/conf/5frontend.rbt") == 0) &&
- result[1] && (strcmp(result[1], "daq_cas/vme/race/conf/5frontend.rbt") == 0) &&
- result[2] && (strcmp(result[2], "daq_cas/vme/race/conf/5frontend.rbt") == 0) &&
- result[3] && (strcmp(result[3], "daq_cas/vme/race/conf/5frontend.rbt") == 0) &&
+ result[0] && (strcmp(result[0], "test1") == 0) &&
+ result[1] && (strcmp(result[1], "test0") == 0) &&
+ result[2] && (strcmp(result[2], "test3") == 0) &&
+ result[3] && (strcmp(result[3], "test2") == 0) &&
(retVal == 0)) {
myRetVal = 0;
printf("%s : Passed.\n", testid);
#include "test18.h"
int test18(const char *testid, const Param *param) {
- char *name = "tof_tdc0";
- char *idx = "threshold";
+ char *name = "tname";
+ char *idx = "tinta";
unsigned long int result[NUM6];
int rows;
int resultsum = 1;
#include "test19.h"
int test19(const char *testid, const Param *param) {
- char *name = "tof_tdc0";
- char *idx = "threshold";
+ char *name = "tname";
+ char *idx = "tinta";
char *result[NUM2];
int rows;
int retVal;
#include "test2.h"
int test2(const char *testid, const Param *param) {
- char *name = "race0";
- char *idx = "se_id";
+ char *name = "tname";
+ char *idx = "tint";
unsigned long int result;
int rows;
int retVal;
#include "test20.h"
int test20(const char *testid, const Param *param) {
- char *name = "race0";
- char *idx = "fefpgafile";
+ char *name = "tname";
+ char *idx = "tstringa";
unsigned long int result[NUM1];
int rows;
int retVal;
#include "test21.h"
int test21(const char *testid, const Param *param) {
- char *name = "crate_id";
- char *idx = "herakles";
+ char *name = "tname";
+ char *idx = "tstring";
char *result[NUM1];
int i;
int rows;
printf("%s : Param_getStringArray: Request for a scalar value.\n", testid);
retVal = Param_getStringArray(param, name, idx, NUM1, &rows, result);
- if ((rows == 1) && result && (strcmp(result[0], "test0") == 0) && (retVal == 0)) {
+ if ((rows == 1) && result && (strcmp(result[0], "test100") == 0) && (retVal == 0)) {
myRetVal = 0;
printf("%s : Passed.\n", testid);
} else {
#include "test22.h"
int test22(const char *testid, const Param *param) {
- char *name = "race0";
- char *idx = "fefpgafile";
+ char *name = "tname";
+ char *idx = "tstringa";
char result[PARAM_MAX_VALUE_LEN];
int rows;
int retVal;
retVal = Param_getString(param, name, idx, &rows, result);
if ((rows == 1) &&
- result && (strcmp(result, "daq_cas/vme/race/conf/5frontend.rbt") == 0) &&
+ result && (strcmp(result, "test1") == 0) &&
(retVal == 0)) {
myRetVal = 0;
printf("%s : Passed.\n", testid);
#include "test3.h"
int test3(const char *testid, const Param *param) {
- char *name = "race0";
- char *idx = "fefpgafile";
+ char *name = "tname";
+ char *idx = "tstringa";
char *result[NUM1];
int rows;
int retVal;
retVal = Param_getStringArray(param, name, idx, NUM1, &rows, result);
if ((rows == NUM1) &&
- result[0] && (strcmp(result[0], "daq_cas/vme/race/conf/5frontend.rbt") == 0) &&
- result[1] && (strcmp(result[1], "daq_cas/vme/race/conf/5frontend.rbt") == 0) &&
- result[2] && (strcmp(result[2], "daq_cas/vme/race/conf/5frontend.rbt") == 0) &&
- result[3] && (strcmp(result[3], "daq_cas/vme/race/conf/5frontend.rbt") == 0) &&
- result[4] && (strcmp(result[4], "daq_cas/vme/race/conf/4frontend.rbt") == 0) &&
- result[5] && (strcmp(result[5], "daq_cas/vme/race/conf/4frontend.rbt") == 0) &&
- result[6] && (strcmp(result[6], "daq_cas/vme/race/conf/4frontend.rbt") == 0) &&
- result[7] && (strcmp(result[7], "daq_cas/vme/race/conf/5frontend.rbt") == 0) &&
+ result[0] && (strcmp(result[0], "test1") == 0) &&
+ result[1] && (strcmp(result[1], "test0") == 0) &&
+ result[2] && (strcmp(result[2], "test3") == 0) &&
+ result[3] && (strcmp(result[3], "test2") == 0) &&
+ result[4] && (strcmp(result[4], "test5") == 0) &&
+ result[5] && (strcmp(result[5], "test4") == 0) &&
+ result[6] && (strcmp(result[6], "test7") == 0) &&
+ result[7] && (strcmp(result[7], "test6") == 0) &&
(retVal == 0)) {
myRetVal = 0;
printf("%s : Passed.\n", testid);
#include "test4.h"
int test4(const char *testid, const Param *param) {
- char *name = "tof_tdc0";
- char *idx = "threshold";
+ char *name = "tname";
+ char *idx = "tinta";
unsigned long int result[NUM2];
int rows;
int resultsum = 1;
#include "test5.h"
int test5(const char *testid, const Param *param) {
- char *name = "CRATE_ID";
- char *idx = "HERAKLES";
+ char *name = "TNAME";
+ char *idx = "TSTRING";
char result[PARAM_MAX_VALUE_LEN];
int rows;
int retVal;
printf("%s : Param_getString: Uppercase input on correct statements.\n", testid);
retVal = Param_getString(param, name, idx, &rows, result);
- if ((rows == 1) && result && (strcmp(result, "test0") == 0) && (retVal == 0)) {
+ if ((rows == 1) && result && (strcmp(result, "test100") == 0) && (retVal == 0)) {
myRetVal = 0;
printf("%s : Passed.\n", testid);
} else {
#include "test6.h"
int test6(const char *testid, const Param *param) {
- char *name = "RACE0";
- char *idx = "SE_ID";
+ char *name = "TNAME";
+ char *idx = "TINT";
unsigned long int result;
int rows;
int retVal;
#include "test7.h"
int test7(const char *testid, const Param *param) {
- char *name = "RACE0";
- char *idx = "FEFPGAFILE";
+ char *name = "TNAME";
+ char *idx = "TSTRINGA";
char *result[NUM1];
int rows;
int retVal;
retVal = Param_getStringArray(param, name, idx, NUM1, &rows, result);
if ((rows == NUM1) &&
- result[0] && (strcmp(result[0], "daq_cas/vme/race/conf/5frontend.rbt") == 0) &&
- result[1] && (strcmp(result[1], "daq_cas/vme/race/conf/5frontend.rbt") == 0) &&
- result[2] && (strcmp(result[2], "daq_cas/vme/race/conf/5frontend.rbt") == 0) &&
- result[3] && (strcmp(result[3], "daq_cas/vme/race/conf/5frontend.rbt") == 0) &&
- result[4] && (strcmp(result[4], "daq_cas/vme/race/conf/4frontend.rbt") == 0) &&
- result[5] && (strcmp(result[5], "daq_cas/vme/race/conf/4frontend.rbt") == 0) &&
- result[6] && (strcmp(result[6], "daq_cas/vme/race/conf/4frontend.rbt") == 0) &&
- result[7] && (strcmp(result[7], "daq_cas/vme/race/conf/5frontend.rbt") == 0) &&
+ result[0] && (strcmp(result[0], "test1") == 0) &&
+ result[1] && (strcmp(result[1], "test0") == 0) &&
+ result[2] && (strcmp(result[2], "test3") == 0) &&
+ result[3] && (strcmp(result[3], "test2") == 0) &&
+ result[4] && (strcmp(result[4], "test5") == 0) &&
+ result[5] && (strcmp(result[5], "test4") == 0) &&
+ result[6] && (strcmp(result[6], "test7") == 0) &&
+ result[7] && (strcmp(result[7], "test6") == 0) &&
(retVal == 0)) {
myRetVal = 0;
printf("%s : Passed.\n", testid);
#include "test8.h"
int test8(const char *testid, const Param *param) {
- char *name = "TOF_TDC0";
- char *idx = "THRESHOLD";
+ char *name = "TNAME";
+ char *idx = "TINTA";
unsigned long int result[NUM2];
int rows;
int resultsum = 1;
#include "test9.h"
int test9(const char *testid, const Param *param) {
- char *name = "crate_id";
- char *idx = "blub";
+ char *name = "tname";
+ char *idx = "bla";
char result[PARAM_MAX_VALUE_LEN];
int rows;
int retVal;