DJAVA

au.gov.aao.drama
Class Sdp

java.lang.Object
  extended by au.gov.aao.drama.Sdp

public class Sdp
extends Object

This class implements an interface to the DRAMA C language SDP library, used to create DRAMA parameters.

See Distributed Instrumentation Tasking System for full details on SDP.

There is no actual object and hence no constructor. Just static member functions which provide access to the C interface.

Invoke the Init() method once in your DRAMA task java program to add the SDP parameter system to your DRAMA task.

Version:
@(#) $Id: ACMM:DramaJava/Sdp.java,v 3.52 17-Sep-2009 14:08:20+10 tjf $
Author:
Tony Farrell
See Also:
DramaTask, SdsID, Arg

Nested Class Summary
static class Sdp.Sds
          This class is used to access the value Sdp parameter using SdsID and Arg class methods.
 
Field Summary
static String RCSID
          The RCS (ACMM) ID.
 
Method Summary
static boolean BoolValue(String Name)
          Return an boolean from a named Sdp parameter.
static void CreateItem(SdsID id)
          Create a parameter by inserting the specified Sds structure into the parameter system.
static void CreateItem(String Name, char value)
          Create a char (8 bit) parameter.
static void CreateItem(String Name, double value)
          Create a double length floating point parameter.
static void CreateItem(String Name, int value)
          Create a int (32bit) parameter.
static void CreateItem(String Name, long value)
          Create a long (64 bit) parameter.
static void CreateItem(String Name, short value)
          Create a short (16 bit) parameter.
static void CreateItem(String Name, String value)
          Create a string parameter.
static void Init(DramaTask task)
          Add the SDP parameter system to a DRAMA task.
static int IntValue(String Name)
          Return an integer (up to 32 bit value) from a named Sdp parameter.
static void Put(String Name, boolean value)
          Put an boolean item into an Sdp parameter.
static void Put(String Name, boolean copy, SdsID value)
          Replace the SDS structure representing the named parameter with the supplied structure.
static void Put(String Name, char value)
          Put a char (8 bit) item into an Sdp parameter.
static void Put(String Name, double value)
          Put an double length floating point item into an Sdp parameter.
static void Put(String Name, int value)
          Put an int (32 bit) item into an Sdp parameter.
static void Put(String Name, long value)
          Put an long (64 bit) item into an Sdp parameter.
static void Put(String Name, short value)
          Put a short (16 bit) item into an Sdp parameter
static void Put(String Name, String value)
          Put an string item into an Sdp parameter.
static double RealValue(String Name)
          Return an real from a named Sdp parameter.
static String StringValue(String Name)
          Return an string from a named Sdp parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RCSID

public static final String RCSID
The RCS (ACMM) ID. This field returns the source code archive ID of this class's source file.

The returned string corresponds to the version string seen above (in the class description comments), but will contain the version details of the compiled class file's actual source file.

(ACMM is the source code archive system used by the AAO. If the string returned by RCSID does not contain the string ACMM, then it is likely the source code has been archived again outside the AAO).

See Also:
Constant Field Values
Method Detail

Init

public static void Init(DramaTask task)
                 throws DramaException
Add the SDP parameter system to a DRAMA task. This must be invoked before any other Sdp class method.

Throws:
DramaException - Thrown on errors in the DRAMA code.

CreateItem

public static void CreateItem(SdsID id)
                       throws DramaException
Create a parameter by inserting the specified Sds structure into the parameter system.

Parameters:
id - The SDS structure to insert into the parameter system. This must represent a top level SDS internal structure. The SdsID is modified such that the the structure will not be delete when the SdsID is finialized.
Throws:
DramaException - Thrown on errors in the DRAMA code.

CreateItem

public static void CreateItem(String Name,
                              char value)
                       throws DramaException
Create a char (8 bit) parameter.

Parameters:
Name - The name of the parameter to create.
value - The initial value of the parameter.
Throws:
DramaException - Thrown on errors in the DRAMA code.

CreateItem

public static void CreateItem(String Name,
                              short value)
                       throws DramaException
Create a short (16 bit) parameter.

Parameters:
Name - The name of the parameter to create.
value - The initial value of the parameter.
Throws:
DramaException - Thrown on errors in the DRAMA code.

CreateItem

public static void CreateItem(String Name,
                              int value)
                       throws DramaException
Create a int (32bit) parameter.

Parameters:
Name - The name of the parameter to create.
value - The initial value of the parameter.
Throws:
DramaException - Thrown on errors in the DRAMA code.

CreateItem

public static void CreateItem(String Name,
                              long value)
                       throws DramaException
Create a long (64 bit) parameter.

Parameters:
Name - The name of the parameter to create.
value - The initial value of the parameter.
Throws:
DramaException - Thrown on errors in the DRAMA code.

CreateItem

public static void CreateItem(String Name,
                              double value)
                       throws DramaException
Create a double length floating point parameter.

Parameters:
Name - The name of the parameter to create.
value - The initial value of the parameter.
Throws:
DramaException - Thrown on errors in the DRAMA code.

CreateItem

public static void CreateItem(String Name,
                              String value)
                       throws DramaException
Create a string parameter.

Parameters:
Name - The name of the parameter to create.
value - The initial value of the parameter.
Throws:
DramaException - Thrown on errors in the DRAMA code.

Put

public static void Put(String Name,
                       char value)
                throws DramaException
Put a char (8 bit) item into an Sdp parameter.

Parameters:
Name - The name of the Sdp parameter to insert in to.
value - The value to insert.
Throws:
DramaException - Thrown on errors in the DRAMA code.

Put

public static void Put(String Name,
                       short value)
                throws DramaException
Put a short (16 bit) item into an Sdp parameter

Parameters:
Name - The name of the Sdp parameter to insert in to.
value - The value to insert.
Throws:
DramaException - Thrown on errors in the DRAMA code.

Put

public static void Put(String Name,
                       int value)
                throws DramaException
Put an int (32 bit) item into an Sdp parameter.

Parameters:
Name - The name of the Sdp parameter to insert in to.
value - The value to insert.
Throws:
DramaException - Thrown on errors in the DRAMA code.

Put

public static void Put(String Name,
                       long value)
                throws DramaException
Put an long (64 bit) item into an Sdp parameter.

Parameters:
Name - The name of the Sdp parameter to insert in to.
value - The value to insert.
Throws:
DramaException - Thrown on errors in the DRAMA code.

Put

public static void Put(String Name,
                       double value)
                throws DramaException
Put an double length floating point item into an Sdp parameter.

Parameters:
Name - The name of the Sdp parameter to insert in to.
value - The value to insert.
Throws:
DramaException - Thrown on errors in the DRAMA code.

Put

public static void Put(String Name,
                       boolean value)
                throws DramaException
Put an boolean item into an Sdp parameter.

Parameters:
Name - The name of the Sdp parameter to insert in to.
value - The value to insert.
Throws:
DramaException - Thrown on errors in the DRAMA code.

Put

public static void Put(String Name,
                       String value)
                throws DramaException
Put an string item into an Sdp parameter.

Parameters:
Name - The name of the Sdp parameter to insert in to.
value - The value to insert.
Throws:
DramaException - Thrown on errors in the DRAMA code.

Put

public static void Put(String Name,
                       boolean copy,
                       SdsID value)
                throws DramaException
Replace the SDS structure representing the named parameter with the supplied structure.

Parameters:
Name - The name of the Sdp parameter to insert in to.
value - The value to insert.
copy - If true, we must insert a copy of the Sds structure refered to by value into the parameter system.
Throws:
DramaException - Thrown on errors in the DRAMA code.

IntValue

public static int IntValue(String Name)
                    throws DramaException
Return an integer (up to 32 bit value) from a named Sdp parameter.

Note, we will probably add a LongValue method at some stage.

Parameters:
Name - The name of the Parameter the value of which is to be returned.
Returns:
The value converted to a 32 bit value if possible.
Throws:
DramaException - Thrown on errors in the DRAMA code.

RealValue

public static double RealValue(String Name)
                        throws DramaException
Return an real from a named Sdp parameter.

Parameters:
Name - The name of the Parameter the value of which is to be returned.
Returns:
The value converted to a 32 double floating point if possible.
Throws:
DramaException - Thrown on errors in the DRAMA code.

BoolValue

public static boolean BoolValue(String Name)
                         throws DramaException
Return an boolean from a named Sdp parameter.

Parameters:
Name - The name of the Parameter the value of which is to be returned.
Returns:
The value converted to a boolean value if possible
Throws:
DramaException - Thrown on errors in the DRAMA code.

StringValue

public static String StringValue(String Name)
                          throws DramaException
Return an string from a named Sdp parameter.

Parameters:
Name - The name of the Parameter the value of which is to be returned.
Returns:
The value converted to a string.
Throws:
DramaException - Thrown on errors in the DRAMA code.

DJAVA

Click here for the DRAMA home page and here for the AAO home page.

For more information, contact tjf@aaoepp.aao.gov.au.