90#ifdef DRAMA_ALLOW_CPP_STDLIB
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
130 DPUBLIC DVOID SdpInit ( SdsIdType *
id ,
131 StatusType * DCONSTR status);
132 DPUBLIC DVOID SdpCreate (
133 DCONSTV SdsIdType
id,
134 DCONSTV
long int size,
136 StatusType * DCONSTR status);
138 DPUBLIC DVOID SdpCreateItem (
139 DCONSTV SdsIdType parsys,
140 DCONSTV SdsIdType item,
141 StatusType * DCONSTR status);
143 DPUBLIC SdsIdType SdpGetSys();
145 DPUBLIC DVOID SdpSetReadonly (StatusType * DCONSTR status);
147 DPUBLIC DVOID SdpGet (
152 StatusType * status);
154 DPUBLIC DVOID SdpMGet (
159 StatusType * status);
161 DPUBLIC DVOID SdpSet (
165 StatusType * status);
168 DPUBLIC DVOID SdpPutc(
169 DCONSTV
char * DCONSTR name,
171 StatusType * DCONSTR status);
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,
180 StatusType *DCONSTR status);
181 DPUBLIC DVOID SdpPuti(
182 DCONSTV
char * DCONSTR name,
184 StatusType * DCONSTR status);
185 DPUBLIC DVOID SdpPutu(
186 DCONSTV
char * DCONSTR name,
187 DCONSTV
unsigned long value,
188 StatusType *DCONSTR status);
193 DPUBLIC DVOID SdpPuti64(
194 DCONSTV
char * DCONSTR name,
196 StatusType * DCONSTR status);
198 DPUBLIC DVOID SdpPutu64(
199 DCONSTV
char * DCONSTR name,
200 DCONSTV UINT64 value,
201 StatusType *DCONSTR status);
206 DPUBLIC DVOID SdpPutf(
207 DCONSTV
char *DCONSTR name,
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,
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,
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);
274 DPUBLIC DVOID SdpPutStruct(
275 DCONSTV
char * DCONSTR name,
276 DCONSTV SdsIdType value,
279 StatusType * DCONSTR status);
283 DPUBLIC DVOID SdpInit ();
284 DPUBLIC DVOID SdpCreate ();
285 DPUBLIC DVOID SdpCreateItem ();
286 DPUBLIC DVOID SdpSetReadonly();
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();
366 SdsId &item, StatusType *status) {
367 SdpCreateItem((SdsIdType)parsys,(SdsIdType)item,status);
369 if (*status == STATUS__OK)
388 static void Put(
const char *name,
bool value, StatusType *status) {
389 SdpPutus(name,(
short)value, status);
404 static void Put(
const char *name,
char value, StatusType *status) {
405 SdpPutc(name,value,status);
419 static void Put(
const char *name,
unsigned short value,
420 StatusType *status) {
421 SdpPutus(name,value,status);
435 static void Put(
const char *name,
short value, StatusType *status) {
436 SdpPuts(name,value,status);
450 static void Put(
const char *name, INT32 value , StatusType *status) {
451 SdpPuti(name,value,status);
465 static void Put(
const char *name, UINT32 value,
466 StatusType *status) {
467 SdpPutu(name,value,status);
481 static void Put(
const char *name, INT64 value , StatusType *status) {
482 SdpPuti64(name,value,status);
496 static void Put(
const char *name, UINT64 value,
497 StatusType *status) {
498 SdpPutu64(name,value,status);
512 static void Put(
const char *name,
float value, StatusType *status) {
513 SdpPutf(name,value,status);
527 static void Put(
const char *name,
double value, StatusType *status) {
528 SdpPutd(name,value,status);
543 static void Put(
const char *name,
const char * value, StatusType *status)
545 SdpPutString(name,value,status);
569 static void PutSds(
const char *name, SdsIdType value,
570 StatusType *status) {
571 SdpPutSds(name,value,status);
587 static void Update(SdsIdType
id, StatusType *status) {
588 SdpUpdate(
id,status);
604 static void Update(
const char *name, StatusType *status) {
605 SdpUpdateByName(name,status);
623 static void Get(
const char *name,
bool * value,
624 StatusType *status) {
626 SdpGetc(name,&cvalue,status);
627 *value = cvalue ? true :
false;
642 static void Get(
const char *name,
char * value,
643 StatusType *status) {
644 SdpGetc(name,value,status);
659 static void Get(
const char *name,
short * value,
660 StatusType *status) {
661 SdpGets(name,value,status);
676 static void Get(
const char *name,
unsigned short * value,
677 StatusType *status) {
678 SdpGetus(name,value,status);
692 static void Get(
const char *name, INT32 * value,
693 StatusType *status) {
695 SdpGeti(name,&v,status);
710 static void Get(
const char *name, UINT32 * value,
711 StatusType *status) {
713 SdpGetu(name,&v,status);
730 static void Get(
const char *name, INT64 * value,
731 StatusType *status) {
732 SdpGeti64(name,value,status);
747 static void Get(
const char *name, UINT64 * value,
748 StatusType *status) {
749 SdpGetu64(name,value,status);
762 static void Get(
const char *name,
float * value,
763 StatusType *status) {
764 SdpGetf(name,value,status);
777 static void Get(
const char *name,
double * value,
778 StatusType *status) {
779 SdpGetd(name,value,status);
794 static void Get(
const char *name,
int len,
char * value,
795 StatusType *status) {
796 SdpGetString(name,len,value,status);
817 static void GetSds(
const char *name, SdsIdType * value,
818 StatusType * status) {
819 SdpGetSds(name,value,status);
838 StatusType * status) {
844 SdpGetSds(name,&
id,status);
871 static void Put(
const char *name,
const SdsId & value,
872 StatusType *status) {
873 SdpPutSds(name,(SdsIdType)value,status);
901 const bool create=
true ) {
902 SdpPutStruct(name,(SdsIdType)value,(
int)
true,
932 const bool create=
true ) {
939#ifdef DRAMA_ALLOW_CPP_STDLIB
965 static void Put (
const std::string &name,
bool value, StatusType *
const status) {
966 SdpPutus(name.c_str(),(
unsigned short)value, status);
982 static void Put (
const std::string &name,
char value, StatusType *
const status) {
983 SdpPutc(name.c_str(),value,status);
999 static void Put (
const std::string &name,
short value, StatusType *
const status) {
1000 SdpPuts(name.c_str(),value,status);
1016 static void Put (
const std::string &name,
unsigned short value,
1017 StatusType *
const status) {
1018 SdpPutus(name.c_str(),value,status);
1034 static void Put (
const std::string &name, INT32 value,
1035 StatusType *
const status) {
1036 SdpPuti(name.c_str(),value,status);
1052 static void Put (
const std::string &name, UINT32 value,
1053 StatusType *
const status) {
1054 SdpPutu(name.c_str(),value,status);
1071 static void Put (
const std::string &name, INT64 value, StatusType *
const status) {
1072 SdpPuti64(name.c_str(),value,status);
1088 static void Put (
const std::string &name, UINT64 value, StatusType *
const status) {
1089 SdpPutu64(name.c_str(),value,status);
1105 static void Put (
const std::string &name,
float value, StatusType *
const status) {
1106 SdpPutf(name.c_str(),value,status);
1122 static void Put (
const std::string &name,
double value, StatusType *
const status) {
1123 SdpPutd(name.c_str(),value,status);
1140 static void Put(
const char *name,
1141 const std::string &value,
1142 StatusType *status) {
1143 SdpPutString(name, value.c_str(), status);
1160 static void Put(
const std::string &name,
1161 const std::string &value,
1162 StatusType *status) {
1164 Put(name.c_str(), value, status);
1184 static void Get (
const std::string &name,
bool * value,
1185 StatusType *
const status) {
1187 SdpGetus(name.c_str(),&v,status);
1188 *value = v ? true :
false;
1204 static void Get (
const std::string &name,
char * value, StatusType *
const status) {
1205 SdpGetc(name.c_str(),value,status);
1222 static void Get (
const std::string &name,
short * value, StatusType *
const status) {
1223 SdpGets(name.c_str(),value,status);
1239 static void Get (
const std::string &name,
unsigned short * value,
1240 StatusType *
const status) {
1241 SdpGetus(name.c_str(),value,status);
1257 static void Get (
const std::string &name, INT32 * value,
1258 StatusType *
const status) {
1259 Sdp::Get(name.c_str(),value,status);
1275 static void Get (
const std::string &name, UINT32 * value,
1276 StatusType *
const status) {
1277 Sdp::Get(name.c_str(),value,status);
1294 static void Get (
const std::string &name, INT64 * value, StatusType *
const status) {
1295 SdpGeti64(name.c_str(),value,status);
1311 static void Get (
const std::string &name, UINT64 * value, StatusType *
const status) {
1312 SdpGetu64(name.c_str(),value,status);
1328 static void Get (
const std::string &name,
float * value, StatusType *
const status) {
1329 SdpGetf(name.c_str(),value,status);
1344 static void Get (
const std::string &name,
double * value, StatusType *
const status) {
1345 SdpGetd(name.c_str(),value,status);
1367 static void Get(
const char *name,
1376 if (*status != STATUS__OK)
return;
1378 char tname[SDS_C_NAMELEN];
1381 unsigned long dims[7];
1385 ItemId.
Info(tname, &code, &ndims, dims, status);
1386 if (*status != STATUS__OK)
return;
1388 if ((code == SDS_CHAR)&&(ndims == 1))
1391 buflen = dims[0] + 1;
1397 buffer =
new char[buflen];
1400 *status = DITS__MALLOCERR;
1401 ErsRep(0, status,
"Error allocating %d bytes for Sdp::Get into std::string",
1406 SdpGetString(name, buflen, buffer, status);
1411 if (*status == STATUS__OK)
1442 static void Get(
const std::string &name,
1446 Get(name.c_str(), value, status, buflen);
1470 static void GetSds(
const std::string &name, SdsIdType * value,
1471 StatusType * status) {
1472 SdpGetSds(name.c_str(),value,status);
1492 static void Get(
const std::string &name,
SdsId * value,
1493 StatusType * status) {
1499 SdpGetSds(name.c_str(),&
id,status);
1526 static void Put(
const std::string &name,
const SdsId & value,
1527 StatusType *status) {
1528 SdpPutSds(name.c_str(),(SdsIdType)value,status);
1557 const bool create=
true ) {
1558 SdpPutStruct(name.c_str(),(SdsIdType)value,(
int)
true,
1559 (
int)create,status);
1591 const bool create=
true ) {
1592 SdpPutStruct(name.c_str(),
1595 (
int)create,status);
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