Presentation is loading. Please wait.

Presentation is loading. Please wait.

ACS Component Simulator J. Ibsen European Southern Observatory Garching – January 2007ESO.

Similar presentations


Presentation on theme: "ACS Component Simulator J. Ibsen European Southern Observatory Garching – January 2007ESO."— Presentation transcript:

1 ACS Component Simulator J. Ibsen European Southern Observatory Garching – January 2007ESO

2 ALMA Project Garching, January 2007Component Simulator2 Summary What is it? (some) Requirements Implementation What do we need? Cookbook Examples Final remarks/Homework

3 ALMA Project Garching, January 2007Component Simulator3 What is it? An ACS component/characteristic component capable to implement its IDL interface at runtime Useful for test driven development and to provide cheap/easy-to-deploy mock-up components (simulating normal/alternative behaviors).

4 ALMA Project Garching, January 2007Component Simulator4 (some) Requirements Methods and attributes should be generated on the fly Simulated component should behave as a real component (respecting the component lifecyle) Different component behaviors should be “easily” added. APIs should be available to developers.

5 ALMA Project Garching, January 2007Component Simulator5 Implementation Simulator component has been implemented in python (dynamic inheritance, methods can be redefined at runtime) Configuration is done populating the CDB (CDB/alma/simulated)

6 ALMA Project Garching, January 2007Component Simulator6 What do we need? Brand new IDL (and schema if we have a characteristic component) Runtime environment (i.e. CDB suitable to start ACS and containers)

7 ALMA Project Garching, January 2007Component Simulator7 Cookbook: deployment Add component to CDB/MACI/Components.xml If we’re dealing with a characteristic component, add an entry to: CDB/alma/ /.xml Add entry to: CDB/alma/simulated/ /.xml

8 ALMA Project Garching, January 2007Component Simulator8 Ex 1: getting a reference Start ACS Start simulationContainer Open objexp and get a reference to the simulated component

9 ALMA Project Garching, January 2007Component Simulator9 Ex 2: methods From the simulation GUI, select the objfix method Insert code to change objfix Setup simulation CDB entry to add the code

10 ALMA Project Garching, January 2007Component Simulator10 Simulation CDB elements : python libraries Schema file: SimulatedComponent.xsd

11 ALMA Project Garching, January 2007Component Simulator11 Ex 3: properties Properties are simulated at DevIO level. Tip: write down a python module with the DevIO for the simulated property and a getDevIO function Add code to the simulation CDB entry

12 ALMA Project Garching, January 2007Component Simulator12 Ex 4: methods and properties Write down a python module with the desired simulation Include it in the section Call your functions from the and sections

13 ALMA Project Garching, January 2007Component Simulator13 Final Remarks The component simulator allows to decouple some test development from implementation Allows developers to a test first approach

14 ALMA Project Garching, January 2007Component Simulator14 Homework Prepare a simulation for your interface Prepare xUnit/other tests to use when the implementation is ready


Download ppt "ACS Component Simulator J. Ibsen European Southern Observatory Garching – January 2007ESO."

Similar presentations


Ads by Google