test.java
Class Tests

java.lang.Object
  extended by test.java.Tests

public class Tests
extends java.lang.Object

The general Aida test and demo suite. Each method of this class, Test01, Test02, ... tests and demonstrates some API function of Aida.

Version:
07-Oct-2004, Greg White (greg): Made Test 10 set params on DaObject, to test fix., 01-Oct-2004, Greg White (greg): Removed comments on test 11 & 12 claiming those tests exhibit a bug, that bug is fixed., 21-May-2004, Greg White (greg): Fix test 5 so that time range and interval spec give subset., 21-May-2004, Bob Hall (rdh): Changed "attribute" part of PV specification for Chads requests * to be "HIST.subsystem" (where subsystem is pepii, nlcta, or pack) instead of "HIST"., 30-Apr-2004, Bob Hall (rdh): Modified Test 11 to also fetch history data for NLCTA and 8-pack PVs., 28-Jan-2003, Ron MacKenzie (ronm): Reduce test 13 to 100 iterations because fetching real history data., 07-Jan-2003, Ron MacKenzie (ronm): Output entire sequences returned in test 11., 12-Nov-2002, Ron MacKenzie: Change import of except from aida to package except, 25-Jun-2002 George McIntyre: Initial Version
Author:
George McIntyre
See Also:
daAIDATest

Constructor Summary
Tests(java.lang.String[] args)
           
 
Method Summary
 void run(int testNumber)
           
 void Test01()
          Gets double value.
 void Test02()
          Gets float value with reference.
 void Test03()
          Gets simple structured value.
 void Test04()
          Gets small data structure by reference.
 void Test05()
          Gets small data structure, given parameters.
 void Test06()
          Gets small data structure, given parameters, all parameters in one string.
 void Test07()
          Gets small data structure, given parameters, plus filtering for only first n values.
 void Test08()
          Gets all of, plus dynamically evaluated sub-array of, an array of aggregate data structures.
 void Test09()
          Gets small data structure by complied reference, given parameters on the reference object .
 void Test10()
          Gets array of double, given parameters on the DaObject, by compiled reference.
 void Test11()
          Gets IDL defined structure on server into DaValue on client, using DaObject (ie via DaServer).
 void Test12()
          Gets IDL defined structure on server into DaValue on client, using DaReference (ie skipping DaServer).
 void Test13()
          Gets IDL struct on server into same IDL struct on client, using DaReference, given parameters.
 void Test14()
          Gets IDL struct on server into same IDL struct on client, using DaReference, given parameters.
 void Test15()
          Gets a float using the simplest Aida API function, 1000 times.
 void Test16()
          Gets a float by reference through daServer 1000 times.
 void Test17()
          Gets a float by reference directly to Data Provider 1000 times.
 void Test18()
           
 void Test19()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tests

public Tests(java.lang.String[] args)
Method Detail

run

public void run(int testNumber)

Test01

public void Test01()
Gets double value. Tests simplest acqusition. Demos Double v = (Double)da.get("TEST//VAL", DaValue.Type.DOUBLE);


Test02

public void Test02()
Gets float value with reference. Tests simple get with reference. Demos simple way to get simple value data fast: Float v = (Float)da.get(DaReference("TEST//VAL"));


Test03

public void Test03()
Gets simple structured value. Tests DaValue on server to DaValue on client through DaServer. Demos simplest way to get structured data: DaValue v = da.getDaValue("TEST//VAL")


Test04

public void Test04()
Gets small data structure by reference. Tests performance by timing acqusition over 1000 cycles. Demos DaValue = DaReference.getDaValue() .


Test05

public void Test05()
Gets small data structure, given parameters. Tests parameter parsing. Demos DaValue = daObject.getDaValue("TEST//VAL");


Test06

public void Test06()
Gets small data structure, given parameters, all parameters in one string. Tests parameter parsing. Demos daObject.setParam("="); DaValue = daObject.getDaValue("TEST//VAL");


Test07

public void Test07()
Gets small data structure, given parameters, plus filtering for only first n values. Tests parameter parsing and filtering. Demos DaValue = daObject.getDaValue("TEST//VAL[1-4]");


Test08

public void Test08()
Gets all of, plus dynamically evaluated sub-array of, an array of aggregate data structures. Tests dynamic query expression evaluation. Demos DaObject.getDaValue("all={TEST//VAL}, constrained={TEST//VAL[(#LENGTH-4)-]}");


Test09

public void Test09()
Gets small data structure by complied reference, given parameters on the reference object . Tests compiled reference. Demos DaObject da; DaReference r = new DaReference("TEST//VAL"); r.compile(da); DaValue = r.getDaValue()


Test10

public void Test10()
Gets array of double, given parameters on the DaObject, by compiled reference. Tests client side return type determination. Demos r.setType(DaValue.Type.DOUBLEA); da.geta(r)


Test11

public void Test11()
Gets IDL defined structure on server into DaValue on client, using DaObject (ie via DaServer). Tests a client's ability to interact with a DaValue on client side, even when server returns unknown structure defined by CORBA Any. Demos DaValue v = da.getDaValue("TEST//VAL.HIST");


Test12

public void Test12()
Gets IDL defined structure on server into DaValue on client, using DaReference (ie skipping DaServer).


Test13

public void Test13()
Gets IDL struct on server into same IDL struct on client, using DaReference, given parameters. This function acquires real History Data for 3 Archiver variables. Tests extraction of arbitrary CORBA Any from * DaReference object. Demos histData f = histDataHelper.extract(r.getAny());


Test14

public void Test14()
Gets IDL struct on server into same IDL struct on client, using DaReference, given parameters. Tests performance of CORBA Any acquisition of real history data; prints mean time for one acquisition over 100 cycles.


Test15

public void Test15()
Gets a float using the simplest Aida API function, 1000 times. Tests performance of basic API.


Test16

public void Test16()
Gets a float by reference through daServer 1000 times. Tests performance of indirect DaReference API method. Demos DaObject.get(DaReference("TEST//VAL"));


Test17

public void Test17()
Gets a float by reference directly to Data Provider 1000 times. Tests performance of direct DaReference API method. Demos DaReference.get("TEST//VAL");


Test18

public void Test18()

Test19

public void Test19()