#include <assert.h>
#include "midas.h"
#include "msystem.h"
#include "history.h"
#include "mstrlcpy.h"
Go to the source code of this file.
|
| #define | test1_STR "\ivalue = INT : 1\n\iarray = INT[2] : \n\[0] 1\n\[1] 2\n\svalue = STRING : [20] /Runinfo/Run number\n\sarray = STRING[2] : \n\[32] str1\n\[32] str2\n\" |
| |
| #define | test2_STR "\wvalue = WORD : 1\n\dwvalue = DWORD : 2\n\dvalue = DOUBLE : 3.3\n\cvalue = CHAR : 4\n\dwvalue2 = DWORD : 5\n\fvalue = FLOAT : 6.6\n\dvalue2 = DOUBLE : 7.7\n\cvalue2 = CHAR : 8\n\svalue = STRING : [10] 99999\n\dvalue3 = DOUBLE : 10.01\n\" |
| |
◆ test1_STR
| #define test1_STR "\ivalue = INT : 1\n\iarray = INT[2] : \n\[0] 1\n\[1] 2\n\svalue = STRING : [20] /Runinfo/Run number\n\sarray = STRING[2] : \n\[32] str1\n\[32] str2\n\" |
◆ test2_STR
| #define test2_STR "\wvalue = WORD : 1\n\dwvalue = DWORD : 2\n\dvalue = DOUBLE : 3.3\n\cvalue = CHAR : 4\n\dwvalue2 = DWORD : 5\n\fvalue = FLOAT : 6.6\n\dvalue2 = DOUBLE : 7.7\n\cvalue2 = CHAR : 8\n\svalue = STRING : [10] 99999\n\dvalue3 = DOUBLE : 10.01\n\" |
◆ main()
| int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 197 of file get_record_test.cxx.
198{
205
207
210
213
215
217
218
221
225
228
229 return 0;
230}
void test1(HNDLE hDB, HNDLE hKey)
void test2(HNDLE hDB, HNDLE hKey)
void test2b(HNDLE hDB, HNDLE hKey)
void test1d(HNDLE hDB, HNDLE hKey)
void test2d(HNDLE hDB, HNDLE hKey)
void test1b(HNDLE hDB, HNDLE hKey)
INT cm_get_experiment_database(HNDLE *hDB, HNDLE *hKeyClient)
INT cm_connect_experiment1(const char *host_name, const char *default_exp_name, const char *client_name, void(*func)(char *), INT odb_size, DWORD watchdog_timeout)
INT cm_disconnect_experiment(void)
INT cm_get_environment(char *host_name, int host_name_size, char *exp_name, int exp_name_size)
char host_name[HOST_NAME_LENGTH]
char expt_name[NAME_LENGTH]
◆ print_test1()
◆ print_test2()
Definition at line 129 of file get_record_test.cxx.
130{
131 printf(
"test2_struct: wvalue %d, dwvalue %d, dvalue %f, cvalue %d, dwvalue2 %d, fvalue %f, dvalue2 %f, cvalue2 %d, svalue [%s], dvalue3 %f\n", s->
wvalue, s->
dwvalue, s->
dvalue, s->
cvalue, s->
dwvalue2, s->
fvalue, s->
dvalue2, s->
cvalue2, s->
svalue, s->
dvalue3);
132}
◆ test1()
Definition at line 39 of file get_record_test.cxx.
40{
42 printf("test1!\n");
43
46 if (hh) {
47 printf("already exists, skipping!\n");
48 return;
49 }
50 printf("create test1\n");
52 printf(
"db_create_record status %d\n",
status);
53}
INT db_find_key(HNDLE hDB, HNDLE hKey, const char *key_name, HNDLE *subhKey)
INT db_create_record(HNDLE hDB, HNDLE hKey, const char *orig_key_name, const char *init_str)
◆ test1a()
Definition at line 55 of file get_record_test.cxx.
56{
58 printf("test1a!\n");
59
60 printf("check test1\n");
62 printf(
"db_check_record status %d\n",
status);
63}
INT db_check_record(HNDLE hDB, HNDLE hKey, const char *keyname, const char *rec_str, BOOL correct)
◆ test1b()
Definition at line 65 of file get_record_test.cxx.
66{
68 printf("test1b!\n");
69
71
74
75 printf("get test1\n");
76 int size = sizeof(s);
78 printf(
"db_get_record status %d, size %d/%d\n",
status, (
int)
sizeof(s), size);
80}
void print_test1(const test1_struct *s)
INT db_get_record(HNDLE hDB, HNDLE hKey, void *data, INT *buf_size, INT align)
◆ test1c()
Definition at line 82 of file get_record_test.cxx.
83{
85 printf("test1c - db_get_record1!\n");
86
88
91
92 printf("get test1\n");
93 int size = sizeof(s);
95 printf(
"db_get_record1 status %d, size %d/%d\n",
status, (
int)
sizeof(s), size);
97}
INT db_get_record1(HNDLE hDB, HNDLE hKey, void *data, INT *buf_size, INT align, const char *rec_str)
◆ test1d()
Definition at line 99 of file get_record_test.cxx.
100{
102 printf("test1d - db_get_record2!\n");
103
105
108
109 printf("get test1\n");
110 int size = sizeof(s);
112 printf(
"db_get_record2 status %d, size %d/%d\n",
status, (
int)
sizeof(s), size);
114}
INT db_get_record2(HNDLE hDB, HNDLE hKey, void *data, INT *xbuf_size, INT align, const char *rec_str, BOOL correct)
◆ test2()
Definition at line 147 of file get_record_test.cxx.
148{
150 printf("test2!\n");
151
154 if (hh) {
155 printf("already exists, skipping!\n");
156 return;
157 }
158 printf("create test2\n");
160 printf(
"db_create_record status %d\n",
status);
161}
◆ test2b()
Definition at line 163 of file get_record_test.cxx.
164{
166 printf("test2b!\n");
167
169
172
173 printf("get test2\n");
174 int size = sizeof(s);
176 printf(
"db_get_record status %d, size %d/%d\n",
status, (
int)
sizeof(s), size);
178}
void print_test2(const test2_struct *s)
◆ test2d()
Definition at line 180 of file get_record_test.cxx.
181{
183 printf("test2d - db_get_record2!\n");
184
186
189
190 printf("get test2\n");
191 int size = sizeof(s);
193 printf(
"db_get_record2 status %d, size %d/%d\n",
status, (
int)
sizeof(s), size);
195}