This page is the front page for the documentation for the C++ interfaces to DRAMA.The core of DRAMA is written in C and was done so before C++ was available in a standard way on all the machines of interest. As a result, the C++ interfaces came later. The document DRAMA C++ interface provides a basic introduction to the C++ interfaces, but is a little out of date (missing descriptions of some of the newer interfaces).
This documentation is generated automatically from the source code headers using the doxygen tool. As such, it is more up to date then the older Latex documetation, but tends to lack introductory overview text, most of which is here.
The first set of provided classes implement interfaces to common features, which naturally work better when implemented in C++ These are
- SdsId:: A class which provides an interface to the the DRAMA SDS Library. See the Self Definging Data System for full details on SDS itself. Of particular interest is that the C++ interface removes, in most cases, the need to tidy up SDS, by using C++ destructors.
- Arg:: Inherites SdsId:: and implementing the SDS Arg interface, which provides for easier access to SDS structures when creating, setting and getting simple scaler or string values.
- Git:: This class and its subclasses provide access to the GitArgGet* sequence of C routines. They provide a more natural way of fetching command line argument values sent to a DRAMA task in SDS stuctures. Use GitEnum:: to fetch enumerated command arguments, GitBool:: to fetch boolean command arguments, GitInt:: for integer values and GitReal:: for real numbers. Subclasses can add range checks etc. easily.
- GitTpl There is an alternative template interface to GitArgGet*. In the namespace GitTpl. I don't yet have the linkes from this page working to those classes - please use the List of types page and look for items suffixed with
(GitTpl). There are
String interfaces here. This interface is probably better in most cases.
- Sdp:: This class provide access to DRAMA's Sdp parameter system. The interfaces are very similar to the Arg:: interface but instead of acting on a particular object, all methods are at a class level - acting on the parameter system.
The next set of classes were intended to provide an interface to sending DRAMA messages and handling the replies. Note that I am not happy with the result. The approach is wrong. Instead of using call back functions an client data, we should be using an object which the user can override to provide the functionality. This may be added later and and examples of this approach can be seen with the GitTask:: function and the approach used by DJAVA.
The following classes are provided:
- DcppBuffers:: This provides a class used to represent DRAMA message buffer sizes. It is used by the other classes.
- DcppShared:: A support class used to set up and manage a DRAMA shared memory segment, for us in sending DRAMA bulk data messages using DcppTask:: methods.
- DcppTask:: A class which provides access to the DRAMA message sending facilities. An object of this time can be used to send messages to a particular DRAMA task. It wraps up various details, including Getting the path and task loading (if required). You can specify functions to be invoked when replies are received to the message you sent - normally different functions can be specified for each reply type. DcppTask:: allows development of DRAMA tasks in a mode where functions the developer writes functions to be invoked for each reply, rather then having to manage and interpert DRAMA action rescheduling. This requires that the DcppDispatch() function or the DcppHandler:: class be involved in handling action rescheduling.
- DcppMonitor:: A class which can be used to set up and manage DRAMA parameter monitors.
- DcppHandler:: A class which wraps up the control of DRAMA action rescheduling for actions using DcppTask:: . When installed to handle the rescheduling of an action, DcppDispatch() is invoked as approiate to handle replies to messages sent using DcppTask:: methods.
The following classes are usefull in developing DRAMA systems using the Generic Instrumentation Task Specification. These systems are in heavy use internally at the AAO.
- GitLogger:: A class which implements logging in AAO GIT tasks.
- GitTask:: A class which sub-classes DcppTask:: to implement the standard initialisation sequence for a task obeying the GIT task. This is used to implement control tasks which control GIT style tasks.
Other classes documented are generally used to support one of the above classes.