Most of the problems I had (and have) are related to describing what
I want to do in the .ddl file. Maybe someone can point out work arounds or
maybe some changes can be made to the .ddl file in a future version.
In my system I often need to make singleton classes or a class that
has just a few instances. We use a record called "cad" to set parameters
for a command. A cad record has a number of generic parameter fields (A,B,C,D).
I want to give the fields more descriptive names so high level code
doesn't have to know what goes in "A".
The following example describes a set of commands that obey the
"Source" interface (to use Java terms). We have maybe 20 records in our
system that obey this interface. A Source command moves a telescope.
Basic class just has the normal CA verbs.
class Source : Basic {
attributes {
frame ca {PV=<>.B};
ra ca {PV=<>.C};
dec ca {PV=<>.D};
equinox ca {PV=<>.E};
epoch ca {PV=<>.F};
}
}
The most specific commands have a class and one instance. This can be
set up with an alias.
Source : srcA { TCS:source_a }
;
Or I can just hard code the record in the data.
class main : Basic {
attributes {
frame ca {PV=TCS:src_a.B};
ra ca {PV=TCS:src_a.C};
dec ca {PV=TCS:src_a.D};
equinox ca {PV=TCS:src_a.E};
epoch ca {PV=TCS:src_a.F};
}
}
For our system I need to associate another record name with each of these
Cad record instances. I would like to be able to add text attributes to
my records to make this possible in the .ddl file. For example:
class Source : Basic {
attributes {
frame ca {PV=<>.B};
ra ca {PV=<>.C};
dec ca {PV=<>.D};
equinox ca {PV=<>.E};
epoch ca {PV=<>.F};
apply text "tcsApply"
}
}
The value of the apply field is the name of another record defined in the
.ddl file. Unlike collections, I don't want to send the same messages
to the tcsApply record. I need to tie the two together at a higher level
in the software.
I'd also like to use this feature to document my classes. Here's
an example.
class Rotator : Basic {
attributes {
description text "Use this record to move the rotator."
angle ca {t10.rot.A};
mode ca {t10.rot.B};
apply text "tcsApply"
}
}
That way the designer of the .ddl file can provide me with information on
the records and the information is all in one place.
I suppose I could add a text service but that's a lot of work for
the functionality I want. I think adding some sort of text feature
could be useful.
Is there a chance something like this could be added?
Thanks,
Kim Gillies
kgillies@gemini.edu
Gemini Telescopes Project