This page is the front page for the documentation for the (older) 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 these first generation C++ interfaces, but is a little out of date (missing descriptions of some of the newer interfaces).
WARNING - don't use these interfaces for new work, instead use DRAMA2. DRAMA2 avoids many of the issues of the classes below and makes good use of C++11 threads, exceptions etc.
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 documentation, 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:: Inherits SdsId:: and implementing the SDS Arg interface, which provides for easier access to SDS structures when creating, setting and getting simple scalar or string values.
- Git:: This class and its sub-classes 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 structures. 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 links from this page working to those classes - please use the List of types page and look for items suffixed with
(GitTpl)
. There are Real
, Int
, Enum
and 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.
DRAMA2 should be used for more modern work.
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 interpret 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 appropriate to handle replies to messages sent using DcppTask:: methods.
The following classes are useful 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 initialization 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.