13#error This is a C++ include file and cannot be used from plain C
22#define ngcbPARAM_CHAR 0
23#define ngcbPARAM_INT 1
24#define ngcbPARAM_FLOAT 2
25#define ngcbPARAM_DOUBLE 3
26#define ngcbPARAM_STRING 4
31#define ngcbPARAM_FLAG_FREE 31
32#define ngcbPARAM_FLAG_CFG 30
33#define ngcbPARAM_FLAG_MODE 29
36#define ngcbPARAM_MAX_STRING 255
86 explicit ngcbPARAM(
const char *paramName);
89 ngcbPARAM(
const char *paramName,
char initVal);
92 ngcbPARAM(
const char *paramName,
int initVal);
95 ngcbPARAM(
const char *paramName,
float initVal);
98 ngcbPARAM(
const char *paramName,
double initVal);
101 ngcbPARAM(
const char *paramName,
const char *initVal);
104 ngcbPARAM(
const char *paramName,
const char *initVal,
int type);
116 void Alias(
const char *a);
122 void Type(
int newType);
125 int Set(
char newValue);
128 int Set(
int newValue);
131 int Set(
float newValue);
134 int Set(
double newValue);
137 int Set(
const char *newValue);
158 void Get(
char *stringVal)
const;
240 ngcbPARAM *
Add(
const char *paramName,
const char *initVal);
243 ngcbPARAM *
Add(
const char *paramName,
const char *initVal,
int type);
249 void Remove(
const char *paramName);
261 int Set(
const char *paramName,
char paramValue);
264 int Set(
const char *paramName,
int paramValue);
267 int Set(
const char *paramName,
float paramValue);
270 int Set(
const char *paramName,
double paramValue);
273 int Set(
const char *paramName,
const char *paramValue);
276 int ValChar(
const char *paramName,
char *paramValue);
279 int ValInt(
const char *paramName,
int *paramValue);
282 int ValFloat(
const char *paramName,
float *paramValue);
285 int ValDouble(
const char *paramName,
double *paramValue);
288 int ValString(
const char *paramName,
char *paramValue);
297 int Load(
char **paramBuf,
size_t size,
char *erms);
300 int Load(
const char *paramBuf,
char *erms);
303 int Load(
const char *fileName,
const char *mask,
char *erms);
306 void Options(
int argc,
char *argv[]);
309 void Print(FILE *s = NULL);
327 int Load_(
const char *fileName,
const char *mask,
int *inclLevel,
int ValInt(const char *paramName, int *paramValue)
Get 32-bit integer value by name.
Definition ngcbPARAM_LIST.cpp:401
ngcbPARAM_LIST()
Constructor.
Definition ngcbPARAM_LIST.cpp:28
void ClrCtrlList(int instance)
Detach controller module from parameter list.
Definition ngcbPARAM_LIST.cpp:486
ngcbPARAM_LIST * next
Next list.
Definition ngcbPARAM.hpp:207
int Load(char **paramBuf, size_t size, char *erms)
Load parameter list from string array.
Definition ngcbPARAM_LIST.cpp:546
virtual ~ngcbPARAM_LIST()
Destructor.
Definition ngcbPARAM_LIST.cpp:49
ngcbPARAM_LIST * First()
Get list entry point.
Definition ngcbPARAM_LIST.cpp:60
int ValChar(const char *paramName, char *paramValue)
Get character value by name.
Definition ngcbPARAM_LIST.cpp:387
void Options(int argc, char *argv[])
Load parameter list from command line options.
Definition ngcbPARAM_LIST.cpp:514
void Insert(ngcbPARAM_LIST &other)
Insert content from other list.
Definition ngcbPARAM_LIST.cpp:193
int ValDouble(const char *paramName, double *paramValue)
Get 64-bit floating point value by name.
Definition ngcbPARAM_LIST.cpp:429
ngcbPARAM * Add(ngcbPARAM *newParam, int noDelete=1)
Add external parameter object to list.
Definition ngcbPARAM_LIST.cpp:108
void Print(FILE *s=NULL)
Print parameter list to stream.
Definition ngcbPARAM_LIST.cpp:243
int ValFloat(const char *paramName, float *paramValue)
Get 32-bit floating point value by name.
Definition ngcbPARAM_LIST.cpp:415
ngcbPARAM * Get(const char *paramName)
Get parameter object by name.
Definition ngcbPARAM_LIST.cpp:309
void Clear()
Remove all parameters.
Definition ngcbPARAM_LIST.cpp:136
void ClrAcqList(int instance)
Detach acquisition module from parameter list.
Definition ngcbPARAM_LIST.cpp:457
int Set(const char *paramName, char paramValue)
Set character value by name.
Definition ngcbPARAM_LIST.cpp:327
void Remove(ngcbPARAM *item)
Remove parameter by object pointer.
Definition ngcbPARAM_LIST.cpp:149
int ValString(const char *paramName, char *paramValue)
Get string value by name.
Definition ngcbPARAM_LIST.cpp:443
ngcbPARAM * param
Parameter in the list.
Definition ngcbPARAM.hpp:204
Definition ngcbPARAM.hpp:41
char unit[8]
Optional parameter unit.
Definition ngcbPARAM.hpp:65
unsigned int ctrlList
List of controller modules where parameter is used.
Definition ngcbPARAM.hpp:44
float ValFloat() const
Get parameter value converted to 32-bit floating point format.
Definition ngcbPARAM.cpp:1133
int Comp(ngcbPARAM &p)
Compare parameter values.
Definition ngcbPARAM.cpp:383
ngcbPARAM()
Constructors for basic container.
Definition ngcbPARAM.cpp:93
ngcbPARAM & operator=(const ngcbPARAM &other)
Operator =.
Definition ngcbPARAM.cpp:39
int Set(char newValue)
Set parameter value converted to character format.
Definition ngcbPARAM.cpp:553
double ValDouble() const
Get parameter value converted to 64-bit floating point format.
Definition ngcbPARAM.cpp:1171
int Changed()
Check for change since last call.
Definition ngcbPARAM.cpp:376
const char * Get()
Get parameter value converted to string format.
Definition ngcbPARAM.cpp:508
virtual ~ngcbPARAM()
Destructor.
Definition ngcbPARAM.cpp:249
char ValChar() const
Get parameter value converted to character format.
Definition ngcbPARAM.cpp:1008
char format[16]
Parameter format for printf etc.
Definition ngcbPARAM.hpp:56
bool operator==(const ngcbPARAM &other) const
Comparison operator ==.
Definition ngcbPARAM.cpp:28
void Store()
Store to temporary buffer.
Definition ngcbPARAM.cpp:412
void Alias(const char *a)
Set alias name.
Definition ngcbPARAM.cpp:277
ngcbPARAM(const ngcbPARAM &other)
Copy constructor.
Definition ngcbPARAM.cpp:68
int ValInt() const
Get parameter value converted to 32-bit integer format.
Definition ngcbPARAM.cpp:1066
char comment[44]
Optional parameter comment for FITS-header.
Definition ngcbPARAM.hpp:62
char name[64]
Parameter name.
Definition ngcbPARAM.hpp:50
int attribute
Storage space for application specific attributes.
Definition ngcbPARAM.hpp:68
int Type()
Get parameter type.
Definition ngcbPARAM.cpp:282
int fits
Flag to put paramter into FITS-header.
Definition ngcbPARAM.hpp:59
bool operator!=(const ngcbPARAM &other) const
Comparison operator !=.
Definition ngcbPARAM.cpp:34
unsigned int acqList
List of acquisition processes where parameter is used.
Definition ngcbPARAM.hpp:47
const char * ValString()
Get parameter value converted to string format.
Definition ngcbPARAM.cpp:1209
void Restore()
Restore from temporary buffer.
Definition ngcbPARAM.cpp:422
char alias[64]
Parameter alias name.
Definition ngcbPARAM.hpp:53
#define ngcbPARAM_MAX_STRING
Maximum string length.
Definition ngcbPARAM.hpp:36