AtacamaLargeMillimeterArray ACS Training Developing Python Clients.

Slides:



Advertisements
Similar presentations
Making the System Operational
Advertisements

Ch-11 Project Execution and Termination. System Testing This involves two different phases with two different outputs First phase is system test planning.
COM vs. CORBA.
RPC Robert Grimm New York University Remote Procedure Calls.
1 Lecture 11 Interfaces and Exception Handling from Chapters 9 and 10.
Eclipse Architecture Dwight Deugo Nesa Matic
Copyright W. Howden1 Lecture 19: Intro to O/O Components.
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of Creating Eclipse plug-ins.
16/27/2015 3:38 AM6/27/2015 3:38 AM6/27/2015 3:38 AMTesting and Debugging Testing The process of verifying the software performs to the specifications.
ACS Workshop UCN BACI properties Atacama Large Millimeter Array Alessandro Caproni European Southern Observatory BACI properties.
Struts 2.0 an Overview ( )
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
12.
Testing. What is Testing? Definition: exercising a program under controlled conditions and verifying the results Purpose is to detect program defects.
1 3. Implementing Web Services 1.Create SOAP proxy interfaces and WSDL based service descriptions 2.Register/publish services 3.Stores service descriptions.
© 2005 by IBM; made available under the EPL v1.0 | March 1, 2005 Tim deBoer Gorkem Ercan Extend WTP Server Tools for your.
Selenium automated testing in Openbravo ERP Quality Assurance Webinar April 8th, 2010.
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
JUnit in Action SECOND EDITION PETAR TAHCHIEV FELIPE LEME VINCENT MASSOL GARY GREGORY ©2011 by Manning Publications Co. All rights reserved. Slides Prepared.
1 Debugging and Testing Overview Defensive Programming The goal is to prevent failures Debugging The goal is to find cause of failures and fix it Testing.
6st ACS Workshop UTFSM ACS Course Component, Container, Lifecycle Management 6st ACS Workshop UTFSM, Valparaiso, Chile H. Sommer, G. Chiozzi.
AUTOBUILD Build and Deployment Automation Solution.
Presentation: SOAP in a distributed object framework, Application Servers & AXIS SOAP.
Java Android-8 Imran Shafi. Lecture Contents  Debugging Android Projects  Java/XML Errors  Debugger  Logcat Utility  Android Debug Bridge (adb) 
Capture and Replay Often used for regression test development –Tool used to capture interactions with the system under test. –Inputs must be captured;
ACS Error System Using it in JAVA Sohaila Lucero NRAO.
 To explain the importance of software configuration management (CM)  To describe key CM activities namely CM planning, change management, version management.
