Privacy and Security Notice

Archived Messages for CDEV_1997@cebaf.gov: CDev Questions

CDev Questions

Kim Gillies (gillies@noao.edu)
Wed, 30 Apr 1997 10:59:47 -0700

All,
I have a couple of questions about cdevRequestObject and how CDEV works.

1. From tracing the code it seems that when I send a message to a device
through a device pointer, the code at a lower level creates a specific
cdevRequestObject to handle the message. I think these objects are
cached and are used for subsequent matching messages.
If true, when I cdevRequestObject::attachPtr, I'm getting the cached
cdevRequestObject object or creating a new one. Is this true?
Does each device have a set of cdevRequestObject objects?
If all this is true there is no penalty (extra objects?) for using the
cdevRequestObject interface over the cdevDevice interface since the
cdevDevice interface is built upon the cdevRequestObject?

2. In the example in the tutorial on page 33, it is shown how to alter
the context of a cdevRequestObject for a "get bdl" message. I'm wondering
why all the examples show restoring the old context. If cdevRequestObjects
hang around and when I change the context of a single cdevRequestObject
no other cdevRequestObjects are affected, wouldn't I only restore the old
context if I was doing a unique, one-off command?

If I set up a monitor using ca service and I just want the value, don't
I change the context and leave it even after the message is sent?
Can I tweak the context after the initial message is sent - in the callback?
If I send one "monitor on X" message (a one off command) should I
"detach" this object to save resources? I know the manual says I should
not be calling detach.

3. I've been trying to set the context for a ca service monitor to just
get the value(VAL). No matter what I do in the context I get about 10 items
in the cdevData object when I view it with asciiDump in the callback.
What should I be setting the context to for this monitor. Is the
success of setting the context tied to the specific record type being
monitored (I think this is false)? The record I'm attaching to is one
of our own and it might have bugs.

Finally.

4. When I send a "monitor on" to a device. Is the cdevRequestObject
passed in the callback the one that I used to send the initial monitor
on message to the device (even if I went through cdevDevice I guess)?
How does one use this object in the callback? I guess I'm asking
why it is included in the callback arguments. If I detach-ed
the cdevRequetObject would I break the callback?

Thanks for your help. I'm enjoying my CDEV experience. I'm just trying
to understand how the pieces fit together.

Kim Gillies
Gemini Telescopes Project