12#error This is a C++ include file and cannot be used from plain C
20#define ngcbDB_MAX_ATTR (1024 * 128)
25#define ngcbDB_POOL_SIZE (1024 * 1024 * 4)
30#define ngcbATTR_UNKNOWN 0
31#define ngcbATTR_CHAR 1
32#define ngcbATTR_UCHAR 2
33#define ngcbATTR_SHORT 3
34#define ngcbATTR_USHORT 4
36#define ngcbATTR_UINT 6
37#define ngcbATTR_FLOAT 7
38#define ngcbATTR_DOUBLE 8
39#define ngcbATTR_STRING 9
40#define ngcbATTR_LINT 10
41#define ngcbATTR_LUINT 11
42#define ngcbATTR_INT64 12
43#define ngcbATTR_UINT64 13
74 ngcbATTR(
const char *n,
void *a,
int rs,
int nr = 1);
107 explicit ngcbATTR(
const char *n,
char *a,
int nr = 1);
110 explicit ngcbATTR(
const char *n,
unsigned char *a,
int nr = 1);
113 ngcbATTR(
const char *n,
short *a,
int nr = 1);
116 ngcbATTR(
const char *n,
unsigned short *a,
int nr = 1);
119 ngcbATTR(
const char *n,
int *a,
int nr = 1);
122 ngcbATTR(
const char *n,
unsigned int *a,
int nr = 1);
125 ngcbATTR(
const char *n,
float *a,
int nr = 1);
128 ngcbATTR(
const char *n,
double *a,
int nr = 1);
131 ngcbATTR(
const char *n,
long int *a,
int nr = 1);
134 ngcbATTR(
const char *n,
unsigned long *a,
int nr = 1);
137 ngcbATTR(
const char *n,
long long int *a,
int nr = 1);
140 ngcbATTR(
const char *n,
unsigned long long int *a,
int nr = 1);
200 void Init_(
const char *n,
void *a,
int nr);
Definition ngcbATTR.hpp:62
char name[256]
Attribute name.
Definition ngcbATTR.hpp:65
int Update()
Update attribute if changed.
Definition ngcbATTR.cpp:196
ngcbATTR(const char *n, void *a, int rs, int nr=1)
Constructor for generic types.
Definition ngcbATTR.cpp:13
int Size()
Storage size of the attribute.
Definition ngcbATTR.cpp:203
int * waitState
Pointer to wait-state counter for high latency databases.
Definition ngcbATTR.hpp:68
int delay
Initialization delay in microseconds.
Definition ngcbATTR.hpp:71
int RecordSize()
Record size of the attribute.
Definition ngcbATTR.cpp:205
virtual int Export()
Attribute export function.
Definition ngcbATTR.cpp:230
void Pool(char *p)
Set attribute pool.
Definition ngcbATTR.cpp:175
virtual ~ngcbATTR()
Destructor.
Definition ngcbATTR.cpp:173
int Write()
Write attribute.
Definition ngcbATTR.cpp:211
void * Addr()
Physical address of the attribute.
Definition ngcbATTR.cpp:209
int Type()
Type of the attribute.
Definition ngcbATTR.cpp:201
int Changed()
Check if attribute has changed.
Definition ngcbATTR.cpp:177
int NumRecord()
Number of records.
Definition ngcbATTR.cpp:207
void PoolInit()
Initialize attribute pool.
Definition ngcbDB.cpp:204
int Add(ngcbATTR *newAttr)
Add attribute.
Definition ngcbDB.cpp:234
ngcbDB & operator=(const ngcbDB &other)
Operator =.
Definition ngcbDB.cpp:13
void WaitTime(int value)
Set wait time (microseconds)
Definition ngcbDB.cpp:278
size_t PoolSize()
Size of the attribute pool.
Definition ngcbDB.cpp:209
virtual ~ngcbDB()
Destructor.
Definition ngcbDB.cpp:186
int waitState
Wait state for high latency databases.
Definition ngcbATTR.hpp:209
const char * Pool()
Return attribute pool.
Definition ngcbDB.cpp:211
ngcbDB()
Constructor.
Definition ngcbDB.cpp:148
void WaitState(int value)
Set number of states before wait.
Definition ngcbDB.cpp:272
void InitDelay(int value)
Set initialization delay (microseconds)
Definition ngcbDB.cpp:283
int Update()
Update all attributes which have changed.
Definition ngcbDB.cpp:294
void DelAttr()
Delete all attributes.
Definition ngcbDB.cpp:213
int Export()
Export all attributes.
Definition ngcbDB.cpp:313
ngcbDB(const ngcbDB &other)
Copy constructor.
Definition ngcbDB.cpp:83
char ngcb_attr_s64[64]
Definition ngcbATTR.hpp:50
char ngcb_attr_s20[20]
Definition ngcbATTR.hpp:53
char ngcb_attr_s8[8]
Definition ngcbATTR.hpp:56
char ngcb_attr_s12[12]
Definition ngcbATTR.hpp:55
char ngcb_attr_s48[48]
Definition ngcbATTR.hpp:51
char ngcb_attr_s256[256]
Definition ngcbATTR.hpp:48
char ngcb_attr_s128[128]
Definition ngcbATTR.hpp:49
char ngcb_attr_s32[32]
Definition ngcbATTR.hpp:52
char ngcb_attr_s4[4]
Definition ngcbATTR.hpp:57
char ngcb_attr_s16[16]
Definition ngcbATTR.hpp:54