12#error This is a C++ include file and cannot be used from plain C
21#define ngcbPARAM_CHAR 0
22#define ngcbPARAM_INT 1
23#define ngcbPARAM_FLOAT 2
24#define ngcbPARAM_DOUBLE 3
25#define ngcbPARAM_STRING 4
30#define ngcbPARAM_FLAG_FREE 31
31#define ngcbPARAM_FLAG_CFG 30
32#define ngcbPARAM_FLAG_MODE 29
35#define ngcbPARAM_MAX_STRING 255
85 explicit ngcbPARAM(
const char *paramName);
88 ngcbPARAM(
const char *paramName,
char initVal);
91 ngcbPARAM(
const char *paramName,
int initVal);
94 ngcbPARAM(
const char *paramName,
float initVal);
97 ngcbPARAM(
const char *paramName,
double initVal);
100 ngcbPARAM(
const char *paramName,
const char *initVal);
103 ngcbPARAM(
const char *paramName,
const char *initVal,
int type);
115 void Alias(
const char *a);
121 void Type(
int newType);
124 int Set(
char newValue);
127 int Set(
int newValue);
130 int Set(
float newValue);
133 int Set(
double newValue);
136 int Set(
const char *newValue);
157 void Get(
char *stringVal)
const;
239 ngcbPARAM *
Add(
const char *paramName,
const char *initVal);
242 ngcbPARAM *
Add(
const char *paramName,
const char *initVal,
int type);
248 void Remove(
const char *paramName);
260 int Set(
const char *paramName,
char paramValue);
263 int Set(
const char *paramName,
int paramValue);
266 int Set(
const char *paramName,
float paramValue);
269 int Set(
const char *paramName,
double paramValue);
272 int Set(
const char *paramName,
const char *paramValue);
275 int ValChar(
const char *paramName,
char *paramValue);
278 int ValInt(
const char *paramName,
int *paramValue);
281 int ValFloat(
const char *paramName,
float *paramValue);
284 int ValDouble(
const char *paramName,
double *paramValue);
287 int ValString(
const char *paramName,
char *paramValue);
296 int Load(
char **paramBuf,
size_t size,
char *erms);
299 int Load(
const char *paramBuf,
char *erms);
302 int Load(
const char *fileName,
const char *mask,
char *erms);
305 void Options(
int argc,
char *argv[]);
308 void Print(FILE *s = NULL);
326 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:400
ngcbPARAM_LIST()
Constructor.
Definition ngcbPARAM_LIST.cpp:27
void ClrCtrlList(int instance)
Detach controller module from parameter list.
Definition ngcbPARAM_LIST.cpp:485
ngcbPARAM_LIST * next
Next list.
Definition ngcbPARAM.hpp:206
int Load(char **paramBuf, size_t size, char *erms)
Load parameter list from string array.
Definition ngcbPARAM_LIST.cpp:545
virtual ~ngcbPARAM_LIST()
Destructor.
Definition ngcbPARAM_LIST.cpp:48
ngcbPARAM_LIST * First()
Get list entry point.
Definition ngcbPARAM_LIST.cpp:59
int ValChar(const char *paramName, char *paramValue)
Get character value by name.
Definition ngcbPARAM_LIST.cpp:386
void Options(int argc, char *argv[])
Load parameter list from command line options.
Definition ngcbPARAM_LIST.cpp:513
void Insert(ngcbPARAM_LIST &other)
Insert content from other list.
Definition ngcbPARAM_LIST.cpp:192
int ValDouble(const char *paramName, double *paramValue)
Get 64-bit floating point value by name.
Definition ngcbPARAM_LIST.cpp:428
ngcbPARAM * Add(ngcbPARAM *newParam, int noDelete=1)
Add external parameter object to list.
Definition ngcbPARAM_LIST.cpp:107
void Print(FILE *s=NULL)
Print parameter list to stream.
Definition ngcbPARAM_LIST.cpp:242
int ValFloat(const char *paramName, float *paramValue)
Get 32-bit floating point value by name.
Definition ngcbPARAM_LIST.cpp:414
ngcbPARAM * Get(const char *paramName)
Get parameter object by name.
Definition ngcbPARAM_LIST.cpp:308
void Clear()
Remove all parameters.
Definition ngcbPARAM_LIST.cpp:135
void ClrAcqList(int instance)
Detach acquisition module from parameter list.
Definition ngcbPARAM_LIST.cpp:456
int Set(const char *paramName, char paramValue)
Set character value by name.
Definition ngcbPARAM_LIST.cpp:326
void Remove(ngcbPARAM *item)
Remove parameter by object pointer.
Definition ngcbPARAM_LIST.cpp:148
int ValString(const char *paramName, char *paramValue)
Get string value by name.
Definition ngcbPARAM_LIST.cpp:442
ngcbPARAM * param
Parameter in the list.
Definition ngcbPARAM.hpp:203
Definition ngcbPARAM.hpp:40
char unit[8]
Optional parameter unit.
Definition ngcbPARAM.hpp:64
unsigned int ctrlList
List of controller modules where parameter is used.
Definition ngcbPARAM.hpp:43
float ValFloat() const
Get parameter value converted to 32-bit floating point format.
Definition ngcbPARAM.cpp:1132
int Comp(ngcbPARAM &p)
Compare parameter values.
Definition ngcbPARAM.cpp:382
ngcbPARAM()
Constructors for basic container.
Definition ngcbPARAM.cpp:92
ngcbPARAM & operator=(const ngcbPARAM &other)
Operator =.
Definition ngcbPARAM.cpp:38
int Set(char newValue)
Set parameter value converted to character format.
Definition ngcbPARAM.cpp:552
double ValDouble() const
Get parameter value converted to 64-bit floating point format.
Definition ngcbPARAM.cpp:1170
int Changed()
Check for change since last call.
Definition ngcbPARAM.cpp:375
const char * Get()
Get parameter value converted to string format.
Definition ngcbPARAM.cpp:507
virtual ~ngcbPARAM()
Destructor.
Definition ngcbPARAM.cpp:248
char ValChar() const
Get parameter value converted to character format.
Definition ngcbPARAM.cpp:1007
char format[16]
Parameter format for printf etc.
Definition ngcbPARAM.hpp:55
bool operator==(const ngcbPARAM &other) const
Comparison operator ==.
Definition ngcbPARAM.cpp:27
void Store()
Store to temporary buffer.
Definition ngcbPARAM.cpp:411
void Alias(const char *a)
Set alias name.
Definition ngcbPARAM.cpp:276
ngcbPARAM(const ngcbPARAM &other)
Copy constructor.
Definition ngcbPARAM.cpp:67
int ValInt() const
Get parameter value converted to 32-bit integer format.
Definition ngcbPARAM.cpp:1065
char comment[44]
Optional parameter comment for FITS-header.
Definition ngcbPARAM.hpp:61
char name[64]
Parameter name.
Definition ngcbPARAM.hpp:49
int attribute
Storage space for application specific attributes.
Definition ngcbPARAM.hpp:67
int Type()
Get parameter type.
Definition ngcbPARAM.cpp:281
int fits
Flag to put paramter into FITS-header.
Definition ngcbPARAM.hpp:58
bool operator!=(const ngcbPARAM &other) const
Comparison operator !=.
Definition ngcbPARAM.cpp:33
unsigned int acqList
List of acquisition processes where parameter is used.
Definition ngcbPARAM.hpp:46
const char * ValString()
Get parameter value converted to string format.
Definition ngcbPARAM.cpp:1208
void Restore()
Restore from temporary buffer.
Definition ngcbPARAM.cpp:421
char alias[64]
Parameter alias name.
Definition ngcbPARAM.hpp:52
#define ngcbPARAM_MAX_STRING
Maximum string length.
Definition ngcbPARAM.hpp:35