AAO DRAMA C++ Interface (Old style)
DRAMA C++, Depreciated, don't use for new code
Sdp.h
1/*
2 * Name: filter.m4
3 *
4 * Description:
5 * DOXYGEN Input file filter for DRAMA source files.
6 *
7 * This file must be complatible with both Solaris and GNU m4. All
8 * unused macros are deleted and this comment must end up as a C/C++
9 * compatible comment which is not picked up by DOXYGEN.
10 *
11 * Synopsis:
12 * DCF(func) => Produces a link to a DRAMA C source file func.html
13 * in ../routines.
14 * DDL(link,text) => Produce a link to ../link.html, specified link text.
15 *
16 * Language: m4 macro.
17 *
18 * Author: Tony Farrell, AAO.
19 *
20 * "@(#) $Id$"
21 *
22 * History:
23 * 10-Nov-2004 - TJF - Original Version.
24 */
25
26
27
28#ifndef SDPINC
29#define SDPINC
30/* S D P . H
31
32 * Module name:
33 SDP.H
34
35 * Function:
36 Simple Dits parameter system include file
37
38 * Description:
39
40
41 Note - this file now uses DOXYGEN commands fro the C++ interfaces.
42
43 * Language:
44 C
45
46 * Support: Tony Farrell, AAO
47
48 *
49
50 * History:
51 08-Sep-1992 - TJF - Original version
52 02-Aug-1993 - TJF - Use StatusType.
53
54 29-Sep-1993 - TJF - Add Sccs id
55 06-Oct-1993 - TJF - Use drama.h
56 21-Oct-1993 - TJF - Add new routines from sdpop.c
57 25-Oct-1993 - TJF - SdpGet now has a delete flag.
58 10-Aug-1995 - TJF - Add 64 bit calls.
59 29-Jan-1997 - TJF - Parameter system id is now a DVOIDP. Add SdpMGet.
60 19-May-2000 - TJF - Move extern "C" to just before prototypes since
61 some C++ compilers get upset if we include the
62 other include files after extern "C".
63 05-Apr-2004 - TJF - Expand Sdp class to support bool, and std::string.
64 Add doxygen comment for Sdp class.
65 17-Feb-2005 - TJF - Was incorrectly defining and INT64 version of
66 Sdp::Put when on LONG__64 architecture.
67 10-Mar-2006 - TJF - Change from using long/unsigned long in C++ stuff
68 to using INT32/UINT32, which cleans up the 64 bit
69 stuff a lot.
70 18-May-2009 - TJF - The version of Sdp::Get which fetech into a std::string
71 value was not working correctly if the buffer was too small.
72 In fact - it was a bit of a mess.
73 12-Aug-2010 - TJF - Include Dits_Err.h and Ers.h when DRAMA_ALLOW_CPP_STDLIB
74 is defined.
75 {@change entry@}
76
77
78 * @(#) $Id$
79
80 * Copyright (c) Anglo-Australian Telescope Board, 1995.
81 Not to be used for commercial purposes without AATB permission.
82
83
84 */
85
86/*
87 * If under C++ and this is allowed, then we can add functions which
88 * require the C++ Standard Library (say under GCC 2.95.2 or later).
89 */
90#ifdef DRAMA_ALLOW_CPP_STDLIB
91#include <string>
92#include "Dits_Err.h"
93#include "Ers.h"
94#endif
95
96
97#include "drama.h"
98#include "sds.h"
99#include "arg.h"
100
101/*
102 * Define the parameter types.
103 */
104#define SDP_CHAR SDS_CHAR
105#define SDP_BYTE SDS_BYTE
106#define SDP_UBYTE SDS_UBYTE
107#define SDP_SHORT SDS_SHORT
108#define SDP_USHORT SDS_USHORT
109#define SDP_INT SDS_INT
110#define SDP_UINT SDS_UINT
111#define SDP_I64 SDS_I64
112#define SDP_UI64 SDS_UI64
113#define SDP_FLOAT SDS_FLOAT
114#define SDP_DOUBLE SDS_DOUBLE
115#define SDP_STRING ARG_STRING
116#define SDP_SDS ARG_SDS
117
118typedef struct {
119 DCONSTV char *name;
120 DCONSTV DVOIDP value;
121 int type;
125#ifdef __cplusplus
126extern "C" {
127#endif
128
129#ifdef DPROTOTYPES_OK
130 DPUBLIC DVOID SdpInit ( SdsIdType *id ,
131 StatusType * DCONSTR status);
132 DPUBLIC DVOID SdpCreate (
133 DCONSTV SdsIdType id,
134 DCONSTV long int size,
135 DCONSTV SdpParDefType pardefs[],
136 StatusType * DCONSTR status);
137
138 DPUBLIC DVOID SdpCreateItem (
139 DCONSTV SdsIdType parsys,
140 DCONSTV SdsIdType item,
141 StatusType * DCONSTR status);
142
143 DPUBLIC SdsIdType SdpGetSys();
144
145 DPUBLIC DVOID SdpSetReadonly (StatusType * DCONSTR status);
146
147 DPUBLIC DVOID SdpGet (
148 DVOIDP id,
149 DCONSTV char * name,
150 SdsIdType * parid,
151 int * delete_flag,
152 StatusType * status);
153
154 DPUBLIC DVOID SdpMGet (
155 DVOIDP id,
156 char * names,
157 SdsIdType * parid,
158 int * delete_flag,
159 StatusType * status);
160
161 DPUBLIC DVOID SdpSet (
162 DVOIDP id,
163 DCONSTV char * name,
164 SdsIdType * parid,
165 StatusType * status);
166
167
168 DPUBLIC DVOID SdpPutc(
169 DCONSTV char * DCONSTR name,
170 DCONSTV char value,
171 StatusType * DCONSTR status);
172
173 DPUBLIC DVOID SdpPutus(
174 DCONSTV char * DCONSTR name,
175 DCONSTV unsigned short value,
176 StatusType * DCONSTR status);
177 DPUBLIC DVOID SdpPuts(
178 DCONSTV char *DCONSTR name,
179 DCONSTV short value,
180 StatusType *DCONSTR status);
181 DPUBLIC DVOID SdpPuti(
182 DCONSTV char * DCONSTR name,
183 DCONSTV long value,
184 StatusType * DCONSTR status);
185 DPUBLIC DVOID SdpPutu(
186 DCONSTV char * DCONSTR name,
187 DCONSTV unsigned long value,
188 StatusType *DCONSTR status);
189
190# ifdef VAXC
191# pragma nostandard /* Structure by value . */
192# endif
193 DPUBLIC DVOID SdpPuti64(
194 DCONSTV char * DCONSTR name,
195 DCONSTV INT64 value,
196 StatusType * DCONSTR status);
197
198 DPUBLIC DVOID SdpPutu64(
199 DCONSTV char * DCONSTR name,
200 DCONSTV UINT64 value,
201 StatusType *DCONSTR status);
202# ifdef VAXC
203# pragma standard /* Structure by value . */
204# endif
205
206 DPUBLIC DVOID SdpPutf(
207 DCONSTV char *DCONSTR name,
208 DCONSTV float value,
209 StatusType *DCONSTR status);
210 DPUBLIC DVOID SdpPutd(
211 DCONSTV char *DCONSTR name,
212 DCONSTV double value,
213 StatusType *DCONSTR status);
214 DPUBLIC DVOID SdpPutString(
215 DCONSTV char * DCONSTR name,
216 DCONSTV char *DCONSTR value,
217 StatusType *DCONSTR status);
218 DPUBLIC DVOID SdpPutSds(
219 DCONSTV char * DCONSTR name,
220 DCONSTV SdsIdType value,
221 StatusType * DCONSTR status);
222 DPUBLIC DVOID SdpUpdate(
223 DCONSTV SdsIdType id,
224 StatusType * DCONSTR status);
225 DPUBLIC DVOID SdpUpdateByName(
226 DCONSTV char * DCONSTR name,
227 StatusType * DCONSTR status);
228 DPUBLIC DVOID SdpGetc(
229 DCONSTV char *DCONSTR name,
230 char *DCONSTR value,
231 StatusType *DCONSTR status);
232 DPUBLIC DVOID SdpGets(
233 DCONSTV char *DCONSTR name,
234 short *DCONSTR value,
235 StatusType * DCONSTR status);
236 DPUBLIC DVOID SdpGetus(
237 DCONSTV char * DCONSTR name,
238 unsigned short * DCONSTR value,
239 StatusType * DCONSTR status);
240 DPUBLIC DVOID SdpGeti(
241 DCONSTV char * DCONSTR name,
242 long * DCONSTR value,
243 StatusType * DCONSTR status);
244 DPUBLIC DVOID SdpGetu(
245 DCONSTV char * DCONSTR name,
246 unsigned long * DCONSTR value,
247 StatusType * DCONSTR status);
248 DPUBLIC DVOID SdpGeti64(
249 DCONSTV char * DCONSTR name,
250 INT64 * DCONSTR value,
251 StatusType * DCONSTR status);
252 DPUBLIC DVOID SdpGetu64(
253 DCONSTV char * DCONSTR name,
254 UINT64 * DCONSTR value,
255 StatusType * DCONSTR status);
256 DPUBLIC DVOID SdpGetf(
257 DCONSTV char * DCONSTR name,
258 float * DCONSTR value,
259 StatusType * DCONSTR status);
260 DPUBLIC DVOID SdpGetd(
261 DCONSTV char *DCONSTR name,
262 double * DCONSTR value,
263 StatusType *DCONSTR status);
264 DPUBLIC DVOID SdpGetString(
265 DCONSTV char * DCONSTR name,
266 DCONSTV long len,
267 char * DCONSTR value,
268 StatusType * DCONSTR status);
269 DPUBLIC DVOID SdpGetSds(
270 DCONSTV char * DCONSTR name,
271 SdsIdType *DCONSTR value,
272 StatusType * DCONSTR status);
273
274 DPUBLIC DVOID SdpPutStruct(
275 DCONSTV char * DCONSTR name,
276 DCONSTV SdsIdType value,
277 DCONSTV int copy,
278 DCONSTV int create,
279 StatusType * DCONSTR status);
280
281#else /* if ! DPROTOTYPES_OK */
282
283 DPUBLIC DVOID SdpInit ();
284 DPUBLIC DVOID SdpCreate ();
285 DPUBLIC DVOID SdpCreateItem ();
286 DPUBLIC DVOID SdpSetReadonly();
287
288 DPUBLIC DVOID SdpGet ();
289 DPUBLIC DVOID SdpMGet ();
290 DPUBLIC DVOID SdpSet ();
291 DPUBLIC DVOID SdpPutc();
292 DPUBLIC DVOID SdpPutus();
293 DPUBLIC DVOID SdpPuts();
294 DPUBLIC DVOID SdpPuti();
295 DPUBLIC DVOID SdpPutu();
296 DPUBLIC DVOID SdpPutf();
297 DPUBLIC DVOID SdpPutd();
298 DPUBLIC DVOID SdpPutString();
299 DPUBLIC DVOID SdpPutSds();
300 DPUBLIC DVOID SdpUpdate();
301 DPUBLIC DVOID SdpUpdateByName();
302 DPUBLIC DVOID SdpGetc();
303 DPUBLIC DVOID SdpGets();
304 DPUBLIC DVOID SdpGetus();
305 DPUBLIC DVOID SdpGeti();
306 DPUBLIC DVOID SdpGetu();
307 DPUBLIC DVOID SdpGetf();
308 DPUBLIC DVOID SdpGetd();
309 DPUBLIC DVOID SdpGetString();
310 DPUBLIC DVOID SdpGetSds();
311 DPUBLIC DVOID SdpPutStruct();
312 DPUBLIC SdsIdType SdpGetSys();
313
314
315#endif /* ! DPROTOTYPES_OK */
316
317#ifdef __cplusplus
318} /* extern "C" */
319
320
321/*
322 * C++ only section.
323 *
324 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
325 *
326 * Here is the a C++ interface to Sdp. No object code required since
327 * all code is inline. Note, there is no actual object, just static
328 * members which provide access to the C interface using function
329 * overloading. For example
330 * Sdp::Put("FRED",1,status);
331 */
346class Sdp {
347 public:
365 static void CreateItem(const SdsId & parsys,
366 SdsId &item, StatusType *status) {
367 SdpCreateItem((SdsIdType)parsys,(SdsIdType)item,status);
368 /* Ensure item is not deleted by destructor (id can go) */
369 if (*status == STATUS__OK)
370 item.ClearDelete();
371 }
372# ifndef CPP_NOBOOL
388 static void Put(const char *name, bool value, StatusType *status) {
389 SdpPutus(name,(short)value, status);
390 }
391# endif /* ! defined CPP_NOBOOL */
404 static void Put(const char *name, char value, StatusType *status) {
405 SdpPutc(name,value,status);
406 };
419 static void Put(const char *name, unsigned short value,
420 StatusType *status) {
421 SdpPutus(name,value,status);
422 };
435 static void Put(const char *name, short value, StatusType *status) {
436 SdpPuts(name,value,status);
437 };
450 static void Put(const char *name, INT32 value , StatusType *status) {
451 SdpPuti(name,value,status);
452 };
465 static void Put(const char *name, UINT32 value,
466 StatusType *status) {
467 SdpPutu(name,value,status);
468 };
481 static void Put(const char *name, INT64 value , StatusType *status) {
482 SdpPuti64(name,value,status);
483 };
496 static void Put(const char *name, UINT64 value,
497 StatusType *status) {
498 SdpPutu64(name,value,status);
499 };
512 static void Put(const char *name, float value, StatusType *status) {
513 SdpPutf(name,value,status);
514 };
527 static void Put(const char *name, double value, StatusType *status) {
528 SdpPutd(name,value,status);
529 };
543 static void Put(const char *name, const char * value, StatusType *status)
544 {
545 SdpPutString(name,value,status);
546 };
569 static void PutSds(const char *name, SdsIdType value,
570 StatusType *status) {
571 SdpPutSds(name,value,status);
572 };
587 static void Update(SdsIdType id, StatusType *status) {
588 SdpUpdate(id,status);
589 };
604 static void Update(const char *name, StatusType *status) {
605 SdpUpdateByName(name,status);
606 }
607# ifndef CPP_NOBOOL
623 static void Get(const char *name, bool * value,
624 StatusType *status) {
625 char cvalue;
626 SdpGetc(name,&cvalue,status);
627 *value = cvalue ? true : false;
628 };
629# endif /* ! defined CPP_NOBOOL */
642 static void Get(const char *name, char * value,
643 StatusType *status) {
644 SdpGetc(name,value,status);
645 };
659 static void Get(const char *name, short * value,
660 StatusType *status) {
661 SdpGets(name,value,status);
662 };
676 static void Get(const char *name, unsigned short * value,
677 StatusType *status) {
678 SdpGetus(name,value,status);
679 };
692 static void Get(const char *name, INT32 * value,
693 StatusType *status) {
694 long v;
695 SdpGeti(name,&v,status);
696 *value = v;
697 };
710 static void Get(const char *name, UINT32 * value,
711 StatusType *status) {
712 unsigned long v;
713 SdpGetu(name,&v,status);
714 *value = v;
715 };
730 static void Get(const char *name, INT64 * value,
731 StatusType *status) {
732 SdpGeti64(name,value,status);
733 };
747 static void Get(const char *name, UINT64 * value,
748 StatusType *status) {
749 SdpGetu64(name,value,status);
750 };
762 static void Get(const char *name, float * value,
763 StatusType *status) {
764 SdpGetf(name,value,status);
765 };
777 static void Get(const char *name, double * value,
778 StatusType *status) {
779 SdpGetd(name,value,status);
780 };
794 static void Get(const char *name, int len, char * value,
795 StatusType *status) {
796 SdpGetString(name,len,value,status);
797 };
817 static void GetSds(const char *name, SdsIdType * value,
818 StatusType * status) {
819 SdpGetSds(name,value,status);
820 }
837 static void Get(const char *name, SdsId * value,
838 StatusType * status) {
839 /*
840 * Need to get as and SdsIdType and shallow copy into the
841 * id.
842 */
843 SdsIdType id;
844 SdpGetSds(name,&id,status);
845 value->ShallowCopy(id, true, false, false);
846 }
847
848
871 static void Put(const char *name, const SdsId & value,
872 StatusType *status) {
873 SdpPutSds(name,(SdsIdType)value,status);
874 }
875
898 static void PutStruct(const char *name,
899 const SdsId &value,
900 StatusType *status,
901 const bool create=true ) {
902 SdpPutStruct(name,(SdsIdType)value,(int)true,
903 (int)create,status);
904 };
929 static void PutStruct(const char *name,
930 SdsId *value,
931 StatusType *status,
932 const bool create=true ) {
933 SdpPutStruct(name,
934 value->COut(true), /* Out value outlives */
935 (int)false,
936 (int)create,status);
937 };
938
939#ifdef DRAMA_ALLOW_CPP_STDLIB
940 /*
941 * If DRAMA is allowed to use the C++ Standard Template library, then
942 * we add these functions to Sdp. All of these are about using
943 * std::string instead of char[], and the only complicated one
944 * is the Get function which gets the value as a string.
945 *
946 */
947
965 static void Put (const std::string &name, bool value, StatusType * const status) {
966 SdpPutus(name.c_str(),(unsigned short)value, status);
967 };
982 static void Put (const std::string &name, char value, StatusType * const status) {
983 SdpPutc(name.c_str(),value,status);
984 };
999 static void Put (const std::string &name,short value, StatusType * const status) {
1000 SdpPuts(name.c_str(),value,status);
1001 };
1016 static void Put (const std::string &name, unsigned short value,
1017 StatusType * const status) {
1018 SdpPutus(name.c_str(),value,status);
1019 };
1034 static void Put (const std::string &name, INT32 value,
1035 StatusType * const status) {
1036 SdpPuti(name.c_str(),value,status);
1037 };
1052 static void Put (const std::string &name, UINT32 value,
1053 StatusType * const status) {
1054 SdpPutu(name.c_str(),value,status);
1055 };
1056
1071 static void Put (const std::string &name, INT64 value, StatusType * const status) {
1072 SdpPuti64(name.c_str(),value,status);
1073 };
1088 static void Put (const std::string &name, UINT64 value, StatusType * const status) {
1089 SdpPutu64(name.c_str(),value,status);
1090 };
1105 static void Put (const std::string &name, float value, StatusType * const status) {
1106 SdpPutf(name.c_str(),value,status);
1107 };
1122 static void Put (const std::string &name, double value, StatusType * const status) {
1123 SdpPutd(name.c_str(),value,status);
1124 };
1140 static void Put(const char *name,
1141 const std::string &value,
1142 StatusType *status) {
1143 SdpPutString(name, value.c_str(), status);
1144 }
1160 static void Put(const std::string &name,
1161 const std::string &value,
1162 StatusType *status) {
1163 /* Uses the above function */
1164 Put(name.c_str(), value, status);
1165 }
1166
1184 static void Get (const std::string &name, bool * value,
1185 StatusType * const status) {
1186 unsigned short v;
1187 SdpGetus(name.c_str(),&v,status);
1188 *value = v ? true : false;
1189 }
1204 static void Get (const std::string &name, char * value, StatusType * const status) {
1205 SdpGetc(name.c_str(),value,status);
1206 }
1222 static void Get (const std::string &name, short * value, StatusType * const status) {
1223 SdpGets(name.c_str(),value,status);
1224 }
1239 static void Get (const std::string &name, unsigned short * value,
1240 StatusType * const status) {
1241 SdpGetus(name.c_str(),value,status);
1242 }
1257 static void Get (const std::string &name, INT32 * value,
1258 StatusType * const status) {
1259 Sdp::Get(name.c_str(),value,status);
1260 }
1275 static void Get (const std::string &name, UINT32 * value,
1276 StatusType * const status) {
1277 Sdp::Get(name.c_str(),value,status);
1278 }
1294 static void Get (const std::string &name, INT64 * value, StatusType * const status) {
1295 SdpGeti64(name.c_str(),value,status);
1296 }
1311 static void Get (const std::string &name, UINT64 * value, StatusType * const status) {
1312 SdpGetu64(name.c_str(),value,status);
1313 }
1328 static void Get (const std::string &name, float * value, StatusType * const status) {
1329 SdpGetf(name.c_str(),value,status);
1330 }
1344 static void Get (const std::string &name, double * value, StatusType * const status) {
1345 SdpGetd(name.c_str(),value,status);
1346 }
1367 static void Get(const char *name,
1368 std::string *value,
1369 StatusType *status,
1370 int buflen = 100) {
1371
1372 /* Find the item we are interested - accessing it via its SDS id */
1373 SdsId ItemId;
1374 Sdp::Get(name, &ItemId, status);
1375
1376 if (*status != STATUS__OK) return;
1377
1378 char tname[SDS_C_NAMELEN];
1379 SdsCodeType code;
1380 long ndims;
1381 unsigned long dims[7];
1382
1383 /* Get details on this item */
1384
1385 ItemId.Info(tname, &code, &ndims, dims, status);
1386 if (*status != STATUS__OK) return;
1387
1388 if ((code == SDS_CHAR)&&(ndims == 1))
1389 {
1390 /* Character array. Ensure we have sufficent space */
1391 buflen = dims[0] + 1;
1392 }
1393 /*
1394 * We need to allocate the buffer to put this into.
1395 */
1396 char *buffer=0;
1397 buffer = new char[buflen];
1398 if (buffer == 0)
1399 {
1400 *status = DITS__MALLOCERR;
1401 ErsRep(0, status, "Error allocating %d bytes for Sdp::Get into std::string",
1402 buflen);
1403 return;
1404 }
1405 /* Fetch the value */
1406 SdpGetString(name, buflen, buffer, status);
1407
1408 /*
1409 * Set up the return and then free the buffer.
1410 */
1411 if (*status == STATUS__OK)
1412 *value = buffer;
1413
1414 delete[] buffer;
1415
1416 }
1417
1418 /*
1419 * Interface to the above where the name string is a std::string.
1420 *
1421 */
1442 static void Get(const std::string &name,
1443 std::string *value,
1444 StatusType *status,
1445 int buflen = 100) {
1446 Get(name.c_str(), value, status, buflen);
1447 }
1448
1470 static void GetSds(const std::string &name, SdsIdType * value,
1471 StatusType * status) {
1472 SdpGetSds(name.c_str(),value,status);
1473 }
1492 static void Get(const std::string &name, SdsId * value,
1493 StatusType * status) {
1494 /*
1495 * Need to get as and SdsIdType and shallow copy into the
1496 * id.
1497 */
1498 SdsIdType id;
1499 SdpGetSds(name.c_str(),&id,status);
1500 value->ShallowCopy(id, true, false, false);
1501 }
1502
1526 static void Put(const std::string &name, const SdsId & value,
1527 StatusType *status) {
1528 SdpPutSds(name.c_str(),(SdsIdType)value,status);
1529 }
1554 static void PutStruct(const std::string &name,
1555 const SdsId &value,
1556 StatusType *status,
1557 const bool create=true ) {
1558 SdpPutStruct(name.c_str(),(SdsIdType)value,(int)true,
1559 (int)create,status);
1560 };
1588 static void PutStruct(const std::string &name,
1589 SdsId *value,
1590 StatusType *status,
1591 const bool create=true ) {
1592 SdpPutStruct(name.c_str(),
1593 value->COut(true), /* Out value outlives */
1594 (int)false,
1595 (int)create,status);
1596 };
1597
1598
1599#endif /* defined DRAMA_ALLOW_CPP_STDLIB */
1600
1601
1602};
1603#endif /* C++ */
1604
1605#endif /* !defined SDPINC */
static void Get(const char *name, UINT32 *value, StatusType *status)
Fetch an unsigned 32 bit integer value from a named parameter.
Definition Sdp.h:710
static void PutStruct(const char *name, SdsId *value, StatusType *status, const bool create=true)
Put a SDS item a named parameter - replacing the existing value.
Definition Sdp.h:929
static void Put(const char *name, UINT32 value, StatusType *status)
Put a unsigned 32 bit integer value into a named parameter.
Definition Sdp.h:465
static void Get(const char *name, INT64 *value, StatusType *status)
Fetch a 64 bit integer value from a named parameter.
Definition Sdp.h:730
static void PutStruct(const char *name, const SdsId &value, StatusType *status, const bool create=true)
Put a SDS item a named parameter - replacing the existing value.
Definition Sdp.h:898
static void Put(const char *name, bool value, StatusType *status)
Put a boolean value into a named parameter.
Definition Sdp.h:388
static void Get(const char *name, UINT64 *value, StatusType *status)
Fetch a unsigned 64 bit integer value from a named parameter.
Definition Sdp.h:747
static void Get(const std::string &name, bool *value, StatusType *const status)
Fetch a boolean value from a named parameter.
Definition Sdp.h:1184
static void Update(const char *name, StatusType *status)
Indicate a parameter value has been updated by other means.
Definition Sdp.h:604
static void Update(SdsIdType id, StatusType *status)
Indicate a parameter value has been updated by SDS.
Definition Sdp.h:587
static void Put(const char *name, INT32 value, StatusType *status)
Put a 32 bit integer value into a named parameter.
Definition Sdp.h:450
static void Get(const std::string &name, INT32 *value, StatusType *const status)
Fetch a 32 bit integer value from a named parameter.
Definition Sdp.h:1257
static void Get(const std::string &name, short *value, StatusType *const status)
Fetch a short integer value from a named parameter.
Definition Sdp.h:1222
static void Put(const char *name, const SdsId &value, StatusType *status)
Put a SDS item a named parameter.
Definition Sdp.h:871
static void Get(const char *name, short *value, StatusType *status)
Fetch a short integer value from a named parameter.
Definition Sdp.h:659
static void GetSds(const std::string &name, SdsIdType *value, StatusType *status)
Access an parameter using an SDS id.
Definition Sdp.h:1470
static void Put(const char *name, INT64 value, StatusType *status)
Put a INT64 value into a named parameter.
Definition Sdp.h:481
static void PutStruct(const std::string &name, const SdsId &value, StatusType *status, const bool create=true)
Put a SDS item a named parameter - replacing the existing value.
Definition Sdp.h:1554
static void Put(const std::string &name, UINT64 value, StatusType *const status)
Put a UINT64 bit value into a named parameter.
Definition Sdp.h:1088
static void PutSds(const char *name, SdsIdType value, StatusType *status)
Put a SDS item a named parameter.
Definition Sdp.h:569
static void CreateItem(const SdsId &parsys, SdsId &item, StatusType *status)
Create a new parameter by inserting an SDS item.
Definition Sdp.h:365
static void Get(const std::string &name, UINT32 *value, StatusType *const status)
Fetch a 32 bit unsigned integer value from a named parameter.
Definition Sdp.h:1275
static void Get(const std::string &name, float *value, StatusType *const status)
Fetch a float size real value from a named parameter.
Definition Sdp.h:1328
static void Put(const std::string &name, float value, StatusType *const status)
Put a floating point value into a named parameter.
Definition Sdp.h:1105
static void Put(const std::string &name, unsigned short value, StatusType *const status)
Put a unsigned short value into a named parameter.
Definition Sdp.h:1016
static void Get(const std::string &name, std::string *value, StatusType *status, int buflen=100)
Fetch a string value as a std::string from a named parameter.
Definition Sdp.h:1442
static void Put(const char *name, UINT64 value, StatusType *status)
Put a UINT64 bit value into a named parameter.
Definition Sdp.h:496
static void Get(const std::string &name, SdsId *value, StatusType *status)
Access an parameter using an SDS id.
Definition Sdp.h:1492
static void Put(const char *name, const char *value, StatusType *status)
Put a character string value into a named parameter.
Definition Sdp.h:543
static void Get(const char *name, unsigned short *value, StatusType *status)
Fetch an unsigned short integer value from a named parameter.
Definition Sdp.h:676
static void Get(const char *name, INT32 *value, StatusType *status)
Fetch a 32 bit integer value from a named parameter.
Definition Sdp.h:692
static void Get(const char *name, std::string *value, StatusType *status, int buflen=100)
Fetch a string value as a std::string from a named parameter.
Definition Sdp.h:1367
static void Put(const char *name, double value, StatusType *status)
Put a double length floating point value into a named parameter.
Definition Sdp.h:527
static void Put(const std::string &name, bool value, StatusType *const status)
Put a boolean value into a named parameter.
Definition Sdp.h:965
static void Put(const char *name, float value, StatusType *status)
Put a floating point value into a named parameter.
Definition Sdp.h:512
static void Get(const char *name, bool *value, StatusType *status)
Fetch a boolean value from a named parameter.
Definition Sdp.h:623
static void Put(const char *name, unsigned short value, StatusType *status)
Put an unsigned short value into a named parameter.
Definition Sdp.h:419
static void Put(const char *name, const std::string &value, StatusType *status)
Put a character string value into a named parameter.
Definition Sdp.h:1140
static void Put(const std::string &name, const SdsId &value, StatusType *status)
Put a SDS item a named parameter.
Definition Sdp.h:1526
static void Put(const char *name, char value, StatusType *status)
Put a char value into a named parameter.
Definition Sdp.h:404
static void Put(const std::string &name, INT32 value, StatusType *const status)
Put a 32 bit integer value into a named parameter.
Definition Sdp.h:1034
static void Get(const std::string &name, unsigned short *value, StatusType *const status)
Fetch an unsigned short integer value from a named parameters.
Definition Sdp.h:1239
static void Get(const std::string &name, char *value, StatusType *const status)
Fetch a char value from a named parameter.
Definition Sdp.h:1204
static void Get(const char *name, int len, char *value, StatusType *status)
Fetch a char * value from a named parameter.
Definition Sdp.h:794
static void Get(const char *name, SdsId *value, StatusType *status)
Access an parameter using an SDS id.
Definition Sdp.h:837
static void Put(const std::string &name, double value, StatusType *const status)
Put a double length floating point value into a named parameter.
Definition Sdp.h:1122
static void Put(const std::string &name, UINT32 value, StatusType *const status)
Put a unsigned 32 bit value into a named parameter.
Definition Sdp.h:1052
static void Put(const std::string &name, const std::string &value, StatusType *status)
Put a char string value into a named parameter.
Definition Sdp.h:1160
static void Get(const std::string &name, INT64 *value, StatusType *const status)
Fetch a 64 bit integer value from a named parameter.
Definition Sdp.h:1294
static void Get(const char *name, char *value, StatusType *status)
Fetch a char value from a named parameter.
Definition Sdp.h:642
static void Get(const std::string &name, UINT64 *value, StatusType *const status)
Fetch A Unsigned 64 Bit Integer Value From A Named Parameter.
Definition Sdp.h:1311
static void PutStruct(const std::string &name, SdsId *value, StatusType *status, const bool create=true)
Put a SDS item a named parameter - replacing the existing value.
Definition Sdp.h:1588
static void Put(const std::string &name, INT64 value, StatusType *const status)
Put a INT64 value into a named parameter.
Definition Sdp.h:1071
static void Get(const char *name, float *value, StatusType *status)
Fetch a float size real value from a named parameter.
Definition Sdp.h:762
static void Put(const std::string &name, char value, StatusType *const status)
Put a char value into a named parameter.
Definition Sdp.h:982
static void Get(const std::string &name, double *value, StatusType *const status)
Fetch a double size real value from a named parameter.
Definition Sdp.h:1344
static void GetSds(const char *name, SdsIdType *value, StatusType *status)
Access an parameter using an SDS id.
Definition Sdp.h:817
static void Put(const std::string &name, short value, StatusType *const status)
Put a short value into a named parameter.
Definition Sdp.h:999
static void Get(const char *name, double *value, StatusType *status)
Fetch a double size real value from a named parameter.
Definition Sdp.h:777
static void Put(const char *name, short value, StatusType *status)
Put a short value into a named parameter.
Definition Sdp.h:435
A C++ Interface to the DRAMA Simple DITS Parameter System (SDP).
Definition Sdp.h:346
void Info(char *const name, SdsCodeType *const code, long *const ndims, unsigned long *const dims, StatusType *const status) const
Return information about an SDS item.
Definition sds.h:1435
void ShallowCopy(SdsId &source, const bool outlives=true)
Shallow copy from SdsId.
Definition sds.h:1932
void ClearDelete()
Indicate the underlying SDS structure should NOT be deleted when the SdsId object is desroyed.
Definition sds.h:1219
SdsIdType COut(const bool outlives, bool *const free=0, bool *const del=0, bool *const readfree=0)
Return this item as an SdsIdType for return to C code.
Definition sds.h:1831
A C++ Interface to the handling SDS structures.
Definition sds.h:761
int type
The type of the parameter, one of the SDP_ types.
Definition Sdp.h:121
DCONSTV char * name
The name of the parameter.
Definition Sdp.h:119
DCONSTV void * value
The initial value for the parameter.
Definition Sdp.h:120
Definition Sdp.h:118