EJB Framework.  As we know, EJB is the center of the J2EE architecture that provides a sturdy framework for building enterprise applications. The major.
Aircraft Design and an Engineer’s Approach to Software Testing Daniel Böhnke Integrated Aircraft Design Air Transportation Systems.
Magnetic Field Measurement System as Part of a Software Family Jerzy M. Nogiec Joe DiMarco Fermilab.
OXygen XML Editor Support for eXist DB XQuery debugging. Stefan Vasile
Programming in Java Unit 2. Class and variable declaration A class is best thought of as a template from which objects are created. You can create many.
Remote Procedure Calls Adam Smith, Rodrigo Groppa, and Peter Tonner.
Python – Part 1 Python Programming Language 1. What is Python? High-level language Interpreted – easy to test and use interactively Object-oriented Open-source.
Presentation: SOAP/WS in a distributed object framework, Application Servers & AXIS SOAP.
Ch 1. A Python Q&A Session Spring Why do people use Python? Software quality Developer productivity Program portability Support libraries Component.
Java Threads 11 Threading and Concurrent Programming in Java Introduction and Definitions D.W. Denbo Introduction and Definitions D.W. Denbo.
Software Development. Software Developers Refresher A person or organization that designs software and writes the programs. Software development is the.
Presentation: SOAP/WS in a distributed object framework, Application Servers & AXIS SOAP.
ACS Error System APIs: C++ Bogdan Jeram European Southern Observatory July 2005ESO.
AtacamaLargeMillimeterArray ACS Training Developing Python Components.
Running ACS Bogdan Jeram European Southern Observatory July 2005NAOJ.
AtacamaLargeMillimeterArray Abeans. Garching, February 2004ACS Training2 What are Abeans? Abeans are Java beans of the IDL interfaces (for the client.
Developing the control system for the 40m OAN radiotelescope with ACS Observatorio Astronómico Nacional P. de VicenteOctober 2005.
Cem Sahin CS  There are two distinguishable kinds of errors: Python's Errors Syntax ErrorsExceptions.
ICALEPCS’ GenevaACS in ALMA1 Allen Farris National Radio Astronomy Observatory Lead, ALMA Control System.
ESO - Garching 23 June – 02 July, 2003 ACS Course Transparent XML De-/Serialization in Java H. Sommer.
Chapter 6 Introduction to Defining Classes. Objectives: Design and implement a simple class from user requirements. Organize a program in terms of a view.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
1 Developing WBEM Clients Using Python Tim Potter Hewlett-Packard Company
Software Development COMP220/COMP285 Seb Coope Introducing Ant These slides are mainly based on “Java Development with Ant” - E. Hatcher & S.Loughran.
S O A P ‘the protocol formerly known as Simple Object Access Protocol’ Team Pluto Bonnie, Brandon, George, Hojun.
Ch 1. A Python Q&A Session. Why do people use Python? Software Quality Developer productivity Program portability Support Libraries Component integration.
Getting Started with the Open Services Gateway Initiative (OSGi) CNT 5517 Dr. Sumi Helal, Ph.D. Professor Computer & Information Science & Engineering.
David Streader Computer Science Victoria University of Wellington Copyright: David Streader, Victoria University of Wellington Debugging COMP T1.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
AtacamaLargeMillimeterArray ACS Training Using the Python Error System.
Topic 5: CORBA RMI Dr. Ayman Srour
Today… Modularity, or Writing Functions. Winter 2016CISC101 - Prof. McLeod1.
1 © 2005 Cisco Systems, Inc. All rights reserved. Cisco Confidential Session Number Presentation_ID Unity Connection Provisioning API Matt Penning Unity.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
1 Middle East Users Group 2008 Self-Service Engine & Process Rules Engine Presented by: Ryan Flemming Friday 11th at 9am - 9:45 am.
Development Environment
Leverage your Business with Selenium Automation Testing
Outline SOAP and Web Services in relation to Distributed Objects
Notification Channel - Java API
Outline SOAP and Web Services in relation to Distributed Objects
Functions, Procedures, and Abstraction
Python Modules.
Plug-In Architecture Pattern
Presentation transcript:

AtacamaLargeMillimeterArray ACS Training Developing Python Clients

NRAO - Socorro, July 2004ACS Training2 Python’s Pros Good stability Faster start-up time than Java Execution time usually sufficient, although not comparable to C++ Fastest development time Fewer lines of code, easy to understand if not too complex Good for asynchronous, distributed testing Ideal to allow users (astronomers) to control program behavior through scripts

NRAO - Socorro, July 2004ACS Training3 Python’s Cons No compile-time checking: code inconsistencies only discovered at run-time in forms of software errors Therefore not well suited for production software that has a large code base and gets maintained by different developers Free tool support not as good as for Java (profilers, remote debugging, IDEs, …)

NRAO - Socorro, July 2004ACS Training4 What’s Available in Python? If it’s been implemented in the ACS C++ or Java APIs chances are it also exists in Python or no one has asked for it yet. Only major thing missing is XML support in the form of “helper” classes.

NRAO - Socorro, July 2004ACS Training5 Very Simple Example from Acspy.Clients.SimpleClient import PySimpleClient simpleClient = PySimpleClient() #Make an instance of the PySimpleClient remoteComponent="MOUNT2_LOOP" try: mount = simpleClient.getComponent(remoteComponent) actAzProperty = mount._get_actAz() #Get the actAz property (azm, compl) = actAzProperty.get_sync() #Get the value of the property print "MOUNT actual azimuth: ", azm simpleClient.releaseComponent(remoteComponent) except Exception, e: print "Sorry, maybe there was no",remoteComponent,"object" print "The exception was:", e simpleClient.disconnect()

NRAO - Socorro, July 2004ACS Training6 Callback Example from Acspy.Clients.SimpleClient import PySimpleClient import ACS, ACS__POA # Import the Python CORBA stubs for BACI from time import sleep class MyMonitor(ACS__POA.CBdouble): '''This class defines method(s) that will be invoked asynchronously by the mount device''' # def __init__ (self, propName = None): if propName != None: self.propName = propName else: self.propName = "NoName" #

NRAO - Socorro, July 2004ACS Training7 Callback Example (continued) def working (self, value, completion, desc): ''' Method that does all the real work. Parameters: value = the double we are interested in completion = completion structure desc = callback struct description ''' print "Working: ", str(self.propName), " is ", str(value) # def done (self, value, completion, desc): ''' Invoked just before a monitor is destroyed. Parameters: value = the final value of the double we are interested in completion = completion structure desc = callback struct description ''' print "Done: ", str(self.propName), " is ", str(value)

NRAO - Socorro, July 2004ACS Training8 Callback Example (continued) def negotiate (self, time_to_transmit, desc): '''For simplicities sake, we always return true. ''' return TRUE # simpleClient = PySimpleClient() try: mount = simpleClient.getComponent("MOUNT2_LOOP") actAzProperty = mount._get_actAz() #Get the actAz property cbMon = MyMonitor("actAz") #Create a callback monitor for actAz cbMonServant = cbMon._this() #Activate the callback monitor desc = ACS.CBDescIn(0L, 0L, 0L) #Create the real monitor actMon = actAzProperty.create_monitor(cbMonServant, desc) actMon.set_timer_trigger( ) #Working method once per sec. sleep(10) #Destroy the monitor after ten seconds actMon.destroy()

NRAO - Socorro, July 2004ACS Training9 Callback Example (continued) # Release the component simpleClient.releaseComponent("MOUNT2_LOOP") except Exception, e: print "Sorry, I expected there to be a Mount in the system and" print "there isn't." print "The exception was:", e simpleClient.disconnect()

NRAO - Socorro, July 2004ACS Training10 What methods does PySimpleClient have? Every Python Container Service method is available in Python!!! See the Pydoc documentation for the ContainerServicesContainerServices class.

NRAO - Socorro, July 2004ACS Training11 Python-related Makefile Targets PY_SCRIPTS - Specifies Python scripts without the.py extension that will be installed into $INTROOT/bin. PY_MODULES – Specifies Python modules with the.py extension that will be installed into $INTROOT/lib/python/site-packages. PY_PACKAGES – Specifies Python packages to be installed into $INTROOT/lib/python/site-packages. Really these are just directories containing Python scripts.

NRAO - Socorro, July 2004ACS Training12 Questions about Python Clients???

NRAO - Socorro, July 2004ACS Training13 Demo