Privacy and Security Notice

Archived Messages for CDEV_1997@cebaf.gov: cdev problem?

cdev problem?

Kim Gillies (gillies@noao.edu)
Fri, 02 May 1997 15:52:18 -0700

All,
I've had problems with this before and I thought I had things working.
The following program with the following .ddl produces no output for me -
out.asciiDump doesn't print anything. What am I doing wrong?
The record exists in the database although I don't think it matters.

Thanks,
Kim Gillies
kgillies@gemini.edu

--------------------- ddl file ------------------------
service ca {
tags { PV }
}

/* All items share these verbs and attributes */
class Basic {
verbs { get, set, monitorOn, monitorOff }

attributes {
value ca {PV=<>.VAL};
}
}

Basic :
diag1 { t10a:sad:test }
;

------------------ program ------------------------------

#include <cdevSystem.h>
#include <cdevDevice.h>
#include <cdevData.h>
#include <stdio.h>

void main()
{
cdevDevice *dir = cdevDevice::attachPtr("cdevDirectory");
cdevData input, output;

// ***********************************************************
// * Insert the name of the device and message to be resolved.
// ***********************************************************
input.insert("device", "diag1");
input.insert("message", "get value");

// ***********************************************************
// * Submit the request to the cdevDirectory object using the
// * send command, and output the result (using asciiDump) if
// * successful.
// ***********************************************************
if(dir->send("serviceData", input, output)==CDEV_SUCCESS)
{
output.asciiDump(stdout);
} else {
fprintf(stderr, "Send Failed\n");
}
}