13#error This is a C++ include file and cannot be used from plain C
21#define ngcbDB_MAX_ATTR (1024 * 128)
26#define ngcbDB_POOL_SIZE (1024 * 1024 * 4)
31#define ngcbATTR_UNKNOWN 0
32#define ngcbATTR_CHAR 1
33#define ngcbATTR_UCHAR 2
34#define ngcbATTR_SHORT 3
35#define ngcbATTR_USHORT 4
37#define ngcbATTR_UINT 6
38#define ngcbATTR_FLOAT 7
39#define ngcbATTR_DOUBLE 8
40#define ngcbATTR_STRING 9
41#define ngcbATTR_LINT 10
42#define ngcbATTR_LUINT 11
43#define ngcbATTR_INT64 12
44#define ngcbATTR_UINT64 13
75 ngcbATTR(
const char *n,
void *a,
int rs,
int nr = 1);
108 explicit ngcbATTR(
const char *n,
char *a,
int nr = 1);
111 explicit ngcbATTR(
const char *n,
unsigned char *a,
int nr = 1);
114 ngcbATTR(
const char *n,
short *a,
int nr = 1);
117 ngcbATTR(
const char *n,
unsigned short *a,
int nr = 1);
120 ngcbATTR(
const char *n,
int *a,
int nr = 1);
123 ngcbATTR(
const char *n,
unsigned int *a,
int nr = 1);
126 ngcbATTR(
const char *n,
float *a,
int nr = 1);
129 ngcbATTR(
const char *n,
double *a,
int nr = 1);
132 ngcbATTR(
const char *n,
long int *a,
int nr = 1);
135 ngcbATTR(
const char *n,
unsigned long *a,
int nr = 1);
138 ngcbATTR(
const char *n,
long long int *a,
int nr = 1);
141 ngcbATTR(
const char *n,
unsigned long long int *a,
int nr = 1);
201 void Init_(
const char *n,
void *a,
int nr);
Definition ngcbATTR.hpp:63
char name[256]
Attribute name.
Definition ngcbATTR.hpp:66
int Update()
Update attribute if changed.
Definition ngcbATTR.cpp:197
ngcbATTR(const char *n, void *a, int rs, int nr=1)
Constructor for generic types.
Definition ngcbATTR.cpp:14
int Size()
Storage size of the attribute.
Definition ngcbATTR.cpp:204
int * waitState
Pointer to wait-state counter for high latency databases.
Definition ngcbATTR.hpp:69
int delay
Initialization delay in microseconds.
Definition ngcbATTR.hpp:72
int RecordSize()
Record size of the attribute.
Definition ngcbATTR.cpp:206
virtual int Export()
Attribute export function.
Definition ngcbATTR.cpp:231
void Pool(char *p)
Set attribute pool.
Definition ngcbATTR.cpp:176
virtual ~ngcbATTR()
Destructor.
Definition ngcbATTR.cpp:174
int Write()
Write attribute.
Definition ngcbATTR.cpp:212
void * Addr()
Physical address of the attribute.
Definition ngcbATTR.cpp:210
int Type()
Type of the attribute.
Definition ngcbATTR.cpp:202
int Changed()
Check if attribute has changed.
Definition ngcbATTR.cpp:178
int NumRecord()
Number of records.
Definition ngcbATTR.cpp:208
void PoolInit()
Initialize attribute pool.
Definition ngcbDB.cpp:205
int Add(ngcbATTR *newAttr)
Add attribute.
Definition ngcbDB.cpp:235
ngcbDB & operator=(const ngcbDB &other)
Operator =.
Definition ngcbDB.cpp:14
void WaitTime(int value)
Set wait time (microseconds)
Definition ngcbDB.cpp:279
size_t PoolSize()
Size of the attribute pool.
Definition ngcbDB.cpp:210
virtual ~ngcbDB()
Destructor.
Definition ngcbDB.cpp:187
int waitState
Wait state for high latency databases.
Definition ngcbATTR.hpp:210
const char * Pool()
Return attribute pool.
Definition ngcbDB.cpp:212
ngcbDB()
Constructor.
Definition ngcbDB.cpp:149
void WaitState(int value)
Set number of states before wait.
Definition ngcbDB.cpp:273
void InitDelay(int value)
Set initialization delay (microseconds)
Definition ngcbDB.cpp:284
int Update()
Update all attributes which have changed.
Definition ngcbDB.cpp:295
void DelAttr()
Delete all attributes.
Definition ngcbDB.cpp:214
int Export()
Export all attributes.
Definition ngcbDB.cpp:314
ngcbDB(const ngcbDB &other)
Copy constructor.
Definition ngcbDB.cpp:84
char ngcb_attr_s64[64]
Definition ngcbATTR.hpp:51
char ngcb_attr_s20[20]
Definition ngcbATTR.hpp:54
char ngcb_attr_s8[8]
Definition ngcbATTR.hpp:57
char ngcb_attr_s12[12]
Definition ngcbATTR.hpp:56
char ngcb_attr_s48[48]
Definition ngcbATTR.hpp:52
char ngcb_attr_s256[256]
Definition ngcbATTR.hpp:49
char ngcb_attr_s128[128]
Definition ngcbATTR.hpp:50
char ngcb_attr_s32[32]
Definition ngcbATTR.hpp:53
char ngcb_attr_s4[4]
Definition ngcbATTR.hpp:58
char ngcb_attr_s16[16]
Definition ngcbATTR.hpp:55